Userexit to set WF to error doesn't work on restart

Mike Pokraka asap at workflowconnections.com
Wed May 16 09:42:31 EDT 2007


OK, got to the bottom of this and thought I'd share it:

The issue is that restart is performed inside out: First the *task* is set
to READY which triggers the exit, setting it straight back to ERROR. Then
the *workflow* is set to STARTED, then the execution starts. Since the
task is now already in error the WF doesn't "fail" but the task in error
isn't executed and the flow remains STARTED.

I would have expected a restart to work the other way around because a)
the error transactions work at top level and b) since multiple tasks could
be in error it sounds logical to start from the top. Ho hum.

Solution was to take a different approach to requirement without using the
exit.

Cheers,
Mike

On Tue, May 15, 2007 6:04 pm, Mike Pokraka wrote:
> Hi all,
>
> On a 620 system I am using a userexit to set the WF into error under
> certain conditions by calling SAP_WAPI_SET_ERROR. This works well.
>
> The problem is with restart: If the cause hasn't been fixed and the admin
> restarts, the exit should keep the WF in error. The only exit available
> for this is during status change. When I set it back to error it only sets
> the *workitem* to error, but the *workflow* goes back into a STARTED
> status and no longer appears among workflows in error.
>
> Even if I explicitly set the workflow to error by a second call to
> SAP_WAPI_SET_ERROR it still remains in STARTED status.
>
> Has anyone dealt with this? In NW04/s there is an exception available and
> there are a couple of notes dealing with this (including  867019 which
> adds a short dump if anyone tries to fiddle it in 620) so I suspect
> someone must have had this issue before.
>
> Any input appreciated,
> Mike
> (cross-posted to SAP-WUG and SDN-BPM)
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>


-- 





More information about the SAP-WUG mailing list