To add the <wait> activity to the BookOrderManagementBPEL process, we need to do the following:
Open the BookOrderManagementBPEL process by double-clicking it in the process tree.
Drag-and-drop the <wait> activity from the Components palette to the BPEL process. You will find the <wait> activity under Basic Activities. Drop it immediately after the <invoke> activity of InvokeBookWarehousing and before the <invoke> activity of IncreaseCounter.
Double-click the <wait> activity. The Edit Wait dialog will open. Set the For Time as 2 seconds and rename the activity from Wait1 to Wait2sec:
What just happened?
We have modified our BookOrderManagementBPEL process to wait for 2 seconds after each invocation of the BookWarehousingBPEL process. This has resulted in the following source code:
Have a go hero – test the process
It's your turn now. You should deploy and test the BookOrderManagementBPEL process and observe whether it really waits after each invocation (notice that the total execution time will increase).