Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

workflow

Former Member
0 Likes
1,084

Question:

what are the various ways to debug a workflow

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,055

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,055

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.

Read only

Former Member
0 Likes
1,055

Hi,

go through the following thread.........

***do reward if usefull

vijay

Read only

Former Member
0 Likes
1,056

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

Read only

Former Member
0 Likes
1,055

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

Read only

Former Member
0 Likes
1,055

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

Read only

Former Member
0 Likes
1,055

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.

Read only

Former Member
0 Likes
1,055