|
Home > Archive > BizTalk Server Orchestration > September 2005 > Promoting a field element and using it in a decision rule in an orchestration
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Promoting a field element and using it in a decision rule in an orchestration
|
|
| Bobtorious 2005-09-21, 5:52 pm |
| Hey all,
I'm new to BizTalk. I'm using BizTalk Server 2004 and I'm just playing
around with simple orchestrations. I have created a schema that has
Customer as the root node, and it has a child field element called
NumberPets. I promoted this NumberPets as a distinguished property,
and am attempting to check it's value in my orchestration. I have
added a message corresponding to my Customer schema in the
orchestration (the message variable is called CustOrderInst), and when
I enter the expression CustOrderInstance.NumberPets > 5, I get the
smart help an all that jive.
When the orchestration is actually executed though, the message is
picked up, but when it goes down the branch that checks the value, I
get a SystemNullReferenceException. Is there something I have to do to
create a new instance of the element when I check it in the expression
editor? This works if I have my NumberPets be a field attribute.
Thanks for you patience guiding a newbie 
Bob
| |
| Bobtorious 2005-09-21, 5:52 pm |
| Well, it appears I have found the solution to my problem. I created a
variable in the orchestration, and used an expression shape to assign
that value the CustOrderInst.NumberPets value, and I ran the decision
on that. If there's any other ways of doing this though (maybe using
System.XML imports or something to extract the value from the element)
I'd be very interested in hearing them.
Bob
|
|
|
|
|