Using wait event in workflow


 

 

Summary: when the work flow is triggered by the start event, a mail is sent and the work flow completed. The next step is we don’t want to complete the work flow after the mail send. The work flow should wait for a event and when this event occurs then the workflow should be closed.


Step2. Go to the class and add one more event as END_WF. 

Step3. Put the cursor after the mail step and click on create button and select wait event.


Step4. provide the step name, outcome name and click on the F4 against the container element.

Step5. Choose instance cont.

Step6. From the Event choose END_WF and click on binding.

Step7. The is the binding. Click on Continue.

Step8. So here we have finished the wait event step. Activate the work flow.

Step9. Check the Tx- SBWP.

Step10. Go to the class and define one more method ‘TRIGGER_END_WF’ which will raise the event to complete the work flow.

Step11. Define the method. Inside that raise the event.

Step12. So here is the program that starts the wf by triggering the event.

Step13. Choose first and run.

Step14. So here we received a mail . Let’s check the WF if it is still in wait or completed.

Step15. Go to Tx- SWI1 and execute.

Step16. Click on the Icon.

Step17. Click on the graph icon.

Step18. So here’s the work flow status. Its waiting after sending the mail.


Step19. Go back to the program and execute with second option.

Step20. Refresh. Here its completed after the wait event has been triggered by the program.


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s