<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:verdana, helvetica, sans-serif;font-size:10pt"><DIV></DIV>
<DIV>Hi Akshay,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I read your requirement and I found it interesting - I just love the challenges.</DIV>
<DIV>Let me verify I got it correctly: all four IdDocs should be processed in a certain sequence however they are received in some other sequence.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'd take it this way:&nbsp;If the IDocs contain a linking field (like PO and GR - the linking field is PO number), which I'm quite sure they do, &nbsp;I'd go for wait for event using <U>correlation</U>. In this case each IDoc can start a workflow but he'll be waiting for the preceding IDoc to be processed first. Example: Let's assume the processing sequence is 4, 2, 1 and 3. Let's assume the IDoc received 2, 4, 3, and 1. Therefore:</DIV>
<UL>
<LI>IDoc 2 will start a workflow which will wait for IDoc 1 via correlation.</LI>
<LI>IDoc&nbsp;4 will start a workflow which will wait for IDoc&nbsp;2 via correlation.</LI>
<LI>IDoc&nbsp;3 will start and end because it has no wait (no preceding IDoc).</LI>
<LI>IDoc 1 will start and end because IDoc 3 already processed (the correlation handles that or you can do fork with 1 of 2). Once IDoc 1 processed it will continue IDoc 2 which will continue IDoc 4.</LI></UL>
<DIV>This is how you ensure your sequence. The correlation is realy cool - there's a blog on SDN describing it quite well.</DIV>
<DIV>Otherwise, I'd try to mess with wait for Event <U>by using Workflow</U> - in this case the receiver is the workflow instance and then within the workflow you can define a logic which IDoc will get processed first.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I can't tell for sure but it sounds like classic correlation case.</DIV>
<DIV>Good luck,</DIV>
<DIV><BR>&nbsp;</DIV>
<P><FONT face="verdana, helvetica, sans-serif" color=#00007f size=2><STRONG>Regards,<BR>Shai Eyal</STRONG></FONT></P>
<P><FONT face=Verdana color=#000080 size=2><STRONG>SAP Logistics senior consultant<BR>SAP Workflow &amp; BPM specialist</STRONG></FONT></P>
<P><FONT face=Verdana color=#000080 size=2><STRONG><A href="http://www.linkedin.com/in/shaieyal" target=_blank rel=nofollow>http://www.linkedin.com/in/shaieyal</A><BR>Mobile: 972-52-5816633</STRONG></FONT></P>
<DIV><BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: verdana, helvetica, sans-serif">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: verdana, helvetica, sans-serif">------------------------------<BR><BR>Message: 3<BR>Date: Fri, 11 Sep 2009 09:31:17 +0530<BR>From: &lt;<A href="mailto:akshay.bhagwat@wipro.com" ymailto="mailto:akshay.bhagwat@wipro.com">akshay.bhagwat@wipro.com</A>&gt;<BR>Subject: Controlling execution of branches in fork<BR>To: &lt;<A href="mailto:sap-wug@mit.edu" ymailto="mailto:sap-wug@mit.edu">sap-wug@mit.edu</A>&gt;<BR>Message-ID:<BR>&nbsp;&nbsp;&nbsp; &lt;<A href="mailto:925928EF61EB8142A25835422EC26A8104FFC9E1@PNE-HJN-MBX01.wipro.com" ymailto="mailto:925928EF61EB8142A25835422EC26A8104FFC9E1@PNE-HJN-MBX01.wipro.com">925928EF61EB8142A25835422EC26A8104FFC9E1@PNE-HJN-MBX01.wipro.com</A>&gt;<BR>Content-Type: text/plain; charset="iso-8859-1"<BR><BR>Hello Friends,<BR><BR>We have a scenario where workflow should process multiple types of Idocs&nbsp; e.g. 4 different types of IDOCs.<BR><BR>So I am planning to use a fork which will
 wait for all these events to start processing in branches of the fork as and when these Idocs are received.<BR><BR>But now the point is that the sequence of incoming Idocs is not fixed, whereas there is dependency between the execution of branches of this fork i.e. once branch 1 processing is finished, then branch 3 should be executed then branch 4 and then branch 2 etc.<BR><BR>&gt;From SAP help I could infer that we should not use event creator step in one branch and wait for event in another branch of the same fork to achive this purpose. <BR><BR>In this case how can we achieve the dependency / synchronization of execution between branches of same fork?&nbsp; (I am not sure if we can local events?)&nbsp; <BR><BR><BR><BR>Appreciate any inputs on this front.<BR><BR><BR><BR>Thanks and Regards,<BR><BR>Akshay <BR><BR><BR>Please do not print this email unless it is absolutely necessary. <BR><BR>The information contained in this electronic message and any
 attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. <BR><BR>WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. <BR><BR>www.wipro.com<BR>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <A href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20090911/857d6375/attachment-0001.htm"
 target=_blank>http://mailman.mit.edu/pipermail/sap-wug/attachments/20090911/857d6375/attachment-0001.htm</A><BR><BR>------------------------------<BR></DIV></DIV></div><br>
      <hr size=1> <a href="http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/aa/"> New Email names for you! </a> <br>
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail.<br>
Hurry before someone else does!</body></html>