[Users] [se-bpel] Merge of 2 arrays of elements.
seb.wytt
sebastien.trivella at veoliaeau.fr
Wed Mar 16 11:04:07 CET 2011
Hi,
I'm trying to evaluate the different possible solutions in BPEL to merge 2 arrays of elements of the same type.
a) In XPath 2.0 we could use "insert" functions but SE-BPEL only supports XPath 1.0 as far as I know.
b) It is still possible to do that from an XSLT and to invoke it from a bpel:assign.
c) I'm doing a "for-each" structure looking likae this (pseudo-code):
$finalArray = $firstArray
$c1 = count($firstArray)
$c2 = count ($secondArray)
forEach ($counter=$c1+1) to ($counter=$c1+$c2) {
$finalArray[$counter]=$secondArray[$counter-$c1]
}
1) Could you plaese give me your opinion on which way to perform this action is the best from the 3 exposed? Or if you have an other better solution to propose: please do so!
Implementing the c) solution I realized that performing "minus" in XPath didn't work! That's why I had to did it this way:
$finalArray = $firstArray
$c1 = count($firstArray)
$c2 = count ($secondArray)
forEach ($counter=1) to ($counter=$c2) {
$finalArray[$counter+$c1]=$secondArray[$counter]
}
2) Do you know why "minus" signs are not admitted? I think it's authorized in XPath, isn't it?
Thank you for your support,
Regards,
Seb!
-------------------- m2f --------------------
Subscribe/Unsubscribe emails notifications.
Response to this email will be posted on the Petals forum.
Please delete the existing text before responding :)
Read the topic online:
http://forum.petalslink.com/viewtopic.php?p=31250#31250
-------------------- m2f --------------------
More information about the Users
mailing list