You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Les Spivey <Le...@Attachmate.com> on 2008/11/13 19:38:20 UTC

using foreach counter

I am using the BPEL ForEach activity to loop over a list of names which
is the input value of the receive.  The name of my ForEach counter
variable is Counter.  The start counter value is 1 and the end counter
value is count($input.payload/tns:Names).  This works correctly.
However, within the scope of the ForEach I have an If with the condition
$Counter < count($input.payload/tns:Names).  Apparently, the condition
never evaluates to true since the body of the If is never entered.  Is
the syntax of the condition incorrect or is the problem with Counter?
Can the ForEach counter be used in this way?

 

Thanks.

Les

 


Re: using foreach counter

Posted by Alex Boisvert <bo...@intalio.com>.
On Thu, Nov 13, 2008 at 10:38 AM, Les Spivey <Le...@attachmate.com>wrote:

> I am using the BPEL ForEach activity to loop over a list of names which
> is the input value of the receive.  The name of my ForEach counter
> variable is Counter.  The start counter value is 1 and the end counter
> value is count($input.payload/tns:Names).  This works correctly.
> However, within the scope of the ForEach I have an If with the condition
> $Counter < count($input.payload/tns:Names).  Apparently, the condition
> never evaluates to true since the body of the If is never entered.  Is
> the syntax of the condition incorrect or is the problem with Counter?


The expression looks good.  Can you send a bigger fragment of your BPEL?

>
> Can the ForEach counter be used in this way?


Yes.

alex