Beruflich Dokumente
Kultur Dokumente
In this exercise, the sales and purchase orders are created in parallel. If one fails, both orders are canceled. As an extension of this exercise, the creation of the purchase order part is enhanced by a manual compensation in case the creation of the purchase order fails. The exercise uses application and transport acknowledgments of send messages. Moreover, send contexts are used for routing purposes. 1. Collapse the Create Materials block and add a CreateSalesAndPurchaseOrdersBlock block.
4. Create a send step SendPO. Enter PurchaseOrder for the Send Context property. This is important because the routing depends on this send context.
16. Insert a send step Cancel_PO into branch1. Enter CancelPO for the Send Context property.
17. Insert a send step Cancel_SO into branch1. Enter CancelSO as the send context:
21. Test your process: If you use a customer name containing a Y, the response message correlated to the CreatePurchaseOrderMessage from Airline_Group_2 indicates that an error occurred (this is not an application error in XI):
The same is true for the SalesOrder if you use a customer name containing a Z:
Check if your process works. If you use customer names without Y and Z, your Workflow log should look as follows:
If you use customer names with Y and/or Z, your Workflow log should look as follows:
Extension
1. Add a switch step check after the container operation getPOstatus:
2. Insert a block ManualCompensation into branch1 and define the exception TimeOut:
4. Add a control step NoInteraction to this deadline branch, which triggers the TimeOut exception:
5. Add an exception branch to this block, which handles the TimeOut exception:
6. In the Manual Compensation branch, insert a control step POErrorControl, which triggers an alert with the alert message PurchaseOrder could not be created, Run Report SPAREPARTS_MANUALCOMPENSATION in client 813 within the next 60 seconds to compensate manually.
a. Log on to client 813 and prepare to run the SPAREPARTS_MANUALCOMPENSATION report. b. Run your process with a customer containing a Y. c. In the graphical Workflow log, check that the process reaches the ReceivePOAgain step. d. Run the SPAREPARTS_MANUALCOMPENSATION report in client 813. e. Check that the orders are not cancelled due to the manual compensation (run the report, which sends a message to the ReceivePOAgain step).