Configuring Services Between Milestones

24-14 Developers Guide for Oracle Application Integration Architecture Foundation Pack Figure 24–2 and Figure 24–3 illustrate a few possible milestone locations across an integration flow. Figure 24–2 Integration Flow in Which the Receiver Target Milestone is the Target Participating Application Figure 24–3 Integration Flow in Which the Receiver Target Milestone is Within the Global Transaction Space

24.5.3 Configuring Services Between Milestones

This section includes the following topics: ■ Section 24.5.3.1, Populating Message Resubmission Values ■ Section 24.5.3.2, Configuring All Services to Participate in a Single Global Transaction Completing these activities will ensure that the services between milestones are configured to provide error handling and recovery for the asynchronous MEP to ensure guaranteed message delivery.

24.5.3.1 Populating Message Resubmission Values

These parameters in the EBM header must be populated in the JMS consumer service transformation: ■ SenderResourceTypeCode Indicates the type of resource or system in which the rolled-back message is stored, whether Queue or Topic. ■ SenderResourceID Identification of the resourcesystem of type SenderResourceTypeCode. ■ SenderMessageID Identification of the message persisted in the resourcesystem associated with type SenderResourceTypeCode. Configuring Oracle AIA Processes for Error Handling and Trace Logging 24-15 Scenario 1 When an ABM in the JMS Queue or Topic is triggering the JMS Consumer Service, then the preceding information needs to be passed to the requester ABCS as a part of the ABM header. For more information, see Section 24.5.3.1.1, Populating the ABM with Message Resubmission Values in JMSConsumerAdapter. In the JMS Consumer Service, this information needs to be configured to be sent to the ABM header. In the requester ABCS, this information is extracted from the ABM header and sent to the EBM header in the transformation. For more information, see Section 24.5.3.1.2, Populating the EBM Header with Resubmission Values in the Requester ABCS. Scenario 2 When an EBM in the JMS Queue or Topic is triggering the JMS consumer service, use an EBM-to-EBM transformation and populate overwrite the resubmission values in the EBM message. The following values in the EBM header fields of the inbound message should be overwritten with the new values for the ResourceType, Resource Name, and JMS Message ID pertaining to the current milestone. ■ corecom:SenderResourceTypeCode ■ corecom:SenderResourceID ■ corecom:SenderMessageID Example 24–10 provides sample code snippet from the EBM-to-EBM XSL. Example 24–10 EBM-to-EBM XSL Code Example corecom:IntermediateMessageHop corecom:SenderResourceTypeCode xsl:value-of select=custebo:CreateCustomerPartyListEBMcorecom: EBMHeadercorecom:FaultNotificationcorecom:FaultMessagecorecom: IntermediateMessageHopcorecom:SenderResourceTypeCode corecom:SenderResourceTypeCode corecom:SenderResourceID xsl:value-of select=custebo:CreateCustomerPartyListEBMcorecom: EBMHeadercorecom:FaultNotificationcorecom:FaultMessagecorecom: IntermediateMessageHopcorecom:SenderResourceID corecom:SenderResourceID corecom:SenderMessageID xsl:value-of select=mhdr:getPropertyin.property.jca.jms. JMSMessageID corecom:SenderMessageID corecom:IntermediateMessageHop

24.5.3.1.1 Populating the ABM with Message Resubmission Values in JMSConsumerAdapter

Ensure that the ABM is enriched with the following content: ■ The unique Message ID. The JMSMessageID in the JMS header is used as the value. ■ The resource name. This is the JMS QueueTopic name. This is the same as the svcdoc: ResourceName value in the JMSConsumerAdapters composite.xml. ■ The type of the resource. The possible values are Queue or Topic. 24-16 Developers Guide for Oracle Application Integration Architecture Foundation Pack Use specifically designated fields in the ABM for this purpose. These fields are identified at the time of design. Within the mediator-based JMSConsumerAdapter: ■ Use the transformation step in the mediator routing rule. ■ In the XSL used by the transformation, assign the values of the JMS Message ID, Resource Name, and Resource Type to the specifically designated fields of the ABM. Example 24–11 illustrates how to assign the JMS Message ID to the ABM. Example 24–11 Example of How to Assign the JMS Message ID to the ABM xsl:attribute name=MessageId xsl:value-of select=mhdr:getPropertyin.property.jca.jms.JMSMessageID xsl:attribute Note that in this example, the assumption is that the ABM has a specific attribute, MessageId, to which the JMS Message ID is assigned. In some cases, only one designated field may be available in the ABM. In such scenarios, concatenate the values of the JMS Message ID, Resource Name, and Resource Type and assign the value to the specific designated field of the ABM. While concatenating these values, we recommend using :: as the separator. For example, consider a Siebel Customer ABM, ListOfCmuAccsyncAccountIo. In this ABM, assume that the MessageId attribute of the ListOfCmuAccsyncAccountIo element is designated to hold the information about JMS Message ID, Resource Name, and Resource Type at design time. Example 24–12 illustrates how to concatenate the data and assign it to the ABM. Example 24–12 Example of How to Concatenate Data and Assign it to the ABM xsl:attribute name=MessageId xsl:value-of select=concatmhdr:getPropertyin.property.jca.jms. JMSMessageID,:: SampleQueue,::Queue xsl:attribute

24.5.3.1.2 Populating the EBM Header with Resubmission Values in the Requester ABCS When

the ABM arrives at the requester ABCS, it contains the JMS Message ID, Resource Name, and Resource Type values because these values were already made available in the designated fields of the ABM. Extract these values from the ABM and enter the following elements in the EBM header within the corecom:IntermediateMessageHop element: ■ corecom:SenderResourceTypeCode: Populate it with the Resource Type value ■ corecom:SenderResourceID: Populate it with the Resource Name value ■ corecom:SenderMessageID: Populate it with the JMS Message ID value Tip: Ensure that the corecom: FaultNotification element is inserted into the EBM header when transforming the ABM to the EBM. Configuring Oracle AIA Processes for Error Handling and Trace Logging 24-17 The XSL that performs the ABM-to-EBM transformation should accomplish this task. The task is straightforward when three different ABM fields are designated for holding the three resubmission values, as shown in Example 24–13 . Example 24–13 Example Illustrating Three ABM Fields Used to Hold Three Resubmission Values corecom:IntermediateMessageHop corecom:SenderResourceTypeCode xsl:value-of select=[xpath to the ABM field holding the ResourceType] corecom:SenderResourceTypeCode corecom:SenderResourceID xsl:value-of select=[xpath to the ABM field holding the Resource Name] corecom:SenderResourceID corecom:SenderMessageID xsl:value-of select=[xpath to the ABM field holding the Message Id] corecom:SenderMessageID corecom:IntermediateMessageHop The following content discusses how resubmission values are extracted from the ABM and assigned to the EBM header when all three resubmission values are concatenated and assigned to a single designated field in the ABM. For example, consider a Siebel Customer ABM, ListOfCmuAccsyncAccountIo. In this ABM, assume that the MessageId attribute of the ListOfCmuAccsyncAccountIo element has been designated to hold the information about the JMS Message ID, Resource Name, and Resource Type, concatenated using :: as a separator. See the previous section for more information. Example 24–14 provides a code snippet that will extract the resubmission values and assign them to EBM header elements. Example 24–14 Code Used to Extract Resubmission Values and Assign Them to EBM Header Element xsl:variable name=MsgId xsl:value-of select=substring-afterseblcustabo:ListOfCmuAccsyncAccountIo MessageId,:: xsl:variable corecom:IntermediateMessageHop corecom:SenderResourceTypeCode xsl:value-of select=substring-afterMsgId,:: corecom:SenderResourceTypeCode corecom:SenderResourceID xsl:value-of select=substring-beforeMsgId,:: corecom:SenderResourceID corecom:SenderMessageID xsl:value-of select=substring-beforeseblcustabo:ListOfCmuAccsync AccountIoMessageId,:: corecom:SenderMessageID corecom:IntermediateMessageHop The XSL that performs the ABM-to-EBM transformation should accomplish this task. For more information about resubmitting messages, see Using the Message Resubmission Utility in Oracle Fusion Middleware Infrastructure Components and Utilities Users Guide for Oracle Application Integration Architecture Foundation Pack. 24-18 Developers Guide for Oracle Application Integration Architecture Foundation Pack

24.5.3.2 Configuring All Services to Participate in a Single Global Transaction

Configure a single global transaction as follows: ■ Ensure that no commit points are between two milestones. ■ Ensure that the work done between two milestones is one logical unit of work. For more information about configuring the global transaction, see Chapter 10, Designing and Developing Enterprise Business Services , Chapter 11, Designing Application Business Connector Services , Chapter 12, Constructing the ABCS , and Chapter 15, Designing and Constructing Enterprise Business Flows.

24.5.4 Guidelines for BPEL Catch and Catch-All Blocks