none
Orchestration Variable in Custom XSLT in Biztalk Map RRS feed

  • Question

  • Hi,

    I have a custom xslt for mapping HL7 messages to CRM fields.

    For one field, I 'll get the data from DB so it is stored in my orchestration variable. How can I use that variable in my custom xslt file? Thanks.

    Regards,

    Lakshmi

    Monday, October 6, 2014 5:19 AM

Answers

All replies

  • Hi Laxme,

    As far I know, there is no way you can access Orchestration variable in custom XSLT.

    Workaround : you can create a intermediate message with a field and assign the variable value (the data from DB) to it and later use message assignment to assign this value to the field which you want to the mesage which you created using custom xslt.

    _____________________________________________________________________________

    Monday, October 6, 2014 5:45 AM
  • Custom XSLT works with "Mapping with structure " instead of mapping with individual node .

    So you have options either to you a intermediate schema and a map prior to using xslt or use a message assignment shape to populate the value through xpath or distinguish field.

    Thanks

    Abhishek

    Monday, October 6, 2014 6:55 AM
  • Maheshkumar mentioned the workaround. I just add, this is quite standard way of doing this.

    In the Construct shape include two shapes, the Transform with your map and the Assign shape where you assign a message field(s) with orchestration variable(s).


    Leonid Ganeline [BizTalk MVP] <a href="http://social.technet.microsoft.com/wiki/contents/articles/20258.biztalk-integration-development-architecture.aspx">BizTalk Development Architecture</a>

    Tuesday, October 7, 2014 10:47 PM
    Moderator
  • The easiest way to to use a dual-input Map and the easiest way to do that it using the Mapper, not custom XSLT.

    If you're stuck with the custom XSLT already written, you can use the technique in this Wiki Article to 'pass' variables into the Map: http://social.technet.microsoft.com/wiki/contents/articles/24766.biztalk-server-passing-variables-into-maps.aspx

    This will have to be implemented as a Custom Extension.

    Note, you can still use a multi-input Transform Shape with custom XSLT, but it's less extra work to use a Custom Extension.

    Wednesday, October 8, 2014 1:12 AM
    Moderator
  • Hi,

    We can go with another approach also. Instead of using the variable in custom xslt , you can use the database functiod to get the data from the Database. The Database lookup functoid will connect to one table. 

    for sample go thro the below URL:

    Database Look Up Functoid

    If you want to connect multiple table using storedprocedure there was a custom functoid. Follow the below URL for sample.

    StoredProcedure Functoid


    Regards, Aboorva Raja R Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, October 8, 2014 6:49 PM
  • Hi,

    Create a helper schema and mark the field distinguished you want to store your variable in. You can use this helper schema in the transform (It will be a multipart map)

    Regards

    Pushpendra

    Friday, October 10, 2014 1:58 PM