on 05-29-2011 11:10 PM
Hi,
The class is say ZCL_WF_CLASS and the event END_WF.
What needs to be done to have this event used correctly as a terminating event of a workflow? Does this event require a parameter to hold the workitem id (or workflow id), as currently this event has no parameters?
Previous developer has developed the class and event and installed as a terminating event but the workflow is going into error not terminating correctly. I believe the incorrect development of the event and/or its use in the workflow is the issue. Note that nowhere is this event currently raised in any code of the workflow.
Cheers,
Ross
Hello,
Unless I'm mistaken, a terminating event for a workflow is just like any wait-for event in a workflow.
It can be based on any object or class and it can be used in various ways - to terminate a branch or terminate the workflow, for example.
The workflow listens out for the event and checks if there is a matching key. You could base it on the key of a workflow object but it makes more sense to base it on an object or class that's used in the workflow - e.g. the POSTED event of an object would be used to terminate a workflow seeking approval for the posting of an object.
It definitely won't work if the event has no parameters. I guess if you do base it on the workflow object then you would use the top-level workitem id. Try it with a test workflow and SWUE to generate the event.
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.
Hi Rick,
I just got to this blog by Jocelyn Dart that is excellent. It states that the terminating workflow doesn't need any parameters as this is supplied automatically in the raising detail of the event! Will give it a try and see how I go.
/people/jocelyn.dart/blog/2006/07/27/raising-abap-oo-events-for-workflow
Ross
> "It states that the terminating workflow doesn't need any parameters as this is supplied automatically in the raising detail of the event!"
>
> Could you quote that part, I didn't see it. I also don't see how that could work!
Hi Rick,
I'm sure you know this already, but sometimes we miss the obvious: If the event is an instance event it will include the object key, which is all that's needed for an instance linkage. No parameters are needed, event parameters are purely for additional information.
Regards,
Mike
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
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.