Controlling execution of branches in fork

Shai Eyal shai.eyal at yahoo.com
Fri Sep 11 04:28:22 EDT 2009


Hi Akshay,

I read your requirement and I found it interesting - I just love the challenges.
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.

I'd take it this way: If the IDocs contain a linking field (like PO and GR - the linking field is PO number), which I'm quite sure they do,  I'd go for wait for event using correlation. 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:
	* IDoc 2 will start a workflow which will wait for IDoc 1 via correlation.
	* IDoc 4 will start a workflow which will wait for IDoc 2 via correlation.
	* IDoc 3 will start and end because it has no wait (no preceding IDoc).
	* 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.
This is how you ensure your sequence. The correlation is realy cool - there's a blog on SDN describing it quite well.
Otherwise, I'd try to mess with wait for Event by using Workflow - 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.

I can't tell for sure but it sounds like classic correlation case.
Good luck,

 
Regards,
Shai Eyal
SAP Logistics senior consultant
SAP Workflow & BPM specialist
http://www.linkedin.com/in/shaieyal
Mobile: 972-52-5816633

------------------------------

Message: 3
Date: Fri, 11 Sep 2009 09:31:17 +0530
From: <akshay.bhagwat at wipro.com>
Subject: Controlling execution of branches in fork
To: <sap-wug at mit.edu>
Message-ID:
    <925928EF61EB8142A25835422EC26A8104FFC9E1 at PNE-HJN-MBX01.wipro.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello Friends,

We have a scenario where workflow should process multiple types of Idocs  e.g. 4 different types of IDOCs.

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.

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.

>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. 

In this case how can we achieve the dependency / synchronization of execution between branches of same fork?  (I am not sure if we can local events?)  



Appreciate any inputs on this front.



Thanks and Regards,

Akshay 


Please do not print this email unless it is absolutely necessary. 

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. 

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. 

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20090911/857d6375/attachment-0001.htm

------------------------------



      New Email names for you! 
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20090911/f216e18d/attachment.htm


More information about the SAP-WUG mailing list