Race condition in a workflow

Mike Pokraka wug at workflowconnections.com
Thu Nov 11 06:16:35 EST 2010


Joe's suggestion is good, but if your archivelink WF is too generic then a
less kludgey version of your option 3 is to use a step condition to ensure
adhoc objects exist.
If you haven't used them before: Conditions tab on the first step that
uses adhoc objects; and make sure the conditions job is running.

Cheers,
Mike


On Wed, November 10, 2010 2:25 pm, michael.mcley at daimler.com wrote:
> 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
>





More information about the SAP-WUG mailing list