Defining 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

  1. In the mediation flow diagram for Request: ProcessInventoryRequirement, right-click a blank spot and select Add > Message Filter to add a Message Filter primitive.
  2. Change the name of the Message Filter primitive to ActionCodeFilter.
  3. In the Properties view, select the Terminal tab.
  4. Select the match1 output terminal and change the terminal name to ReserveInventory.
  5. Right-click Output terminal and select Add Output Terminal.
  6. Change the terminal name to CancelInventoryReservation and click OK:

    New Dynamic Terminal window

  7. Add the following primitives:
    Primitive names and types to add
    Name Type
    ProcessInventoryRequirement_updateInventoryReservationsRequest XSL Transformation
    ProcessInventoryRequirement_cancelInventoryReservationsRequest XSL Transformation
    BadActionCode Fail
  8. 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

    Terminal connections to create

  9. Select the ActionCodeFilter Message Filter primitive.
  10. In the Properties view, select the Details tab and click Add.
  11. 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
  12. Create the XML Map for the ProcessInventoryRequirement_cancelInventoryReservationsRequest XSL Transformation primitive.
  13. In the XML Map, create a custom transformation between the body elements using the custom ExtOMSSimMediationModule > xslt > custom > ProcessInventoryRequirement_cancelInventoryReservationsRequest.xsl XSL file.
    1. Select the BodyToBody template and select body as the value of the body parameter.
    2. Select File > Save.
    3. Close the XML Map Editor.
  14. 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
  15. 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

    Terminal connections to create

  16. Create the XML Map for the updateInventoryReservationsResponse_AcknowledgeInventoryRequirement XSL Transformation primitive.
  17. In the XML Map, create a custom transformation between the body elements using the custom ExtOMSSimMediationModule > xslt > custom > updateInventoryReservationsResponse_AcknowledgeInventoryRequirement.xsl XSL file.
    1. Select the BodyToBody template and select body as the value of the body parameter.
    2. Select File > Save.
    3. Close the XML Map Editor.
  18. Create the XML Map for the cancelInventoryReservationsResponse_AcknowledgeInventoryRequirement primitive.
  19. In the XML Map, create a custom transformation between the body elements using the custom ExtOMSSimMediationModule > xslt > custom > cancelInventoryReservationsResponse_AcknowledgeInventoryRequirement.xsl XSL file.
    1. Select the BodyToBody template and select body as the value of the body parameter.
    2. Select File > Save.
    3. Close the XML Map Editor.