Sunday, May 25, 2014
Wait step type is used to capture the event for which it is waiting for and execute the subsequent step .
Scenario : Sales order is created and the associated workflow gets triggered . In meantime any body changed that sales order , hence as per business process the current workflow should get completed .
  • Save the workflow .
  • Create the container element of Business object ( BUS2012)
  • Click on Hat symbol
  • Define the start event through which the workflow will get triggered.
  • Activate the linkage by Double Clicking on it and it will turn green. Also activate the binding by clicking on it.
  • One icon would appear as shown below.
  • Right Click on the branch to create the fork step.
  • Choose the fork step.
  • Provide the details as shown below
  • In one of the branch of the fork create the user decision step.
  • In the second branch create the Wait step.
  • Choose the Business object from the container element.
  • Choose the event Changed from the F4 help , which means whenever the Changed event of the corresponding business object for that sale order will get fired this wait for event will capture that event and will complete the step.
  • Now go to transaction code SWUE and trigger the CREATED event of BOR BUS2032 and provide the sales document no as 292.
  • Once triggered go to SWEL to see that that workflow has captured event .
  • Go to work-item 
  • Go to graphical log
  • Here we can see that two branches have bee executed in parallel and the user decision step has been executed and corresponding work-item is waiting in Inbox
  • Now change the sales order ( 292) in VA02
  • Now go to SWIA to check the same work-item.
  • Now we can see that wait step has captured the changed event of BOR BUS2032 for sales document 292 and has completed the step. Now the User decision step has got logically deleted since the fork has been completed ( Necessary branch has been defined as 01). Thus wait step has been executed first thus the fork was ended. Since the sales document was changed meanwhile when it was present approver to approve thus we can use the below example to complete the current workflow.
  • How to start the new workflow ? Add CHANGED event of BUS2032 in start event step. It will start the new session of workflow with changed data.

4 comments:

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.