‎2006 Nov 25 1:12 PM
hi,
please furnish the proceedure how to debug a workflow.
Thanks,
Rahman
‎2006 Nov 25 5:45 PM
Hi
There are ways if you are interested to see the contents of the task containers (variables) in a worlflow.
After executing the workflow,
1. Go to transaction SWIA ( Process workitems).
2. Now click the execute button. It will display list of
workitems.
3. Select the appropriate workitem and click the "Display
work flow log" button.
4. "Workflow log" screen will appear
5. Press the button "List with technical details" button
6. "Workflow log (List with technical details)" screen
will appear.
7. Click "Show work item container" icon in the
displayed table ot details.
‎2006 Nov 25 5:43 PM
Hi Mohammed
Try SWUS with a break-point in the source-code - it works. Has the task a method with dialog? If not, the user is not your dialoguser but your workflow-background-user. And therefore the breakpoint doesn't work.
If the task is a long running one, then you can use SM50 transaction, select the process associated with the workflow user id. In the menu, follow the path Program/Session --> Program --> Debugging.
But if the code gets executed really quick, it will be hard to select the process associated with it.
Another way you can do this is simply to make your task a dialog task for the purposes of debugging. Then you have the ability to start it at will - and you are listed as the user, so you will hit the breakpoints (whereas in background mode you will never hit the breakpoints you set due to the user being WF-BATCH). Once you've figured out the bug you can set the task to background again.
However - be aware - I've encountered some bugs that seem to disappear because the task is now in dialog mode - at that point putting an endless loop into the method assigned to the task is pretty much your only option for debugging.
Please let me know if this helps
‎2006 Nov 25 5:44 PM
Hi Mohammad
Some more tips
u cant debug work flow directly.
Workflow Trace On/Off - SWU8
Display - SWU9
Delete - SWU10.
-
Work Item Analysis - SWI1
Identifying workflow for the work Item :
-
Tx : SWI1 - Enter the workiem id which has been identified in workflow log
The details consists of workflow of the workitem.
WorkFlow Errors :
1. Workflow Not Started - Using Event Trace we can Identify
2. Started but No Proceeded - Wrong Object Keys
3. Problem in Work Item Execution
Dialog Work Item - Agent Determinaion Error ( Position,Role,User )
- Role Resolution Error
Reqd Element would no be
Set in Binding
Background Work Item - Make Foreground and Test once Sucessfull make it Back round
‎2006 Nov 25 5:45 PM
Hi
There are ways if you are interested to see the contents of the task containers (variables) in a worlflow.
After executing the workflow,
1. Go to transaction SWIA ( Process workitems).
2. Now click the execute button. It will display list of
workitems.
3. Select the appropriate workitem and click the "Display
work flow log" button.
4. "Workflow log" screen will appear
5. Press the button "List with technical details" button
6. "Workflow log (List with technical details)" screen
will appear.
7. Click "Show work item container" icon in the
displayed table ot details.
‎2006 Nov 26 9:57 AM