none
List<string> handline in BizTalk Orchestration RRS feed

  • Question

  • I have my external c# class returning List<string>.
    How can I assign this to a variable in BizTalk Orchestration ?

    I tried assign my variable varA set to dataType 'ArrayList' didnt work.
    I tried assign my variable varA set to dataType 'System.Collections.Generic.IList`1' didnt work.


    Is there a way to accept List in BizTalk Orchestration ? Please experts advise

    RH

    Wednesday, November 13, 2019 3:04 PM

All replies

  • You basically need to create a XML payload with a repeating element that you return from your helper class to your orchestration.

    Then in your Orchestration you can have a loop that uses a XPath to extract each node.  e.g. http://geekswithblogs.net/bosuch/archive/2012/08/15/biztalkndashlooping-through-repeating-message-nodes-in-orchestrations.aspx

    Wednesday, November 13, 2019 8:18 PM
  • Can you please elaborate point 1 you mentioned above ?

    I am returning from my c# helper List<string>

    You mentioned, create a XML payload with a repeating element. Do I need to create a Message or variable of Message Type System.xml.xmlDocument ?

    I will appreciate if you can elaborate on this please ?


    RH

    Wednesday, November 13, 2019 8:31 PM
  • Hi RH, 1. I would create a helper assembly first 2. In that assembly I would define my own wrapper class that would store List<string> as private property. 3.This class would implement a constructor with List<string> parameter 4. It would also implement an indexer and a count property 5. This Class you can instantiate in your orchestration This is relatively easy. Regards
    Saturday, November 16, 2019 10:09 PM