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.



    Monday, October 6, 2014 5:19 AM


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.



    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="">BizTalk Development Architecture</a>

    Tuesday, October 7, 2014 10:47 PM
  • 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:

    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
  • 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)



    Friday, October 10, 2014 1:58 PM