ProcessBuilder: Process Correlation

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.

The correlation identifier is embedded in the email subject. The correlation ID must be set in the Input Message Mapping window of the SMTP activity.
The name of the correlation ID, in this example $transaction must be set in the email inbound activity.

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

Only process variables or properties of the SDT are selectable.

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

Displayed the second page of the activity Inspector of the Email inbound activity. The attribute ‘Reference’ is mapped to the correlaction set attribute ‘transaction_ID’

 

Table: Protocol and correlation ID

protocolcommunication typeCorrelation ID
EmailasynchronousCorrelation Header
FTPasynchronousCorrelation Pattern
HTTPsynchronous *Correlation Property
Web Servicessynchronous *
Java Messaging Servicesasynchronous
DQLsynchronous
SQLsynchronous
* can be uses in an asynchronous fashion

Additional information: Process Integrator page and Understanding Process Data article

Ein Gedanke zu “ProcessBuilder: Process Correlation

  1. Pingback: What is a Web Service ?

Keine Kommentare möglich.