Develop > Controller layer > Integrate with back-end systems and external applications > Distributed Order Management (DOM) integration > Accept a WebSphere Enterprise Service Bus (WESB) mediation module for DOM integration
Define the ProcessInventoryRequirement mediation flow
The connections are created to define the mediation flow between the ProcessInventoryRequirement operation of WebSphere Commerce and the updateInventoryReservations and cancelInventoryReservations operations of the External OMS Simulator.
Procedure
- In the mediation flow diagram for Request: ProcessInventoryRequirement, right-click a blank spot and select Add > Message Filter to add a Message Filter primitive.
- Change the name of the Message Filter primitive to ActionCodeFilter.
- In the Properties view, select the Terminal tab.
- Select the match2 output terminal and change the terminal name to ReserveInventory.
- Right-click Output terminal and select Add Output Terminal.
- Change the terminal name to CancelInventoryReservation and click OK:
- Add the following primitives:
Primitive names and types to add
Name Type ProcessInventoryRequirement_updateInventoryReservationsRequest XSL Transformation ProcessInventoryRequirement_cancelInventoryReservationsRequest XSL Transformation BadActionCode Fail
- Connect the following terminals:
Terminal connections to create
From To ProcessInventoryRequirement : InventoryServicesPortType – out ActionCodeFilter – in ActionCodeFilter – ReserveInventory ProcessInventoryRequirement_updateInventoryReservationsRequest – in ActionCodeFilter – CancelInventoryReservation ProcessInventoryRequirement_cancelInventoryReservationsRequest – in ActionCodeFilter – default BadActionCode – in ActionCodeFilter – fail BadActionCode – in ProcessInventoryRequirement_updateInventoryReservationsRequest – out updateInventoryReservations : ExtOMSSimPartner – in ProcessInventoryRequirement_cancelInventoryReservationsRequest – out cancelInventoryReservations : ExtOMSSimPartner – in
- Select the ActionCodeFilter Message Filter primitive.
- In the Properties view, select the Details tab and click Add.
- Enter the following patterns and terminal names and click Finish after entering each pattern and terminal name:
Patterns and terminal names to enter
Pattern Terminal name /body/ProcessInventoryRequirement/DataArea/Process/ActionCriteria[1]/ActionExpression[1]/@actionCode='ReserveInventory' ReserveInventory /body/ProcessInventoryRequirement/DataArea/Process/ActionCriteria[1]/ActionExpression[1]/@actionCode='CancelInventoryReservation' CancelInventoryReservation
- Create the XML Map for the ProcessInventoryRequirement_cancelInventoryReservationsRequest XSL Transformation primitive.
- In the XML Map, create a custom transformation between the body elements using the custom ExtOMSSimMediationModule > xslt > custom > ProcessInventoryRequirement_cancelInventoryReservationsRequest.xsl XSL file.
- Select the BodyToBody template and select body as the value of the body parameter.
- Select File > Save.
- Close the XML Map Editor.
- In the mediation flow diagram for Response: ProcessInventoryRequirement, add the following primitives:
Primitive names and types to add
Name Type updateInventoryReservationsResponse_AcknowledgeInventoryRequirement XSL Transformation cancelInventoryReservationsResponse_AcknowledgeInventoryRequirement XSL Transformation updateInventoryReservationsFailed Fail cancelInventoryReservationsFailed Fail
- Connect the following terminals:
Terminal connections to create
From To updateInventoryReservations : ExtOMSSimPartner – out updateInventoryReservationsResponse_AcknowledgeInventoryRequirement – in cancelInventoryReservations : ExtOMSSimPartner – out cancelInventoryReservationsResponse_AcknowledgeInventoryRequirement – in updateInventoryReservationsResponse_AcknowledgeInventoryRequirement – out ProcessInventoryRequirement : InventoryServicesPortType – in cancelInventoryReservationsResponse_AcknowledgeInventoryRequirement – out ProcessInventoryRequirement : InventoryServicesPortType – in
- Create the XML Map for the updateInventoryReservationsResponse_AcknowledgeInventoryRequirement XSL Transformation primitive.
- In the XML Map, create a custom transformation between the body elements using the custom ExtOMSSimMediationModule > xslt > custom > updateInventoryReservationsResponse_AcknowledgeInventoryRequirement.xsl XSL file.
- Select the BodyToBody template and select body as the value of the body parameter.
- Select File > Save.
- Close the XML Map Editor.
- Create the XML Map for the cancelInventoryReservationsResponse_AcknowledgeInventoryRequirement primitive.
- In the XML Map, create a custom transformation between the body elements using the custom ExtOMSSimMediationModule > xslt > custom > cancelInventoryReservationsResponse_AcknowledgeInventoryRequirement.xsl XSL file.
- Select the BodyToBody template and select body as the value of the body parameter.
- Select File > Save.
- Close the XML Map Editor.
Previous topic: Define the GetInventoryAvailability mediation flow
Next topic: Generate SOAP/HTTP bindings for the imports and exports