Race condition in a workflow
michael.mcley@daimler.com
michael.mcley at daimler.com
Wed Nov 10 09:25:58 EST 2010
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20101110/d566c5ac/attachment.htm
More information about the SAP-WUG
mailing list