|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
Initialize bpel variableHow do I initialize a variable in the bpel mapper?
Nigel |
|
|
Re: Initialize bpel variableOn Thu, Feb 28, 2008 at 03:16:05AM -0800, Niggy wrote:
> How do I initialize a variable in the bpel mapper? Use an Assing operation. You can put a literal value in the first argument and connect the second to your variable. HTH, Wouter van Reeven -- People: "If she weighs the same as a Duck, she's made of wood!" Sir Bedevere: "And therefore...?" |
|
|
Re: Initialize bpel variableThanks Wouter. What would I do in a while loop?
Nigel
|
|
|
Re: Initialize bpel variableOn Thu, Feb 28, 2008 at 04:17:56AM -0800, Niggy wrote:
> Thanks Wouter. What would I do in a while loop? That depends on what you'd want to do :-) Can you be more specific? Greets, Wouter -- People: "If she weighs the same as a Duck, she's made of wood!" Sir Bedevere: "And therefore...?" |
|
|
Re: Initialize bpel variableI want to iterate through an invoked and received complex type using a counter in order to copy all the element values to my wsdl's complex type. I guess I need to initialize a counter which should always be less than the count of my complex types and then create an assign to map all the elements if all that makes sense?
Nigel
|
|
|
Re: Initialize bpel variableOn Thu, Feb 28, 2008 at 04:56:50AM -0800, Niggy wrote:
> I want to iterate through an invoked and received complex type using a > counter in order to copy all the element values to my wsdl's complex type. > I guess I need to initialize a counter which should always be less than the > count of my complex types and then create an assign to map all the elements > if all that makes sense? You can use the ForEach activity for that. You can find that in the Structured Activities palette. If you'd like to keep track of a counter you might initiate it to 0 before the ForEach activity and then increase the value inside the ForEach activity with another Assign activity. HTH, Wouter -- People: "If she weighs the same as a Duck, she's made of wood!" Sir Bedevere: "And therefore...?" |
|
|
Re: Initialize bpel variableI have it working almost. The For Each activity is iterating through an assign which copies the complex type and its elements. The trouble is that it is overwriting the data, so I only see the second item in a set of two. Any ideas?
Nigel
|
|
|
Re: Initialize bpel variable
Could it be because you are not using an index to access your repeating
elements? Repeating elements are like arrays, and you need to use
predicate expression to get or set values.
Perhaps this blog entry will help you do create predicate expression. http://blogs.sun.com/kiransden/resource/how_to_create_repeating_nodes/how_to_create_repeating_nodes.htm -Kiran. Niggy wrote: I have it working almost. The For Each activity is iterating through an assign which copies the complex type and its elements. The trouble is that it is overwriting the data, so I only see the second item in a set of two. Any ideas? Nigel Wouter van Reeven wrote: -- Kiran Bhumana Open ESB Community (http://open-esb.org) |
|
|
Re: Initialize bpel variableOK. If I set the predicate to 1, I get the first element and so on. That works. If I initialize a counter before the foreach and increment it in an assign during the foreach and use this counter+1 as the predicate - since the values are accessed from 1 upwards - I get a selectionFailure.
|
|
|
Re: Initialize bpel variable
Where do you get the selection failure? What does the log say? What
does your BPEL look like?
Did you use the BPEL debugger? Try using that to debug your project. Niggy wrote: OK. If I set the predicate to 1, I get the first element and so on. That works. If I initialize a counter before the foreach and increment it in an assign during the foreach and use this counter+1 as the predicate - since the values are accessed from 1 upwards - I get a selectionFailure. Kiran Bhumana-2 wrote:Could it be because you are not using an index to access your repeating elements? Repeating elements are like arrays, and you need to use predicate expression to get or set values. Perhaps this blog entry will help you do create predicate expression. http://blogs.sun.com/kiransden/resource/how_to_create_repeating_nodes/how_to_create_repeating_nodes.htm -Kiran. Niggy wrote: -- Kiran Bhumana Open ESB Community (http://open-esb.org) |
|
|
Re: Initialize bpel variableIts ok - I was iterating through the foreach loop too many times. Everything's working. Thanks for sticking with me on this.
Nigel
|
| Free Forum Powered by Nabble | Forum Help |