| Author |
Looping in orchestration base on a schema sequence.
|
|
|
| Hi,
I am wondering if it possible to do this in an orchestration. I am using
BTS2004
I want add a loop shape and in the expesstion editor I need to loop base on
the sequence in the message.
I want to loop on this
- <xs:element name="bta_override_accounts">
- <xs:complexType>
- <xs:sequence>
<xs:element maxOccurs="unbounded" name="bta_override" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
I want to get bta_override value in the sequence update an element with its
value and reconstruce the message to be sent.
Loop until no more element in the sequence.
Is it possible to do this . If yes what shoulb be my expression to loop
against
Thanks in advance for you help
| |
| Matt Milner 2004-12-09, 8:48 pm |
| You can use an xpath expression and the count function in xpath to find out
how many elements you have. Then you can loop on an index that is less than
that number. you can then use xpath to manipulate your messages in message
assignment.
Matt
"Ibrar" <Ibrar@discussions.microsoft.com> wrote in message
news:9E2D0FC3-5B74-4A15-BEE2-B38538AC5281@microsoft.com...
> Hi,
> I am wondering if it possible to do this in an orchestration. I am using
> BTS2004
>
> I want add a loop shape and in the expesstion editor I need to loop base
> on
> the sequence in the message.
> I want to loop on this
> - <xs:element name="bta_override_accounts">
> - <xs:complexType>
> - <xs:sequence>
> <xs:element maxOccurs="unbounded" name="bta_override" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
>
>
> I want to get bta_override value in the sequence update an element with
> its
> value and reconstruce the message to be sent.
> Loop until no more element in the sequence.
> Is it possible to do this . If yes what shoulb be my expression to loop
> against
>
> Thanks in advance for you help
>
>
| |
|
| Matt,
thanks for the reply.
Since xpath is new to me and reading documenation on xpath give me the
general idea. Issue now it that what will be the syntax in expression editor.
my first try is the expression below
xpath(Path_SLMaster_Msg,"string(/*/bta_overrride");
I am string trying to fgiure out the calling of counts function.
would it be asking too much if you could tell send me the syntax in
expression editor for get a count and reading the bta_overrive values
Appreciate your help
thanks
"Matt Milner" wrote:
> You can use an xpath expression and the count function in xpath to find out
> how many elements you have. Then you can loop on an index that is less than
> that number. you can then use xpath to manipulate your messages in message
> assignment.
>
> Matt
>
>
> "Ibrar" <Ibrar@discussions.microsoft.com> wrote in message
> news:9E2D0FC3-5B74-4A15-BEE2-B38538AC5281@microsoft.com...
>
>
>
| |
|
| Matt,
thanks for the reply.
Since xpath is new to me and reading documenation on xpath give me the
general idea. Issue now it that what will be the syntax in expression editor.
my first try is the expression below
xpath(Path_SLMaster_Msg,"string(/*/bta_overrride");
I am string trying to fgiure out the calling of counts function.
would it be asking too much if you could tell send me the syntax in
expression editor for get a count and reading the bta_overrive values
Appreciate your help
thanks
"Matt Milner" wrote:
> You can use an xpath expression and the count function in xpath to find out
> how many elements you have. Then you can loop on an index that is less than
> that number. you can then use xpath to manipulate your messages in message
> assignment.
>
> Matt
>
>
> "Ibrar" <Ibrar@discussions.microsoft.com> wrote in message
> news:9E2D0FC3-5B74-4A15-BEE2-B38538AC5281@microsoft.com...
>
>
>
| |
|
| Matt,
thanks for the reply.
Since xpath is new to me and reading documenation on xpath give me the
general idea. Issue now it that what will be the syntax in expression editor.
my first try is the expression below
xpath(Path_SLMaster_Msg,"string(/*/bta_overrride");
I am string trying to fgiure out the calling of counts function.
would it be asking too much if you could tell send me the syntax in
expression editor for get a count and reading the bta_overrive values
Appreciate your help
thanks
"Matt Milner" wrote:
> You can use an xpath expression and the count function in xpath to find out
> how many elements you have. Then you can loop on an index that is less than
> that number. you can then use xpath to manipulate your messages in message
> assignment.
>
> Matt
>
>
> "Ibrar" <Ibrar@discussions.microsoft.com> wrote in message
> news:9E2D0FC3-5B74-4A15-BEE2-B38538AC5281@microsoft.com...
>
>
>
| |
| Matt Milner 2004-12-13, 3:26 am |
| myIntVar = xpath(Path_SLMaster_Msg, "count(/*/bta_override)");
This assumes you want the count of bta_override nodes. I can't remember if
you need to cast the result of the xpath function to an int in this case,
but that should be easy enough to figure out either at compile time, or with
a simple cast exception at runtime.
You may need to fix up the actual xpath a little bit to get it to work since
you likely have namespaces in there. I find the easiest way to do this with
little thinking is to load my schema up in the business rules composer and
then highlight the node I want. The xpath is shown in the properties window
for you.
Matt
"Ibrar" <Ibrar@discussions.microsoft.com> wrote in message
news:BE3A10F6-A494-416F-8EAF-BFEB11F006B5@microsoft.com...[vbcol=seagreen]
> Matt,
> thanks for the reply.
> Since xpath is new to me and reading documenation on xpath give me the
> general idea. Issue now it that what will be the syntax in expression
> editor.
> my first try is the expression below
>
> xpath(Path_SLMaster_Msg,"string(/*/bta_overrride");
> I am string trying to fgiure out the calling of counts function.
>
> would it be asking too much if you could tell send me the syntax in
> expression editor for get a count and reading the bta_overrive values
>
> Appreciate your help
> thanks
>
>
> "Matt Milner" wrote:
>
| |
| gordon 2004-12-18, 2:46 am |
| If you don't want to use xpath you can first create a message with a count of
nodes. Next use a loop shape and create a message to be used as an index to
loop through the nodes. Then use a transform shape with two inputs, the
looping message and the index message. In the actual map use the index
functoid with a field as an input and the index message for the index. The
output should be your newly created message. This way the index changes
dynamically when you increment the it in the loop shape.
Gordon
"Matt Milner" wrote:
> myIntVar = xpath(Path_SLMaster_Msg, "count(/*/bta_override)");
>
> This assumes you want the count of bta_override nodes. I can't remember if
> you need to cast the result of the xpath function to an int in this case,
> but that should be easy enough to figure out either at compile time, or with
> a simple cast exception at runtime.
>
> You may need to fix up the actual xpath a little bit to get it to work since
> you likely have namespaces in there. I find the easiest way to do this with
> little thinking is to load my schema up in the business rules composer and
> then highlight the node I want. The xpath is shown in the properties window
> for you.
>
> Matt
>
>
> "Ibrar" <Ibrar@discussions.microsoft.com> wrote in message
> news:BE3A10F6-A494-416F-8EAF-BFEB11F006B5@microsoft.com...
>
>
>
|
|
|
|