ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Spivey" <Les.Spi...@Attachmate.com>
Subject FW: using foreach counter
Date Thu, 13 Nov 2008 20:12:48 GMT
Alex, sorry, I was not subscribed to the list so I didn't get your reply
directly.  I am now.  Here is the bpel fragment containing the for each.
It was created with the Eclipse BPEL project's designer.  Please let me
know if you need anything else.

 

<bpws:forEach counterName="Counter" name="ForEach" parallel="no">

<bpws:startCounterValue
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![C
DATA[1]]></bpws:startCounterValue>

      <bpws:finalCounterValue
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![C
DATA[count($input.payload/tns:Names)]]></bpws:finalCounterValue>

<bpws:scope>

<bpws:sequence name="ForEachSequence">

                                                <bpws:assign
name="BuildOutput" validate="no">

 
<bpws:copy>

                                                <bpws:from
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![C
DATA[concat($output.payload,
$input.payload/tns:Names[$Counter])]]></bpws:from>

                                                <bpws:to part="payload"
variable="output"/>

 
</bpws:copy>

                                </bpws:assign>

                                <bpws:if name="IfDelimiterrRequierd">

                                                <bpws:assign
name="AddDelimiter" validate="no">

                                                <bpws:copy>

 
<bpws:from
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![C
DATA[concat($output.payload, ', ')]]></bpws:from>

                                                                <bpws:to
part="payload" variable="output"/>

                                                </bpws:copy>

                                                </bpws:assign>

                                                <bpws:condition
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![C
DATA[$Counter < count($input.payload/tns:Names)]]></bpws:condition>

                                </bpws:if>

</bpws:sequence>

</bpws:scope>

</bpws:forEach>

 

 

From: Les Spivey 
Sent: Thursday, November 13, 2008 10:38 AM
To: 'user@ode.apache.org'
Subject: 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

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message