Process Correlation
xCP 1.x compatible
You can use external systems or technologies using a variety of transmission protocols (e.g. SMTP, FTP or Java Messaging Services).
Correlation identifiers are similar to the r_object_id attribute and implemented as a 32 character string containing hexadecimal letters.
The Process Integrator handel two types of communication:
- Synchronous – a request is sent and the response is immediately received (no real time, negligible delay)
- Asynchronous a request is sent, but the answer might never be received or will be received at a later time
Correlation ID vs. Correlation Set
Correlation ID explained using the example of the email activity.
The correcation idenifier can be embedded in the subject header of an outgoing email. The email inbound activity parsed the Subject header and extract the correlaction identifier.
Positve: easy and fast to use
Negative: Subject header of the incomming email could only contain the correlation identifier and no other additional text. If the matching process instance is not found a correlation error occurs:
ERROR com.documentum.bps.email.inbound.runtime.EmailTask - Could not process the message for 'Process - simple_email_action Activity - Email Inbound - Step' Listener: 'Process - simple_email_action Activity - Email Inbound - Step' Workflow: 'null' - 'null' Workitem: 'null' Process: 'simple_email_action' - '4bde75d18000853d' Activity: 'Email Inbound - Step' - '4cde75d1800082b2' - Activity Template: 'Email Inbound - Step' com.documentum.bps.inbound.WorkflowNotAvailableException: Workflow not found
Correlation Set
The correlation set can be defined in the Process Properties in the Advanced tab. The set can contain process variables and structured data taypes. Process Parameters or Package informations are not allowed and available.
The Process integrator will always attempt to use a correlation identifier (not correlation set). If the ID is not available the preconfigured correlation set will be used.
Remember: a correltion identifier in the email subject is not an effective way to match the correct process instance.
Best practice is to create a additional set of Process variables. One of these variables is named message_ID or transaction_ID and contains the internal identifier of the outbound SMTP activity. In the email inbound step the email attribute Reference will be mapped to the Correlation Set attribute transaction_ID (ref. screenshot).
Table: Protocol and correlation ID
protocol | communication type | Correlation ID |
---|---|---|
asynchronous | Correlation Header | |
FTP | asynchronous | Correlation Pattern |
HTTP | synchronous * | Correlation Property |
Web Services | synchronous * | |
Java Messaging Services | asynchronous | |
DQL | synchronous | |
SQL | synchronous | |
* can be uses in an asynchronous fashion |
Additional information: Process Integrator page and Understanding Process Data article