‎2007 Jul 18 12:08 PM
‎2007 Jul 18 12:12 PM
You cannot debug a workflow by setting breakpoint in it.You can set a break-point in a method used in one of the task's or method in BOR used in your workflow.
chk these lnks
http://www.erpgenie.com/workflow/debugging.htm
http://www.dataxstream.com/doclib/WorkflowTroubleshootingGuide.pdf
these will help you
‎2007 Jul 18 12:11 PM
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
<b>rewards point if helpful....</b>
regards...
Abhay Singh.
‎2007 Jul 18 12:12 PM
‎2007 Jul 18 12:12 PM
You cannot debug a workflow by setting breakpoint in it.You can set a break-point in a method used in one of the task's or method in BOR used in your workflow.
chk these lnks
http://www.erpgenie.com/workflow/debugging.htm
http://www.dataxstream.com/doclib/WorkflowTroubleshootingGuide.pdf
these will help you
‎2007 Jul 18 12:12 PM
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
<b>rewards [point for helpful answer....</b>
regards...
Abhay singh
‎2007 Jul 18 12:12 PM
Hi,
First of all, you cannot set breakpoints in a workflow, so I assume you mean that you have set a break-point in a method used in one of the task's used in your workflow?
If so, and if this task-method is a background method (i.e. a non-dialog task), debugging is not possible, since a background method, as the name states, is executed in another context in background.
To see how the workflow passes values from/to the different container's, you can use transaction SWUD (to see if the values needed for your method, are binded correctly).
Other useful tools for workflow error search, are: SWEL (first turn on even trace with SWELS) or simply look at the workitems created to see what kind of errors they may have encountered: SWI2_FREQ f.x.
If background task, I recommend you use SWUS for the specific task in question to create a WorkItem. Find the workitem with SWI2_FREQ, then display it. From there, display Container, to see the outcome.
You can debug the method, from SWO1 for the Object Type owning the method. From SWO1 simply click the test button. Then click "create instance". Execute the method for the object instance and you will be able to debug the method.
Regards,
Bhaskar
‎2007 Jul 18 12:12 PM
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.
<b>rewrads point for useful answer.....</b>
regards...
Abhay Singh.
‎2007 Jul 18 12:12 PM
Hello,
Check thiis link;
http://www.sap-img.com/workflow/workflow-debugging.htm
This has a step by step procedure :
http://fuller.mit.edu/workflow/debugging.pdf
www.erpgenie.com/sap/workflow/debugging.htm
Regards,
Deepu.K