you have a question < while > use of bpel, thank you.

Hi, guys.

I have a question while loop on bpel.
detail:
My input message format, like this:
< my: DataRequestIns xmlns: my = "http://xml.netbeans.org/schema/MessageDefined" >
< my: DataIns >
< my: address > Ang Mo Kio 1 < / my: address >
< my: birthday > 14/12/1970 < / my: birthday >
< my: firstName > song 1 < / my: firstName >
< / my: DataIns >
< my: DataIns >
< my: address > Ang Mo Kio 2 < / my: address >
< my: birthday > 14/12/1990 < / my: birthday >
< my: firstName > song 1 < / my: firstName >
< / my: DataIns >
< / my: DataRequestIns >

My wait the result is:
< DataRespondOuts xmlns = "http://xml.netbeans.org/schema/MessageDefined" >
< DataOuts >
< address > Ang Mo Kio 1 < / address >
<>39 < / age >
< name > 1 song full < / fullName >
< / DataOuts >
< DataOuts >
Ang Mo Kio 2 < address > < / address >
< 19ans > < / age >
the song < fullName > 2 < / fullName >
< / DataOuts >
< / DataRespondOuts >


How to assign the value with one by one, like berries.

I mean inside while, how to define or variable how to use to implement what I said.

Thank you very much.

My Bpel:
< assign the name = "Assign_4" >
< copy >
< from expression = "1" / >
< variable = "fileCount" / >
< / copy >
< / assign >
< while name = "While_1".
condition = "bpws:getVariableData('fileCount') & lt; = count (bpws:getVariableData('FileIns','body','/ns3:DataRequestIns/ns3:DataIns'))" >
<>sequence
<>sequence
< assign the name = "Assign_10" >
< copy >
< variable from = part of the "FileIns" = "body".
Query = "/ ns3:address" / >
< variable = part of the 'FileOuts"="body ".
Query = "/ ns3:address" / >

< / copy >
< / assign >
< assign the name = "Assign_11" >
< copy >
< variable from = part of the "FileIns" = "body".
Query = "/ ns3:age" / >
< variable = part of the 'FileOuts"="body ".
Query = "/ ns3:age" / >

< / copy >
< / assign >
< assign the name = "Assign_12" >
< copy >
< variable from = part of the "FileIns" = "body".
Query = "/ ns3:fullname" / >
< variable = part of the 'FileOuts"="body ".
Query = "/ ns3:fullname" / >

< / copy >
< / assign >
< assign the name = "Assign_5" >
< copy >
< from expression = "bpws:getVariableData('fileCount') + 1" / >
< variable = "fileCount" / >
< / copy >
< / assign >
< / sequence >
< / while >



Concerning
matikak

Published by: aris yu on December 22, 2009 02:05

What I usually do is:
1. create a new variable - based on the schema for your output XML doc.
2. make a "copy" - mapping your first field of the doc XML source (using the syntax that selects the member based on the active index-meter) - to the created above the output of the new variable field. I use the method described in section 3.15.3.1 of the 10.1.3.1 BPEL Dev Guide - using a rear x-path query (see below). But if your syntax for the part 'from' works - that's fine - just use it.
3 operations of 'copy' additional as needed for your other domains (like number 2 above).
4. make an "append" - mapping the repetitive element (of the new variable) on the left in the parent of the repetitive element (the output variable) on the right.

Your output variable now shouldn't be crushed every time - since you would use a statement append adds to it.

So using your example below - you would have something like this:



...




... (additional copies for items more...)








Hope that helps.

Published by: Rod Tunnels on December 23, 2009 14:27

Published by: Rod Tunnels on December 23, 2009 17:27

Tags: Fusion Middleware

Similar Questions

Maybe you are looking for