Creating an Order Processing Service
This sample describes a simple order processing service where a File Poller activity waits for the BW_new_order.xml file to be updated. After an update is detected, the process creates an empty approval file and calls a sub process to calculate the shipping costs. The process then waits for the empty approval file to be updated. Finally, the BW_customer_notification.txt file with data in XML format is created in the c:\tmp\OrderProcessing folder of the default location, or the path you specified earlier that gives the customer the relevant shipping information.
In a real system, tasks such as database queries, email acknowledgment, and so on would be used to implement this scenario. However, we have chosen to use files for this service to highlight the use of the activities in the file palette.
![](GUID-0E3EC5CE-28FE-4CAB-89B7-44973BF83808-display.png)
Procedure
Result
The waitNotify.log output file at C:\tmp\WaitNotify should have the following content:
The BW_approve_order.txt file is deleted.
Understanding the Configuration
- BW_new_order.xml points to the XML file that contains the new order details and triggers the process initially as Include Existing Files check box option is selected. For consecutive triggers, the file must be updated (overwritten or modified) each time for the sample process to run or the process does not start.
- BW_shipping_costs.xml contains shipping cost information.
- BW_customer_notification.txt is created by the process to notify the customer of the complete shipping details.
- BW_approve_order.txt is created by the process. The file is deleted during process execution.