Working with Container Operation and Loop (Until) Steps - PART2
Note:
- Before reading this document readers must study Part 1 of this document. i. e.( Working with Container Operation and Loop (Until) Steps - PART1 ).
- This document will help us to learn how to execute and analyze a workflow.
- In Part 1 of this document we have seen how to build a workflow with Container Operation and Loop (Until) Steps.
- We have to press execute button(F8) to run the workflow.
3. Now we can see a screen as shown below.
- Input Data Tab.
- Here we have to fill in the importing input parameters.
- _wf_initiator , _wf_priority and _wi_group_id are default parameters.
- lv_counter is the parameter created by us for keeping the loop count
- (This is discussed in Part 1 document->‘ABAP Workflow For Beginners: Working with Container Operation and Loop (Until) Steps-PART1’)
- We can change the value of the ‘lv_counter’ parameter to our desired value.
5. Now we have to press on Execute(F8) to start workflow processing.
- We will get the following status message.
- Graphical Workflow Log:
- This will display a graphical representation of the process flow of our workflow.
- The green path will show the step-by-step execution of the workflow.
- Here we can see that first the loop step will be executed.
- And then the container operation step will be executed, here the decrement of the value of the ‘lv_counter’ element by 1 is performed on every loop execution.
- Then the next step to execute will be the ‘send mail’ activity.
- After the ‘send mail step’, the loop will continue to execute until the ‘lv_counter’ element’s value will be ‘0’.
- Once the ‘lv_counter's value is ‘0’, the loop ends and workflow completes.
- Workflow Chronicle log:
- This log consists of a tree view(technical Details) of the steps executed in a workflow.
- Here in the below figure, we can see that five loops have been executed.
- This is because our ‘lv_counter’ value is ‘5’ and the loop step will loop until the ‘lv_counter’ value is ‘0’( This is discussed in the Part 1 document).
- With the execution of each loop, the ‘lv_counter’ Value will be decremented by 1(That is why the loop will end after 5 executions).
- In technical details (Tree structure) we have 6 tabs.
- Details tab:
- Has details like workflow task ID, Work item status, date, time, etc.
- Step History tab:
- This is a step-by-step error detail.
- There are no errors in our workflow execution, that is why ‘Execution Action’ is in green status.
- Deadlines tab:
- This step shows the deadline details for the steps used(example mail step).
- We have not set any deadlines so this tab has no entries.
- Task Description tab:
- This step shows the description of the tasks that are used in our workflow.
- For example: Send Mail step body content.
- Container tab:
- This tab consists of the container elements with their runtime values.
- For example:’lv_counter’ value will be ‘0’ after completion of the workflow execution as shown below.
- Message tab:
- This tab displays work item-wise message details.
2. SAP business workplace:
- Sap business workplace (T code SBWP) is a place, where we can view the emails triggered by a workflow as shown below with recipient specified as our SAP login ID.
- As we can see ‘5’ unread mails are displayed in the ‘Inbox’.
- This is because the ‘send mail step’ is created inside the branch of ‘loop until step’ and the ‘loop until step’ will be executed 5 times.
- And the mail recipient is ‘WF_INITIATOR’, that is why the mail is sent to our ‘Inbox’.
- After opening the mail we can see the following details.
- Subject, the body of the mail, and recipient details will be displayed.
7. This ends the detailed explanation of the execution of workflow( Creation is explained in Part 1).
Workflow Creation: Please refer to my Blog with Part - 1: Working with Container Operation and Loop (Until) Steps - PART1
Comments
Post a Comment