Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

n00b questions: Orchestration variables, and functoid parameters

Status
Not open for further replies.

BobDuckworth62

Programmer
Feb 15, 2005
12
GB
Hi guys

I am a BizTalk n00b, so apols in advance for silly questions...

I have just started playing with the app (and like it) with a view to verifying that I can get it to relatively easily do the sort of stuff I have had to do in the past using bespoke C# apps.

(1) ---

I have a System.Decimal variable declared in an orchestration. Can I use its value as a parameter to a Multiplication functoid in a mapper used by that orchestration?

I tried just typing the variable name in a parameter field, then the namespace.name, but no luck.


(2) ---

I am sure I am doing something stupid here, but I have three orchestration variables, and want to use Expression objects to assign values to them.

- First one is a System.Decimal, and this works fine (for instance: MyVbl = 5;);

- Next is a System.String; it picks up its Initial Value ("ABCD") ok but when I try to say MyVbl = "def"; in an expression it ends up with "null" in it;

- Third is a System.Xml.XmlDocument and the same thing happens: I am trying to assign the currently-active Orchestration message to it (MyVbl = MyMessage;) and it also ends up with null.

Everything else in the orchestration works fine.

(3) ---
Lastly, I have a complex structured XML message with a given main node, a set of known sub-nodes, and then a single one of a choice of sub-nodes. I want to capture the name of that variable sub-element into a string variable so that I can use it in a Decide expression for conditional processing.

I had assumed that I could capture the XML message into a System.Xml.XmlDocument (as above) and pass it to a static C# function that will navigate around the document and pull out the info that is needed.

(a) Would this be a sensible approach?
(b) Do I need to even capture into the System.Xml.XmlDocument variable first or can I just pass it to a C# function that expects such a parameter?

Any help would be greatly appreciated!

Thanks and best regards

Bob

 
To 1:
I think you can not pass variables as Input to a map!It only accepts an Input and an Output Message. If you want to have a static value in your Map just insert a variable in your map! (Inside your Multiplication Functoid!)

To 2:
Sorry, I dont know where your error is here! You should be able to assign as many variables inside your expression shape as you want!

Does Visual Studio give you any errors?

Can you upload your Solution somewhere so I can have a look at it?

To 3:
Yes, that approach is quite OK! And yes, I think you need to cast your bizTalk Message to a System.XmlDocument first! The regular BizTalk Message contains Metadata (Context) as well as the regulat Xml Message. So a cast will do the trick!

Hope that helps a bit,

Stephan

 
Thx Stephan

the stuff about the variable in the map is not so important becase I guess I can embed it inside another input xml.. (is that right). The issue arises because the map uses that same value many times, so I did not want to have to type it in each time.

Cheers

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top