Redundant workflow

Soady, Phil phil.soady at sap.com
Thu Nov 21 16:38:44 EST 2002


An interesting problem.
If you feel upto a check function at EVENT linkage time.
Try the following:
 
EVENT -> Check function -> Sales_order_check,
 
In Your work flow , add a entry to a custom table with the Sales Order no.
 
call method SO->Edit as per usual. (Lock it prior to and unlock after the call)
ie (Assuming dialog call to SO-edit)
LOCK
ADD entry to table
call maintain SO.
delete entry from table
UNLOCK
 
 
It triggers the event but this time it checks to see if the SO is in the table.
 
The original workflow continues with a step .  Note use commit and wait.
Commit and wait, waits for asynchronous updates to complete.
The entry is then removed from the before allowing the workflow to continue.
 
If you are using the event queue, then a request start time offset would be required
on the step to delete your custom table entry.
Make sure you cant edit the SO manually in the mean time. (Hence the use of workflow locks)
If necessary, use a user exit in the sales order to check the table to prevent users
editing a Sales Order until the entry is removed from the custom table.
 
 
Alternative and preferred approach:
Have the event "CHANGED"  as a terminating event on the workflow.
 
That way the current workflow dies and the new takes over.
The workflow then checks what needs to happen, ie where to pick up the process
from. This is often better since, what is the relevance of the running workflow
after a change to the SO made by a user ? A business process question.
 
good luck
 
 
 
 
Phil Soady
Senior Consultant
Business Technologies
SAP Australia
* : 0412 213 079
* : phil.soady at sap.com
 
 
 
 
 
-----Original Message-----
From: Michael Pokraka [mailto:workflow at quirky.me.uk]
Sent: Friday, 22 November 2002 1:56 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Redundant workflow
 
 
Not a friendly soloution is to look at the most recent set of change documents. If any are found that do not match whatever's applicable for a shipping point change then trigger the WF, else bail out. This has the advantage of also retriggering the WF if someone changes more than just the shipping point. This would have to be a custom check function in your event linkage.
 
FM CHANGEDOCUMENT_READ should help you on your way.
 
HTH
Cheers
Mike
 
On Thu, Nov 21, 2002 at 07:48:01AM -0500, Stiles, Les wrote:
> My trigger events for a workflow related to BUS2032, Sales Order, is
> Created or Changed. The main task is to have any of 13 agents in one
> Org Unit verify or edit (Method - BUS2032.Edit) the Sales Order
> shipping point. My problem is that upon save, they trigger another
> workflow. How do I prevent this?
>
> I was going to add a condition statement to bypass the task process if
> _WF_Initiator was the username of one of the members of the Org Unit,
> but this seems to require future maintenance which I was hoping to
> avoid. I am sure there is a better way!
>
> Les Stiles
> Systems Analyst, QM & WF
> Siemens ICN
> 400 Rinehart Rd
> Lake Mary FL 32746
> (407) 942-6777
> les.stiles at icn.siemens.com
>
> PS: Just received my copy of THE BOOK (backordered twice). A quick
> scan did not reveal the answer to the above. However, I surmise it is
> there!!
 


More information about the SAP-WUG mailing list