Duplicate Message RRS feed

  • Question

  • Hello there,

    I have a project where I convert EDI messages from CODECO/COARRI to X12.322.

    In the end of the processing I have a text file in the X12.322 format that I send to a folder to be processed by a legacy system.

    What I want is, right before sending the resulting message to the folder, if one of the message's parameters has a certain value, I want to create a 2nd file, exactly equal except for one of the parameters.

    As so, I will have 2 text files, equal , except for 1 parameter, and I want to send them both to the folder to be processed.


    Any ideas ?




    Thursday, November 3, 2011 6:26 PM

All replies

  • Here is one possible solution:


    -Promote the message parameter that decides whether or not the new send port should have a copy

    -Make a new send port with the same adapter as the original one and the same address. Have the send port subscribe to whatever the first send port was subscribing to AND also that the promoted property has the certain value you talked about.

    Now the next step depends on what that 1 parameter you want to change is. It also depends on where you apply your maps today, you have two choices:

    -Make a new map that resembles the original one and change that one parameter, apply that map to the new send port.

    -Make a replace pipeline component and use that to replace that one parameter. Use the same map on the second port as the first port and apply the new pipeline with the replace component to the new port.


    Morten la Cour

    • Edited by la Cour Thursday, November 3, 2011 9:27 PM
    • Marked as answer by Lloyd ZhangModerator Friday, November 11, 2011 7:18 AM
    • Unmarked as answer by Nelson Andre Friday, November 18, 2011 11:15 AM
    Thursday, November 3, 2011 7:20 PM
  • Thanks.


    I'll try it out.

    Friday, November 4, 2011 9:41 AM
  • What if I use a ParallelActions tool?

    Like this :

    DECIDE shape -> If message1.parameter1 = the value I want


    -> Left Side , CONSTRUCT MESSAGE  shape with the regular TRANSFORMATION Shape (will create the message as it was already)

    -> Right Side , CONSTRUCT MESSAGE  shape with the regular TRANSFORMATION Shape, followed by a MESSAGE ASSIGNMENT shape that will change the promoted property to the value I want.


    Will the PARALLEL ACTIONS shape, configured like this create 2 files?



    Friday, November 4, 2011 12:32 PM
  • Why do you want to implement all that logic in an orchestration when your requirements are merely context-based routing? The promotion should happen in the disassembler on the receive port.

    Morten la Cour

    • Edited by la Cour Friday, November 4, 2011 3:26 PM
    Friday, November 4, 2011 3:25 PM
  • Morten,

    Only now I'm really trying to develop this and i've been reading my initial question and I think I've used the incorrect terms to explain.

    I'll use more specific fields to illustrate what I want to do.

    In my resulting X12.322 message there are these 2 segments Q5 and W2, for example:



    Whenever the last value in W2 is "E" and the first value in Q5 is "B", I want to create a copy of the file but change the first value in Q5 to A, in the second file:



    and send the 2 files to the destination folder.


    Hope now is more understandable, what I want.

    I tried to use my parallelActions method but it did nothing, only got the original message in the destination folder with no errors.


    Just to complicate a little more: Actually there are 8 possible destination folders with 8 Send Ports, with a Decide Shape inside the Orchestation, right in the end, routing the files to the respective Send Port

    I think I will need to have 8 new Send Ports (8 pairs : original, duplicate), to send all these files to.







    Friday, November 18, 2011 11:38 AM
  • It still sounds to me like routing logic, where you should use promotion on the receive side, and then have various send ports subscribe to certain conditions on the messages context. And then have different maps on the send ports according to the logic and value changes needed.

    I think hardcoding all this logic and number of ports in an orchestration would be the wrong approach (at least from what I am reading, I could be missing something).


    Morten la Cour

    Friday, November 18, 2011 12:27 PM
  • I understand your point , but at least for now, I have done it this way :


    1 - DECIDE shape : If W2.field = 'B' and Q5.field = 'E' (ELSE branch does nothing)


    2.1 -> TRANSFORM

    2.2 ->  Message Assignment (Set Q5.field to 'A') 

    3 - Send Shape -> To the new Send Port (pipeline EdiSend)


    This creates the 2 files as I want, the only question is that the second file is picking the X12 Fallback Settings parameters (Sender Id, Receiver Id, etc). The original file is correct.

    Friday, November 18, 2011 12:45 PM