cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Workflow Exceptions

0 Kudos

What is the best way to handle exceptions in workflow?

Suppose a workflow step calls a method in a business object which in turn calls a function. Now an exception is raised in the function, the workflow just sits at that step with an "In Process" status. I would like the workflow to get an error status so that it can be restarted.

How can this be achieved? Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

This Blog contains the procedure to deal with Exceptions.

Hope this will help.

Regards

Sumit Agarwal

Answers (3)

Answers (3)

0 Kudos

Thanks everyone for your input. The resolution was as follows

http://help.sap.com/saphelp_nw2004s/helpdata/en/1a/6b023c3f6aaf08e10000000a11402f/content.htm

Former Member
0 Kudos

Hi,

In the workflow log, I am seeing a 'broken block in red color' when one of the approver rejects at a particular level. Workflow is not executing for the rejection path. May I know the reason behind this.  I am more worried about the broken red color block. I am seeing the status as 'Error'.

You can observe the difference of the execution of the workflow from the following . Please help me.

1. Approved                          2. Rejected

                     

former_member185167
Active Contributor
0 Kudos

Please start a new thread.

martin_nooteboom
Active Contributor
0 Kudos

First thing is, is the exception raised in the FM also handled by the FM? So is it an exception of the FM? If so you can handle it in your method also and raise an exception for your method.

Regards,

Martin

former_member184495
Active Contributor
0 Kudos

Hi AB,

are you sure that the WF's that end up in "InProcess" status are those WF's in error ?

If yes, then you could collect all such statuses thru SWWWIHEAD and make them in "Error" state.

After that use FM SWW_*_ERROR_RESTART for all those workitem in Error state.

Else need to identify all WF's in "InProcess" change it to "Error" as above and run SWPR.

Shall wait for some good answers too.

Hope it helps.

Aditya

Edited by: Aditya Varrier on Aug 29, 2008 10:37 AM