REST AddModify

By using the REST AddModify (Record) activity, you can add, modify, or lookup a record. If the record does not exist, a new record is created. If the record exists, the existing record is updated.

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 RESTAddModify.

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.

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.
Execution Mode Yes The default execution mode is SYNCHR.
  • SYNCHR: The client invokes a service and waits for the completion of the workflow execution.
  • ASYNCHR: The client invokes a service but does not wait for the completion of the workflow execution.
Repository Yes The name of repository where records are stored.

Click 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 at TIBCO_HOME\studio\version\eclipse.
Record State Yes The state in which you want to save the record. The default record state is Unconfirmed. See also, Record Lookup.
  • Confirmed: Save as confirmed records.
  • Unconfirmed: Save as unconfirmed records.
  • Draft: Save as draft records.
Command Qualifier Yes The default command qualifier is Validate/Process.
  • Validate/Process: Validates records, saves them, and then initiates the New Record Introduction Edit workflow.
  • Validate/NoProcess: Validates records and saves them without initiating the New Record Introduction Edit workflow.
  • NoValidate/Process: Saves records without validation and initiates the New Record Introduction Edit workflow.
  • NoValidate/NoProcess: Saves records without validation nor initiation of the New Record Introduction Edit workflow.
Note: When Record State is set to Draft, only Validate/Process and NoValidate/Process are available.
File Type Attributes Yes Specify how to upload a file with file type attributes. This field is available when any attribute defined in the selected repository model is a file type attribute. By default, the attribute is ATTACHMENT.
  • ATTACHMENT: Indicates that the client sends the file as SOAP attachments to the MDM server.
Note: Currently, only the ATTACHMENT attribute is supported.
Add/Modify Mode Yes Select the mode. The default option is Add Modify.
  • Add Only: Creates a record if the record does not exist. However, if the record exists, this activity does not update it. A response is returned with appropriate message about the existence of the record.
  • Modify Only: Updates an existing record. However, if the record does not exist, this activity does not create a record. A response is returned, informing that the record is not found.
  • Lookup Only: Searches for the record but does not perform any action on the record. Returns true or false depending on whether or not the record was found.
  • Add Modify: If the record does not exist, this activity creates a record. If the record exists, it updates the existing record. The lookup identifiers and values are displayed in the input for this mode.

Description

Provide a short description for the activity.

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
Context The standard context variables which are supported for add and modify operations. Refer to General Input for MDM Activities. To modify records in a work item context, provide a context variable WORKITEMREFERENCE and the associated work item ID. You should have the permission Edit when a record is in workflow.
Record
The RecordLookup section is for collecting the information needed for looking up a record in TIBCO MDM. You can look up a record by the internal MDM key or an external lookup identifier.
  • MDMKey: Using the MDM key, you can look up a record. An MDM key is a combination of record ID and IDEXTENSION. To look up a record, specify PRODUCTID and PRODUCTIDEXT in the fields. To look up a record with no PRODUCTIDEXT, you must enter pair of a single quotation mark (') in the PRODUCTIDEXT field.
  • LookupIdentifier: As an alternative to MDM key, you can also look up a record by an external identifier such as loyalty ID, customer ID, and reward ID. It must be an attribute that is unique to a particular record. Specify the unique attribute name and its value.

    For detailed information on the record look up values, refer to Note specified in the Record Lookup section.

    For more information about add and modify modes, see REST AddModify Use Cases.

  • RepositoryName: Specify PRODUCTID and PRODUCTIDEXT.
    • PRODUCTID: Record ID. When PRODUCTID is not specified, a PRODUCTID is generated automatically if users have configured rulebase on the MDM server; otherwise, the error message Record ID cannot be empty is displayed.
    • PRODUCTIDEXT: Record ID extension. Optionally used to identify a record.
    • Unassigned, System or New Group. The default attribute group UNASSIGNED holds all attributes that do not belong to any specific group.
    • Relationship: Specify the relationship of records in repositories. After selecting an available relationship name, you can specify the corresponding relationship attributes and attributes in the target repository.
  • Request Parameters: If you have specific custom parameters, specify the custom request parameters. For information on the request parameters, refer to TIBCO MDM REST Services Guide and TIBCO MDM REST Swagger Online Help.
  • Message Headers: If you have specific custom headers, specify those in the custom header fields. For information on the headers accepted by REST service, 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
Repository Name Name of the repository.
ProductID An ID of the record.
ProductIDExt Record ID extension. Optionally, used to identify a record.
ResponseAttributes Contains the repository attribute names and their values. Also, contains errors, warnings, or informational messages. This element has one or more entries.
Relationships Contains the following relationship information:
  • SourceRepository
  • TargetRepository
  • RelatedRecordID
  • RelatedRecordExtension
  • ResponseAttributes
Success A Boolean for success. true or false. The result of a record to indicate if the command has succeeded or not.

Fault

The server and client errors which result in activity exceptions are displayed in the Fault tab.