A_CorrelateAndUpdateRel
This action provides a generic way to correlate an inbound response transaction back to a request (outbound) transaction, which ultimately links back to a master (inbound) transaction, creates the object - object relationships and raises appropriate events for each one.
To better understand how this action works, it is best to identify the FTM objects involved. These are:
- The Response PT - This is the Inbound Physical Transmission of the reply message.
- The Response Txn - This is the Inbound Transaction object for the reply message.
- The Request Txn - This is the Outbound Transaction object for target system. This is the object that the Response Txn is replying to.
- The Request PT - This is the Outbound Physical Transmission of the request message.
- The Master Txn - This is the original Inbound Transaction that initiates the process.
A typical scenario for a single transaction request/response would be as follows: An action processing the Master Txn, driven by an Inbound Transaction FSM, creates the Request Txn and raises an event. This event triggers an action orchestrated by the Generic Outbound Transaction FSM and causes the Request PT to be created and this message is sent to the target system (via an outbound mapper), orchestrated through the Generic Outbound Physical Transmission FSM. The target system responds and FTM processes this response as the Response PT, via the Generic Inbound Physical Transmission FSM. As part of this process, an appropriate inbound mapper is called to transform the Response PT and, through the EndMapper component, a Response Txn is created and an event is raised. This event triggers the Generic Inbound Acknowledgment Transaction FSM and as part of this orchestration, this action 'A_CorrelateAndUpdateRel' is triggered to process the Response Txn.
How correlation is done is based on the value that is set in the TXN_CLASS column on the Response Txn. This value is set by the inbound response txn mapper and the orchestration is handled by the Generic Inbound Acknowledgment Transaction FSM. The documentation in the action code describes the difference between the possible values for TXN_CLASS and how correlation works for each. It is worth noting that typically, when using MQ, whatever value is used for correlation is set on the MQMD Msg Id of the outbound (request) message, and the target system will take this value and assign it to the MQMD.Correlation Id on the response message. It is up to the response txn mapper to take the value on the MQMD.Correlation Id and assign it to the correct column on the Inbound object.
See the documentation in the action code for a more technical description of this action.