Follow Our Example User Story

Now that David has handled the form data, the order data should be sent to the ERP system. You are going to help him to implement this with a service task. A  Service Task is executed automatically when the process reaches it and the process continues to the next element when the execution ends. In contrast to a User Task , no manual intervention by a user is required for service tasks.

Please note that we do not connect to a real ERP system. Service task Create order in ERP system is only a dummy for demonstration purposes.


Click on service task () Create order in ERP system . Order creation is done in two steps:

  1. map the order from the web system to ERP
  2. create the order in the ERP

Map the Order Data to ERP (Dummy)

Select service task Create order in ERP system to display the related execution diagram. Open the library ERPOrderInterface in the Libraries folder.

Select operation mapOrderData from library ERPOrderInterface > ERP > ERPOrder . Drag and drop the operation to the action flow in the execution canvas.

You can also use the search in the service panel to find the necessary operations, classes etc. and drag them from the hit list to the execution diagram.


The operation has been added to the action flow of the execution UML. Operation mapOrderData needs an incoming object and provides an outgoing object.

The incoming object must be WebShopOrder . This is the order data coming from the form you have persisted to variable webShopOrder .

Click on the  icon in the Persisted section and select variable webShopOrder from the list of available persisted variables.

Connect the selected variable with pin webShopOrder of operation mapOrderData .

Drag and drop class ERPOrder ( ERPOrderInterface > ERP > ERPOrder ) to the Persisted section of the execution canvas.

This creates one more persisted variable ( erpOrder : ERPOrder ) to store the mapped order data returned by the mapOrderData operation.


Connect the newly created variable erpOrder with the corresponding output pin.

The mapping of order data is done. Now you can send the order data to the ERP system.

 


Select operation createOrder from library ERPOrderInterface > ERP > ERPOrder . Drag and drop the operation to the action flow after mapOrderData .

Provide erpOrder as input data to createOrder by drawing the object flow as depicted.
  • No labels