none
Starting correlation between a parent- child orchestration based on edi context property RRS feed

  • Question

  • Hi All,

    I am new to EDI and currently facing issue in initializing correlation in parent orchestration so that child orchestration can follow it.

    Scenario : I have three orchestration in my project let Say A, B,C

    Orchestration A : Debatch the Input flat file and gives call to  child orchestration B.

    Orchestration B: Does mapping of individual message with EDI  schema,  send from orchestration A and then is send to message box for EDI batching using correlation on logical send port.

    Orchestration C: This orchestration does validation of the batched message based on filter (isbatched =false,batchname etc), which is hardcoded. Currently I don't want to hard code these filter property as we have to keep on adding filters depending upon number of  trading partner . So I thought of calling Orchestration C from A once the batching is over in message box , for this I am using Delay shape. I want to some how correlate ( batchid and isbatched property )send from orchestration A to orchestration C  so that it can follow the correlation set. But the problem is that I can't initialize correlation from Orchestration A , moreover the batched message comes through direct binding ,Any ways  I want to get rid of hard coding new value in filter property every time a new trading partner is added.

    Please suggest how to go forward with it I am stuck.

    Thanks in advance

    Raj Kiran


    Raj Kiran

    Friday, July 1, 2016 2:57 AM

All replies

  • Hi Raj

    It is not quite clear from the above where the actual batching is happening.

    However, I don't think it's best to implement your own EDI batching logic when you can use the EDI Batching orchestration that comes out of the box. It is highly configurable and you can configure batches at EDI Agreement Level.

    http://geekswithblogs.net/bosuch/archive/2012/02/16/biztalk-2010-edi-batching-tutorial.aspx

    http://axonolympus.nl/?page_id=186&post_id=1964&lang=en

    https://msdn.microsoft.com/en-us/library/bb226413.aspx

    https://msdn.microsoft.com/en-us/library/bb728051.aspx

    Note: If you are doing batching using the above orchestration, can you provide details of what validation is happening in OrchC? EDI validation will anyways happen on the EDISend pipeline if you directly send the batched message via a SendPort.

    Thanks Arindam



    Friday, July 1, 2016 5:54 AM
  • Thanks Arindam,

    In the validation orchestration we are subscribing the Batch message done by out of box orchestration present in EDI application that ships with biztalk. This message in  xml format  is subscribed by validation orchestartion  based on filters (ie batch name, batchid ,tobebatched= false) and I check the no of ST , GS etc counts with my database table where I have already inserted the count as per my logic in flat file. If these turn out to be same then only I send my batch using EDI send pipeline to given destination else  the messge is not sent. I want to get rid of so many filters pertaining to parties(trading partner)


    Raj Kiran

    Friday, July 1, 2016 11:13 AM
  • Can you describe this in terms of your business process/requirements?  What you've described is a bit complicated and it's quite likely that there are better ways.

    For example, is you incoming message a flat file or EDI?  The target is EDI, please confirm.

    Friday, July 1, 2016 12:16 PM
  • Hi Raj Kiran

    Much of the complexity that you are facing is due to the fact that OrchC is getting the batched message from the EDI Batching orchestration. Check if there is a possibility of skipping OrchC. Are there valid scenarios when you are NOT sending out the batched message? You have to rely on the Batching orchestration to do correct batching as per your batching criteria.

    If you still have a need to use OrchC for validating count of messages, it is preferrable to write your own Batching/Aggregating orchestration that does aggregation of the EDI XML messages - that way you will be able to control/flow promoted properties at each orchestration to set up CorrelationSet/Convoys as per your requirement.


    Thanks Arindam


    Friday, July 1, 2016 12:39 PM
  • Hi John,

    Input - Flat File (CSV) file

    Output - Batched EDI file 

    Orchestration A,used for debatching and then OrchestrationB  sending the Indivisual small edi xml  message to message box  so BizTalk EDI Application (out of box Biztalk Application ) can do batching .

    Orchestration C for validation purpose.ie. Amount field sum in CSV file is same as in EDI File .

    Please let me know if you want further details 

    Thanks 


    Raj Kiran

    Friday, July 1, 2016 1:23 PM
  • So, why are you not debatching in the Pipeline?  Can you map directly from the debatched flat file message to EDI?  You can do that in the Port.

    Why would the sum be different?  You can also apply this check in the ff to EDI Map.

    Basically, you should start with the simplest process first.  Don't assume you need more complication.

    Friday, July 1, 2016 1:48 PM
  • Hi John,

    Let me elaborate more on this and the steps which I am following.

    1. We accept a input CSV file using Flat file disassembler convert it into xml for biztalk to process.

    2. As per business requirement, I apply some grouping logic using a map. the output of this is a raw batch xml message(not in edi format yet). The current output is of Envelope schema .

    3. I call a receive pipeline in orchestration for debatching  using envelope schema and document schemas, which provide me individual message(document schema type) message, as I am looping through each document schema message. 

    4. Inside the loop which is in atomic scope (parent orchestration, ie : orchestration A) I further call another orchestration(orchestration B) using call orchestration shape,  

    5.  I map these individual message into single edi message ( in orchestration B). I need to send it to message box after initiating correlation on the single edi message(in send shape), I correlate on  (batchId,tobebatched =true) property.

    6. The inbuilt EDI Batching orchestration(out of box)  does batching. I have put a delay shape in Orchestration A so that there is enough time for batching to take place, after that I sent a control message from orchestration A .

    7. Currently I am using external trigger in party to make a batch release . so I sent a control message to get the batch released .

    8. I subscribe all the batch message using orchestration C ( using filter ie batchname, tobebatched =false,senderPartyname, receivepartyname etc).Here I validate the number of certain (edi) segement with the number of rows in CSV file , sum of particular (edi) segement field etc  with sum of a particular CSV file column . Just to make sure that  I have got a complete batch message. Once it matches. I use a sent port that uses (EdiSend pipeline) to convert the xml batch message to EDI batch message.

     I have more than one trading partner available and this is going to addup in future , I don't want to keep on configuring the filter properties every time a new party comes into picture.

    Please provide your valuable suggestion on the steps involved .

    Thanks 


    Raj Kiran

    Friday, July 1, 2016 9:46 PM
  • Hi RajKiran Vats,

    Can you please clarify on below points

    As per business requirement, I apply some grouping logic using a map. the output of this is a raw batch xml message(not in edi format yet). The current output is of Envelope schema

    Do you apply this map on the receive port or execute it in the orchestration?

    I map these individual message into single edi message ( in orchestration B). I need to send it to message box after initiating correlation on the single edi message(in send shape), I correlate on  (batchId,tobebatched =true) property

    why not map this in the orchestration A(Why use out of the box...it sure increases the complexity and the number of hops the message has to makes and number of the transactions committed in the database) only?

    Also why to use another Orchestration?

    I believe that what you are trying to achieve in orchestration C can be simpley achieved in Och A only.

    I simply cant see the need of use of Orchestration C.

    Also how adding multiple partners in future is going to be an issue?

    can you elaborate a little on that? Can't BRE be leveraged in this case?

    Regards,


    Mandar Dharmadhikari

    Tuesday, July 5, 2016 10:54 AM