转 Demo on working with “Nested / SubWorkflows”
Demo on working with "Nested / SubWorkflows"
By Avinash Palavai, StraVis IT Solutions from Link
Prerequisite : Should have basic idea of worklow and usage of Send Mail and Activity Steps.
1) Go to the transaction SWDD ( Workflow Builder ). By default, it opens the last developed workflow. So click on create to create a new Workflow. Below screen appears.
2) Now create a step “Send Mail”, by double clicking on Undefined Step.
3) Now the below screen appears and, fill the screen as shown below and click on Transfer and to graphic ( ).
4) Now a pop up appears and give the abbreviation and name of the task as below,
5) Your workflow will look like below,
6) Save and activate the workflow, now a workflow no. will be assigned to your workflow as shown below,
7) Now again create a new workflow, repeating the steps (1 & 2) and fill the “Send Mail” step as below,
8) This time give the name as Main workflow as shown below,
9) Your 2nd workflow (Main Workflow) would now appear as below and create an additional step “Activity” to trigger the sub workflow.
10) Now the below screen appears enter the Sub workflow no. (WS99900005) i.e., created above and the step name as shown below and click on Transfer and to graphic ( ).
11) This is how your main Workflow looks like,
12) Save and activate and a Workflow no. will be generated as shown below,
13) Now you can test run the workflow, by clicking on the test ( ), and the below test screen ppears.
14) Click on execute ( ). Now your main workflow and the subworkflow nested in it is also executed.
15) Go to your Business workplace (SBWP) and check the inbox. You will find two mails with the titles
“Mail in Main Workflow” triggered from main WF and “Mail in Sub Workflow” triggered from Sub WF.