There are several posts in SCN talking about workflow debugging. Most of them are manually generating an endless loop and then can launch debugger in SM50. However, if you try to debug standard workflow, you are not allowed to manual inject any endless loop in standard code. If the original developer is not so kind to leave any switchable endless loop in standard code, you have to go another way.

In this example a common debugging approach is demonstrated:

Document builder is an application provided by SAP which can allow you to generate output file with format PDF, DOCX and HTML from various input with format DOCX, HTML and TXT. The workflow is also supported. When a document is generated and released, one work flow item will be sent to the respective approver.

However during my testing, I meet with error message “Workflow without approver”, although I have maintained the approver in customizing correctly.

So I guess there must be something wrong during the agent determination of workflow runtime. In order to find the root cause I have to debug it.

/wp-content/uploads/2013/11/clipboard1_315806.png

the involved workflow is WS40400006.

/wp-content/uploads/2013/11/clipboard2_315807.png

step1: tcode SMQS to degegister the queue WORKFLOW_LOCAL_001. Never forget to re-register it once you finish debugging.

/wp-content/uploads/2013/11/clipboard3_315808.png

step2: step breakpoint on workflow framework method CL_SWF_RUN_WIM_EXECUTION_MGR~START_EXECUTIONS, CL_SWF_RUN_WFM~EXECUTE_QUEUES:

then repeat the steps to trigger your workflow.

step3: tcode SWI1. Now you will find one entry for your workflow item. Execute it:

/wp-content/uploads/2013/11/clipboard4_315809.png

the first breakpoint is triggered:

/wp-content/uploads/2013/11/clipboard5_315810.png

click F8, then the second breakpoint is triggered:

/wp-content/uploads/2013/11/clipboard6_315811.png

This method covers the fundamental logic of workflow execution engine. There is a big loop to traverse all steps which are currently executable:

/wp-content/uploads/2013/11/clipboard7_315812.png

After some debugging finally I found root cause: there is something wrong with my setting regarding organization unit. After fixing that the error message is gone

/wp-content/uploads/2013/11/clipboard8_315813.png

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

    1. Jerry Wang Post author

      Hi Jonathan,

      thank you for your comment. Yes the two notes you mentioned are great. Actually I had already some email-loop with the note author several months ago 🙂

      Best regards,

      Jerry

      (0) 
  1. Jonathan Bourne

    Looking at your first two debugger screenshots it seems that Checkpoint Groups WF_WORKITEM_EXECUTE and WF_WFM_RUN (txn SAAB) could be used to provide the breakpoints as an alternative to setting them manually.

    Regards,

    JB

    (0) 

Leave a Reply