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 debugging

Former Member
0 Likes
2,600

hi,

please furnish the proceedure how to debug a workflow.

Thanks,

Rahman

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,096

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.

4 REPLIES 4
Read only

Former Member
0 Likes
2,096

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

Read only

Former Member
0 Likes
2,096

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

Read only

Former Member
0 Likes
2,097

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.

Read only

Former Member
0 Likes
2,096

thanks...