294 Smart SOA Solutions with WebSphere Enterprise Service Bus Registry Edition V7.5
4. Select Return all matching endpoints and set alternate routing targets as
the Match Policy, as shown in Figure 8-42.
Figure 8-42 Configuring the Endpoint Lookup primitive
Integrating SLA Check primitive
To add an SLA check to the mediation flow implementation, go to the Palette in
the ACS_Proxy implementation tab and complete these steps:
1. Open Routing, and drag the SLA Check mediation primitive onto the wire
between the EndpointLookupACS mediation primitive and the Callout node.
2. Rename the SLA Check mediation primitive to SLACheckACS.
Chapter 8. Implementing a mediation 295
The SLACheckACS mediation primitive is now wired and named in the mediation
flow as shown in Figure 8-43.
Figure 8-43 Adding the SLA Check primitive
The SLACheckACS mediation primitive looks for active AccountCreationV1_0
service SLAs in the WSRR instance. To configure the primitive:
1. Click the SLACheckACS mediation primitive, and go to the Properties view.
Then, select the Details tab.
2. Set the following expression for the Consumer ID:
3. Set the following expression for the Context ID:
296 Smart SOA Solutions with WebSphere Enterprise Service Bus Registry Edition V7.5
The properties for the SLACheckACS mediation primitive are now configured as
shown in Figure 8-44.
Figure 8-44 Configuring the SLA Check primitive
Configuring Callout node
To ensure that the Callout node uses the dynamically retrieved endpoints, follow
1. Click the Callout node, and go to the Properties tab. Then, select the Details
2. Ensure that the Use dynamic endpoint if set in the message header option
is selected as shown in Figure 8-45.
Figure 8-45 Configuring the Callout node
Specifying the path to Consumer ID and Context ID: The soapHeader
uses the GEPHeaderBO created in the AccountCreationService_Med_Lib
library module. To specify the path to Consumer ID and Context ID, you can
either enter the values manually or use the Edit button and the XPath
expression builder to assist you.
Chapter 8. Implementing a mediation 297
3. To use alternate endpoints retrieved and set in the message header, go to the
Retry tab. Select the Any fault entry from the Retry on drop-down list. Set the
retry count to the value of 3, and select the Try alternate endpoints options
to perform a retry for the next three endpoints, as shown in Figure 8-46.
Figure 8-46 Configuring the Callout node’s retry properties
4. The AccountCreationService_Med mediation module has now implemented a
basic dynamic endpoint lookup and an SLA validation for the first retrieved
endpoint. Save changes in all open editors.
Adding Trace and Fail primitives
For the purpose of this book, we add basic logging and error handling
capabilities to the mediation flow. We add tracing as a first step in the mediation
flow to log the incoming message and to trace the last step in the mediation flow
to log the outgoing message. The Fail primitive terminates the mediation flow in
case of no matching endpoints, a rejection of the SLA check, or in case of failure
of the EndpointLookupACS or SLACheckACS mediation primitive. Before the Fail
primitive we add another trace primitive to log the failure message.
Figure 8-47 shows the complete ACS_Proxy mediation flow.
Figure 8-47 Adding trace primitives and a fail primitive