none
Using the Partner Agreement Additional Properties RRS feed

  • Question

  • I want to store a customer property "ClientID=12321" in the Parter agreement additional properties and later use that property in a map.

    How can I do that?

    Thank you in advance.



    Senior .Net/Biztalk Developer
    Orlando, Florida Area Hospital & Health Care
    Please Indicate "Mark as Answer" if a Post has Answered the Question



    Thursday, April 5, 2012 6:33 PM

Answers

  • You can retrieve the value as Carlos mentioned in an orchestration. For a default value you can even use a configurable property from the biztalk config file. 

    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.

    • Marked as answer by Jorge Sigler Friday, April 6, 2012 4:34 PM
    Friday, April 6, 2012 7:17 AM

  • In addition to what Bali added, here is the code you can use inside the orchestration:

    clientid = xpath(MSG,"string("insert here path of xml"/text())");

     

    MSG = the message name that comes into the orchestration

    "insert here path of xml" = You get that from either the map or the schema. On the map, click on the source link and then you view the properties. You will see the path to xml.

    To test the value use the code below and it will write the value to the event log:

    System.Diagnostics.EventLog.WriteEntry("clientid", clientid); 


    Please Indicate "Mark as Answer" if this Post has Answered the Question

    • Marked as answer by Jorge Sigler Friday, April 6, 2012 4:34 PM
    Friday, April 6, 2012 12:03 PM

All replies

  • Hi Jorge;

    You dont really do that at the map. At the map information, you do not have the party. You can, however, use an orchestration. Inside the construc shape, have a map shape and a message assignment all inside one construct shape. After you map the data, then have the following code in the message assignment shape:

    Message_Name(EdiOverride.OverrideEDIHeader) =true;

    Message_Name(EdiOverride.ISA06) = "12321";

    That is all

    Message_Name = the name of the message in the orchestration you are using.


    Please Indicate "Mark as Answer" if this Post has Answered the Question



    • Edited by Carlos T. _ Thursday, April 5, 2012 8:03 PM
    Thursday, April 5, 2012 8:02 PM
  • Carlos,

     Thank you for your answer.

     My problem is that the value I need is not part of the incoming message. It is a constant value I need to add in all the maps for this particular client.

    Since I don't want to hard code it in the map, I was thinking off storing it somewhere in the partner agreement and then later retrieving it from inside the map as needed using a scripting functoid.

    Do you have any other suggestions on how to do this? 

    Thanks


    Senior .Net/Biztalk Developer
    Orlando, Florida Area Hospital & Health Care
    Please Indicate "Mark as Answer" if a Post has Answered the Question

    Thursday, April 5, 2012 8:22 PM
  • Do you need to add the value to the data inside the map or what wraps the data in the map such as the party information that comes from BT?

    Please Indicate "Mark as Answer" if this Post has Answered the Question


    • Edited by Carlos T. _ Thursday, April 5, 2012 8:33 PM
    Thursday, April 5, 2012 8:30 PM
  • Correct.

     My destination schema has a element named "ClientID". I have to map this value to that element in all my maps.

     I understand that I could put this value somewhere in a database table, but I'm trying to see if I can avoid that.


    Senior .Net/Biztalk Developer
    Orlando, Florida Area Hospital & Health Care
    Please Indicate "Mark as Answer" if a Post has Answered the Question

    Thursday, April 5, 2012 8:35 PM
  • You can do this in several ways. Though, if you are calling several maps, then I would use an orchestration. In the first shape, you can pass the client ID to a variable. Next you call all your maps in all the shapes you want, but pass that variable to the maps as you like. That way, you are not hardcoding the value, you are just passing the client id to all the maps.


    Please Indicate "Mark as Answer" if this Post has Answered the Question

    Thursday, April 5, 2012 8:54 PM
  •  How do I get my value in the orchestration if it is not part of the incoming message? 

     Can I access the Additional Properties in a partner agreement from inside an orchestration?


    Senior .Net/Biztalk Developer
    Orlando, Florida Area Hospital & Health Care
    Please Indicate "Mark as Answer" if a Post has Answered the Question

    Friday, April 6, 2012 2:58 AM
  • You can retrieve the value as Carlos mentioned in an orchestration. For a default value you can even use a configurable property from the biztalk config file. 

    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.

    • Marked as answer by Jorge Sigler Friday, April 6, 2012 4:34 PM
    Friday, April 6, 2012 7:17 AM

  • In addition to what Bali added, here is the code you can use inside the orchestration:

    clientid = xpath(MSG,"string("insert here path of xml"/text())");

     

    MSG = the message name that comes into the orchestration

    "insert here path of xml" = You get that from either the map or the schema. On the map, click on the source link and then you view the properties. You will see the path to xml.

    To test the value use the code below and it will write the value to the event log:

    System.Diagnostics.EventLog.WriteEntry("clientid", clientid); 


    Please Indicate "Mark as Answer" if this Post has Answered the Question

    • Marked as answer by Jorge Sigler Friday, April 6, 2012 4:34 PM
    Friday, April 6, 2012 12:03 PM
  • Thank you guys for your help.

    I think I will go with the Biztalk application configuration file solution.


    Senior .Net/Biztalk Developer
    Orlando, Florida Area Hospital & Health Care
    Please Indicate "Mark as Answer" if a Post has Answered the Question


    Friday, April 6, 2012 4:34 PM