Race condition in a workflow

Joe_Toledo@capgroup.com Joe_Toledo at capgroup.com
Wed Nov 10 09:38:11 EST 2010


Good morning,

Perhaps you've already considered this, but since the approval workflow 
requires that the image be linked first then:

- have the approval workflow be a continuation of the archivelink workflow 
(i.e. a sub-flow)
- or have the first workflow (image link) raise an event at the completion 
of that workflow and have the approval workflow wait for that event before 
it continues.

I hope this helps.

Regards,

Joe Toledo | The Capital Group Companies
Location: IRV | Extension: 55417 | Outside: 949-975-5417
E-mail: joat at capgroup.com
[ Mailing: 15260 Valley Oak. IRV-M-3E Irvine, CA 92618 USA ]




From:
michael.mcley at daimler.com
To:
sap-wug at mit.edu
Date:
11/10/2010 06:28 AM
Subject:
Race condition in a workflow
Sent by:
sap-wug-bounces at mit.edu




Wuggers,

I have set up a new workflow for the approval of parked invoices.  Only 
invoices for specific types of purchase orders (service) get parked for 
approval.  It seems I have a race condition that was not detected during 
user testing.  The race is between the start of the approval workflow and 
the scanned document association with the SAP invoice.  Some more 
details...

1. When an invoice for a service PO arrives, 2 processes are kicked off 
simultaneously:
a) the invoice approval workflow
b) the association of the scanned document (archivelink) with the SAP 
invoice object.
2. Sometimes the scanned document association completes first, in which 
case an entry in the AdHoc objects container item is made, and a hyperlink 
to the scanned document appears in the subesquent work items in the 
invoice approval workflow. 
3. Other times the approval workflow starts before the association 
completes and no scanned documents are found -> no hyperlink in the work 
items.
4. The approvers require the link to the scanned document so they can 
review the vendor invoice before approval.

I was wondering if anyone else has seen a similar problem and what was 
done to correct.  Some things I thought about:
1. Triggering the workflow off the BUS2089.ASSIGNED event (this event is 
generated when an association is made between the archivelink document and 
the SAP object) - this probably is not a good idea as all invoices 
generate this event, but not all invoices go thru the approval workflow.
2. Including a wait step for the BUS2089.ASSIGNED event - probably not a 
good idea as the workflow could hang in those cases where this event is 
already generated when the approval workflow starts
3. Create a loop to test the adhoc objects container element for entries 
and loop until there is one - this would probably work, but it seems a 
little, well..., kludgey.

Can anyone give me some advice on correcting this issue?  Your help is 
appreciated.


Michael McLey
MBUSI - IT Parts & Administration 
Mercedes-Benz US International, Inc.
1 Mercedes Drive 
Vance, AL 35490 
PHONE:  (205) 462 - 5239 
EMAIL:   michael.mcley at daimler.com   
If you are not the intended addressee, please inform us immediately that 
you have received this e-mail in error, and delete it. We thank you for 
your cooperation. _______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20101110/44952b2b/attachment.htm


More information about the SAP-WUG mailing list