Defining the ProcessOrder mediation flow

The connections are created to define the mediation flow between the ProcessOrder operation of WebSphere Commerce and the createOrder operation of the External OMS Simulator.

Procedure

  1. In the Operation connections section of the Mediation Flow Editor, navigate to the ExtOMSSimMediationModule view.
  2. Select OrderServicesPortType > ProcessOrder. At the bottom of the view, the empty mediation flow diagram for Request: ProcessOrder is displayed:

    Empty process order mediation flow

  3. In the mediation flow diagram, right-click a blank spot and select Add > XSL Transformation. An XSL Transformation primitive named XSLTransformation1 is added to the mediation flow diagram.
  4. Select the Properties tab.
  5. In the Properties view, change the name of the XSL Transformation primitive to ProcessOrder_createOrderRequest.
  6. Navigate your mouse cursor over the out terminal of the ProcessOrder : OrderServicesPortType input node and drag it to the in terminal of the ProcessOrder_createOrderRequest primitive. A connection between the out terminal of the ProcessOrder : OrderServicesPortType input node and the in terminal of the ProcessOrder_createOrderRequest XSL Transformation primitive connection is created.

    Connection between ProcessOrder : OrderServicesPortType and ProcessOrder_createOrderRequest

  7. Repeat the connection process in step 6 to connect the following terminals:
    Terminal connections to create
    From To
    ProcessOrder_createOrderRequest – out createOrder : ExtOMSSimPartner – in

    Terminal connections to create

  8. Double-click the ProcessOrder_createOrderRequest XSL Transformation primitive to create the XML Map and click Finish. This opens the XML Map Editor.
  9. Navigate your mouse cursor over the left body element where its connector is visible and drag the connector to the body element on the right. A connection between the left body element and the right body element is created.
  10. Select the Local map transformation.
  11. Click the arrow next to the label and select Custom:

    Select Custom

  12. Select the Properties tab.
  13. In the Properties view, select XSLT.
  14. Click Browse... and select ExtOMSSimMediationModule > xslt > custom > ProcessOrder_createOrderRequest.xsl.
  15. Click OK.
  16. Select the BodyToBody template and select body as the value of the body parameter.
  17. Select File > Save.
  18. Close the XML Map Editor.
  19. In the Mediation Flow Editor, select the Response: ProcessOrder tab to open its empty mediation flow diagram.
  20. In the mediation flow diagram, right-click a blank spot and select Add > XSL Transformation. An XSL Transformation primitive named XSLTransformation1 is added to the mediation flow diagram.
  21. Select the Properties tab.
  22. In the Properties view, change the name of the XSL Transformation primitive to createOrderResponse_AcknowledgeOrder.
  23. Repeat the connection process in step 6 to connect the following terminals:
    Terminal connections to create
    From To
    createOrder : ExtOMSSimPartner – out createOrderResponse_AcknowledgeOrder – in
    createOrderResponse_AcknowledgeOrder – out ProcessOrder : OrderServicesPortType – in

    Terminal connections to create

  24. Double-click the ProcessOrder_createOrderRequest XSL Transformation primitive to create the XML Map and click Finish. This opens the XML Map Editor.
  25. In the XML Map, repeat the connection process in steps 9 through 18 to create a custom transformation between the body elements using the ExtOMSSimMediationModule > xslt > custom > createOrderResponse_AcknowledgeOrder.xsl custom XSL file.
  26. In the Response: ProcessOrder mediation flow diagram, right-click a blank spot and select Add > Fail.
  27. Change the name of the Fail primitive to createOrderFailed.
  28. Connect the fail terminal of the createOrder : ExtOMSSimPartner callout response node to the in terminal of the ProcessOrder : OrderServicesPortType input response node:

    Connect the fail terminals

  29. Select File > Save to save your changes.