Many times in our workflow testing, we end up NOT having all workflow steps agents’ user id information to test complete workflow scenario. This forces us to adjust application data to derive the User IDs we know as the workflow agents of the different steps in the workflow and this could be very time consuming process. This can be avoided by using the “Execute for Testing” option provided by workflow system. Using this option, Initiator of the workflow can execute any other agents’ workitems from his Business workplace. Here are the steps to be followed to achieve this-
1) Execute the transaction that will trigger the workflow. If the workflow is started, it would place an item in the “Outbox->Started Workflows” folder of user workplace.
2) Goto transaction SBWP (Business Workplace). Select “Outbox->Started Workflows” folder. Right frame displays the list of workflows started by user. Select the workflow we wanted to test. This will display the list of workitems of the workflow in the right bottom frame. Click on the workitem that needs to be executed. For ex, In the below screen shot the workitem would be – “Employee HARI KRISHNA NALLURI – Approve notification of absence”.
3) Clicking on the workitem link will display the workitem information.
4) In the above workitem display screen, select “Settings->Personal Workflow Settings” menu item. This would display user’s personal workflow settings in a popup window. Select Technical View radio button in both of the “Workitem display” and “Workflow log” sections as shown below. Hit enter to save these values.
This setting needs to be done only once. Now return back to the initial screen (shown in step 2).
5) Again click on the workitem to be executed as done in step 2. This time, workitem display will be different from what we got in step 3. This new display view of workitem will have a menu named “Extras”.
If “Extras” Menu is selected, it would display a menu item with description “Execute for testing” as shown below.
If we execute “Extras->Execute for testing” menu item, that would execute the workitem as if we are the actual agent of the workitem and displays the resulting screen.
This way using “Execute for testing” option, we can execute the work items of the other agents from the initiator inbox. This technique to be used only in the development systems for the initial testing.