REST Query

By using the REST Query (Record) activity, you can search for records. The TIBCO MDM server provides REST APIs for querying records. The four different APIs are, query record by ID and IDEXT, all records of a repository, search for records by criteria, and retrieve related records by parent record ID and relationship name.

General

The General tab contains the following fields.

Field Module Property? Description
Name No The name to be displayed as the label for the activity in the process.

The default value is RESTQuery.

MDM Connection Yes The MDM connection resource establishes a connection to an MDM server, allowing the plug-in to communicate with MDM.

Click to select an MDM connection.

If no matching MDM connections are found, click Create Shared Resource to create one.

Repository Yes The name of repository where records are stored.
Click Select to select a repository.
Note: When the selected repository model is complex and involves many related repositories, increase the value of the -Xms and -Xmx parameters in the TIBCOBusinessStudio.ini file which is located in the TIBCO_HOME\studio\version\eclipse directory.
HTTP Client Yes Select the HTTP client which supports the HTTP and REST services, allowing the plug-in to communicate with TIBCO MDM.

Click to select the HTTP client.

If no matching HTTP client is found, click Create Shared Resource to create one.

Note: HTTP client must be created with the default values on all fields and properties. The Default Host must be the host IP address and the Default Port port number of the MDM server.
Search Type Yes Select the search type. The default option is All records of a repository.
  • Query record by ID and IDEXT: Query records by record ID and ID Extension.
  • All records of a repository: Query all the records in a repository.
  • Search for records by criteria: Query for records using the search criteria.
  • Retrieve related records by parent record id, relationship name: Query for related records by parent record ID and relationship name.
For more information on the Search Type, refer to TIBCO MDM REST Services Guide and TIBCO MDM REST Swagger Online Help.
Note: IsDefined and IsNotDefined operators are not supported for Search for records by criteria search type.
Note: For search type Query record by ID and IDEXT, the following scenarios are supported:
  • Value is provided for both ID and EXT --> This returns only single record.
  • Value is provided for ID and EXT is set to operator "IsDefined" --> This returns records with matching ID but different EXT values.
  • Value is provided for ID and EXT is set to operator "IsNotDefined" --> This returns only one record with matching ID and blank EXT field.
  • Value is provided for ID and EXT is blank --> This returns all records with matching ID including the records with EXT having value or blank.
Perspective Yes Enter the perspective name within the selected repository.

Click Select to open the Perspective dialog. All available perspective names are listed in the dialog. Select one to apply to your current activity.

Note: The usage of context variable is not recommended. However, if used, the perspective drop-down preferences takes precedence over the context variable.
Record State Yes The state in which you want to search the record. The default option is Confirmed.
  • Confirmed: Search confirmed records.
  • Unconfirmed: Search unconfirmed records.
Command Qualifier No The qualifier of the command. The default option is None.
  • None: No command qualifier.
  • RelatedRecords: Validate records and save them without initiating the New Record Introduction Edit workflow.
Note: The RelatedRecords option opens only when the selected repository mode is defined with relationship and when the Search Type is selected as Retrieve related records by parent record id, relationship name.
Note: When Command Qualifier is set to RelatedRecords, any option for the Record State and Active fields does not take effect.

Description

Provide a short description for the activity.

Advanced

The Advanced tab contains the following field.

Field Module Property? Description
Return System Attributes No Select the check box returns the system attributes.
Find Root No Select the check box if you want only root records, without any related records in the response.
Work Item ID No Specify the work item ID in this field.
Active No Query active records. A record is considered active if it is not deleted. By default, the option is TRUE.
  • TRUE: Only data for active records are retrieved, and the query does not return any deleted records.
  • FALSE: Only data for deleted records are retrieved, and the query does not return any active records.

Input

The following is the input for the activity. The input parameter varies based on the selected Search Type.
Note: See General Input for MDM Activities for details about some general input items for this activity.
Note: The input data (string constants) must be entered by using double quotes. However, you may encounter validation error. For more information, on XPATH handling in BusinessWorks refer to the Chapter XPath in the TIBCO ActiveMatrix BusinessWorks™ Application Development.
Input Item Description
Pagination Specify the following detailed information:
  • MaxCount: Limit the number of returned records if more than one records match the query.
  • StartCount: Specify the count where the queried records start to be displayed.
  • OrderByColumnList: Sort order for the query results by column list.
Attribute Group Specify group attributes of records. Each attribute is assigned to an attribute group: Unassigned, System or User Defined Group. The default attribute group UNASSIGNED holds all attributes that do not belong to any specific group.
Note: This field appears when Searchable is set to TRUE for the attribute in the MDM metadata and the field disappears when Searchable is set to False.
  • PRODUCTID: Record ID. It is mandatory when Command Qualifier is set to RelatedRecords in the General tab.
  • PRODUCTIDEXT: Record ID extension. It is mandatory when Command Qualifier is set to RelatedRecords in the General tab.
Note: New data types Long and URL are supported. The XPath Expression is used to edit complex data types, use the function constructor.
Note: Search based on file type attributes, date type, timestamp type are not supported. If the response has file attributes, only the URL is returned as response from the server. Using the URL, you can download the attachment.
Note: Operator NotIn is supported for string data type.
RecordVersion Identify the version of the record to be queried.
Note: It is mandatory when Command Qualifier is set to RelatedRecords in the General tab.
Relationship Specify the relationship of repositories. After selecting an available relationship name, the related repository is displayed, and you can specify the corresponding attributes in the target repository.
  • CheckExistence: You can specify true or false for each relationship search.

    If CheckExistence is true, all the parent records which have related records in that relationship are returned. If false, then all the parent records which do not have any related records in that relationship are returned. By default, the value is true.

  • Count: Specify the count in the text field for the search.

    Count specifies the number of parent records with or without related records in that relationship depending on true or false selected for CheckExistence. The default value = -1 (all records which match criteria).

Return Specify requirements for the records, related records and the relationship to be returned after the filter.
  • All: Return all the child records. You can specify the depth of relationship.
  • RelationshipNames: Return records related to the specified relationship name.
  • ClassificationData: Return classification details of records. The node appears only when the Query based on Classification Scheme check box is selected in the Advanced tab.
Note: The node appears only when Command Qualifier is set to NONE, and the selected repository is defined with relationship or classification.
Request Parameters If you have specific custom parameters, specify the custom request parameters. For more information on the Request Parameters, refer to TIBCO MDM REST Services Guide and TIBCO MDM REST Swagger Online Help.

Output

The following is the output for the activity. The response displays the record bundle hierarchy as well as the JSON payload.

Output Item Description
Result The execution result to indicate whether the execution has succeeded or not.
This node contains the following three elements:
  • Severity: Can be Error, Warning, or Info.
  • Code: The error code.
  • Description: A readable description of the error.
Records / RelatedRecords ( if related records search type and command qualifiers are used)
Response Detailed information of the Repository and ResultList:
  • Repository: Contains the repository attributes and relationship information.
  • ResultList: Contains response JSON. The response displays the record bundle hierarchy as well as the JSON payload.
ReturnCount Returns a total count of matching records specified in a repository in the response.
  • Total Count: The total number of matching records that are displayed in the response.