Gyan Factory

Gyan Factory
SAP Technical Project Support

Tuesday, January 5, 2016

Workflow : Demo5- Using workflow container elements!


Step1. Here we have a simple work flow with a send mail step. The WF is triggered by object oriented technique. 
In the send mail step, the text of the mail body should come from the program which is dynamic and passed to the mail body and a mail is sent to the user inbox. 
Hence the post uses the use of work flow container element to hold the mail body text passed at the run time from the program to the work flow.






Step2. So we have the below class with an event 'START_WF' and let's define parameters.


Step3.  Here we have defined the parameters.


Step4. Here is the attribute of the calss.


Step5. Teh constructor method is defined as follows.

Step6. Now we have the TRIGGER_START_WF Method.


Step7. Put the below code. Trigger the start event which will start the workflow with exporting the parameter 'EV_TEXT' with some text value.


Step8. Go to Tx- SWDD. Create a container element to hold the text.








Step9. Select import and export and continue.

Step10. Again create one more container element to establish the relation ship with the triggering class.


Step11. Choose Import/Export and continue.


Step12. Go to the header of the work flow to maintain the start event which will trigger the work flow.



Step13. Provide the class name and the event and click on Binding.

Step14. Here we do the binding . The event export parameter with the work flow container element and object binding. Click Continue.


Step15. Activate the start event and Save . go back.


Step16. Create a mail step and double click on that.



Step17. provide the mail subject and the Body. In the body put the container element place holder. Continue.

Step18. Activate the work flow.


Step19. So here is a small program that triggers the work flow.


Step20. After execution the work flow is triggered.

 














Step21. In Tx- SBWP we can see the mail and double click on it.

Step22. So here the mail body details.


Step23. Go to Tx- SWI1.









Step24. Execute.


Step25. Select the work flow and click on the icon.

Step26. Select the contents.


Step27. Here we can see the container elements and click on the graph icon.


Step28. So we traced that the mail is successfully send with the container element bindings.

No comments:

Post a Comment