<font size=2 face="sans-serif">Good morning,</font>
<br>
<br><font size=2 face="sans-serif">Perhaps you've already considered this,
but since the approval workflow requires that the image be linked first
then:</font>
<br>
<br><font size=2 face="sans-serif">- have the approval workflow be a continuation
of the archivelink workflow (i.e. a sub-flow)</font>
<br><font size=2 face="sans-serif">- 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.</font>
<br>
<br><font size=2 face="sans-serif">I hope this helps.</font>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br>
<table align=center>
<tr>
<td bgcolor=#efefef>
<div align=center><a href=mailto:Joe_Toledo@capgroup.com><font size=1 color=blue face="Arial"><u>Joe
Toledo</u></font></a><font size=1 face="Arial"> | The Capital Group Companies<br>
Location: IRV | Extension: 55417 | Outside: 949-975-5417<br>
E-mail: joat@capgroup.com<br>
[ Mailing: </font><a href="http://maps.yahoo.com/py/maps.py?BFCat=&amp;Pyt=Tmap&amp;newFL=Use+Address+Below&amp;addr=15260+Valley+Oak.&amp;csz=92618&amp;Country=us&amp;Get%A0Map=Get+Map"><font size=1 color=blue face="Arial"><u>15260
Valley Oak.</u></font></a><font size=1 face="Arial"> IRV-M-3E Irvine, CA
92618 USA ]</font></div></table>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">michael.mcley@daimler.com</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">sap-wug@mit.edu</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">11/10/2010 06:28 AM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Race condition in a workflow</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Sent by:</font>
<td><font size=1 face="sans-serif">sap-wug-bounces@mit.edu</font></table>
<br>
<hr noshade>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
Wuggers,</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
I have set up a new workflow for the approval of parked invoices. &nbsp;Only
invoices for specific types of purchase orders (service) get parked for
approval. &nbsp;It seems I have a race condition that was not detected
during user testing. &nbsp;The race is between the start of the approval
workflow and the scanned document association with the SAP invoice. &nbsp;Some
more details...</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
1. When an invoice for a service PO arrives, 2 processes are kicked off
simultaneously:<br>
a) the invoice approval workflow<br>
b) the association of the scanned document (archivelink) with the SAP invoice
object.<br>
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. &nbsp;<br>
3. Other times the approval workflow starts before the association completes
and no scanned documents are found -&gt; no hyperlink in the work items.<br>
4. The approvers require the link to the scanned document so they can review
the vendor invoice before approval.</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
I was wondering if anyone else has seen a similar problem and what was
done to correct. &nbsp;Some things I thought about:<br>
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.<br>
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<br>
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.</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
Can anyone give me some advice on correcting this issue? &nbsp;Your help
is appreciated.</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
</font>
<p><font size=4 color=#808000><b>Michael McLey</b></font><font size=3 color=#808000><br>
MBUSI - IT Parts &amp; Administration </font><font size=2 color=#808000><br>
Mercedes-Benz US International, Inc.<br>
1 Mercedes Drive</font><font size=3 color=#808000> </font><font size=2 color=#808000><br>
Vance, AL 35490</font><font size=3 color=#808000> </font><font size=2 color=#808000><br>
PHONE: &nbsp;(205) 462 - 5239</font><font size=3 color=#808000> </font><font size=2 color=#808000><br>
EMAIL: &nbsp; michael.mcley@daimler.com</font><font size=3 color=#808000>
&nbsp; </font><font size=2 color=#808080 face="sans-serif"><br>
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. </font><tt><font size=2>_______________________________________________<br>
SAP-WUG mailing list<br>
SAP-WUG@mit.edu<br>
</font></tt><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug"><tt><font size=2>http://mailman.mit.edu/mailman/listinfo/sap-wug</font></tt></a><tt><font size=2><br>
</font></tt>
<p>