on 11-23-2007 10:29 AM
Hi ,
I have built a workflow that is triggered on the BUS2089 created event. The problem is that when the trip is created or changed both the created and changed events fire. What this means is that if a trip is changed it fires the created event which triggers a new workflow even though the trip is already in one workflow. Does anyone know why both events are fired on create and change or a way to get round this problem?
Thanks
Rob
Generally both the events gets triggered I think so as i experienced the same stuff in 2 projects. In this case you can create an attribute that will use this FM SAP_WAPI_WORKITEMS_TO_OBJECT to check whether any Workflow already exist. If it exist the Worlist parameters willnot be Initial.
You can use this attribute in start condition of Wflow
SWB_COND
Before putting Wait for Change event step make sure that this event does not get Triggered when you are approving the request:)))))
Thanks
Arghadip
Message was edited by:
Arghadip Kar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry about coming a bit late into the discussion....
Can't say I have any real experience with the problem, but I worked with travel & expense approvals for a few years, even if they weren't using individual workflows per trip document. Are you sure this (event "created" being created) happens always? What I am thinking about is that this possibly only happens when a new version (either PTRV_HEAD version or PTRV_PERIO version) is created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just a long shot, but is it possible that one of the events is specified in transaction code SWEC ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rob,
Instead of coding some fancy check function modules or configuring start conditions, you should try the following simple solution: Into your current workflow, put a "wait for event" step to wait for BUS2089.CHANGED (into a separate branch of course). So, always when this event occurs, your workflow should end. The result is that if the user decides to change the trip, the old workflow ends, but a new one starts.
I don't know the reason why the both events are triggered. Maybe it is how it should work, and easiest solution to solve this "problem" is probably the one that I just explained.
Regards,
Karri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rob,
I don't know why both events are triggered, but you could create a check function module which could check if there is already a workflow for the trip and if so don't start a new one. You can set the FM in the event binding.
Regards,
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.