on 08-20-2010 7:18 AM
Hi Experts, I am facing an issue with a workflow and its task.
This workflow has only one step, in which it calls a task to execute in background.
In the method called in this task, we call a function module and when sy-subrc is not Zero, we call EXIT_CONTROL like below:
BEGIN METHOD CHECK_ITEM.
...
CALL FUNCTION ZCHECK
....
EXCEPTIONS
NOT_ELIGIBLE = 1
OTHERS = 2.
IF SY_SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
EXIT_RETURN 9001 'Not eligible' space space space.
WHEN 2.
EXIT_RETURN 9001 'Unknown error'. space space space.
ENDCASE.
ENDIF.
END METHOD CHECK_ITEM.
Now, if Sy-subrc = 0, the WF completes and ends.
If it is encountering the EXIT_RETURN, it doesn't complete. Instead the status remains 'IN PROCESS'.
The message is available in the WORKITEM and in the PARENT, I get the message: 'Processing Interupted'. 611.
Later, maybe hours later, I see the Workitem in error : 'Work item set to error following 03 failed attempt'.
Experts, any clue as to why this does not go into Error immediately and terminate instead of remaining in status IN PROCESS?
Hello,
Have a look how the Exceptions are defined for that method. It looks like they have been defined as "temporary" errors, which would lead to workflow re-attempting them 3 times.
regards
Rick Bakker
Hanabi Technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The task shows as "In Process" because most probably a short dump was generated in background causing control to never return to the Workflow system. You want to investigate why you are getting the error. Try running the method in test mode and see what short dump gets generated. Of course, you can find the old short dumps in ST22.
A possible reason could be this. You typed:
EXIT_RETURN 9001 'Unknown error'. space space space.
Since EXIT_RETURN is a macro, it could have accepted 'Unknown error' . (with the dot) as the first parameter. This might be the reason you are getting a short dump. Remove the dot after the 'Unknown error' and see if it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello !
In your coding, your following statement does not have any assignment operator.Use either = or <> operator.
IF SY_SUBRC 0.
Regards,
S.Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.