[Users] Loop ForEach in Orchestra component

nguyen petals-components at ebmwebsourcing.com
Wed Mar 16 10:25:54 CET 2011


Hi,

I downloaded the petals-se-orchestra-1.0.2-SNAPSHOT from the site svn://svn.forge.objectweb.org/svnroot/petals, compiled by mvn and deployed in my petals instance.
However, I got always the error : "receive an ERROR status :{http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure" with the ForEach bpel clause.

This is my bpel code : 

Code:

<bpws:forEach parallel="no" counterName="counter" name="ForEachPeriode">
            <bpws:startCounterValue>
                <![CDATA[1]]>
            </bpws:startCounterValue>
            <bpws:finalCounterValue><![CDATA[3]]></bpws:finalCounterValue>
            <bpws:scope>
                <bpws:assign validate="no" name="ExtraiteXC01ResultToReleveDetteResponse"><bpws:copy>
                        <bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[$XC01PLResponse.xc01ResponsePart/ecarts/ecart[$counter]/xsd:CodePeriode]]>
                        </bpws:from>
                        <bpws:to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[$output.ReleveDetteResponse/tns:ecarts/tns:ecart[$counter]/tns:CodePeriode]]>
                        </bpws:to>
                    </bpws:copy>
</bpws:assign>
            </bpws:scope>
        </bpws:forEach>


 

And the error given by Petals is :

Code:

nitializer.java:157)
        at org.ow2.orchestra.definition.element.To$$EnhancerByCGLIB$$8032059f.se
tValue(<generated>)
        at org.ow2.orchestra.definition.element.Copy.execute(Copy.java:58)
        at org.ow2.orchestra.definition.activity.Assign.executeBusinessLogic(Ass
ign.java:51)
        at org.ow2.orchestra.definition.activity.AutomaticActivity.executeActivi
ty(AutomaticActivity.java:40)
        at org.ow2.orchestra.definition.activity.AbstractActivity.execute(Abstra
ctActivity.java:168)
        at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyI
nitializer.java:157)
        at org.ow2.orchestra.definition.activity.Assign$$EnhancerByCGLIB$$91a7a7
c8.execute(<generated>)
        at org.jbpm.pvm.internal.model.op.ExecuteNode.perform(ExecuteNode.java:5
5)
        at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(
ExecutionImpl.java:1000)
        at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(Exec
utionImpl.java:558)
        at org.jbpm.pvm.internal.model.ExecutionImpl.execute(ExecutionImpl.java:
468)
        at org.ow2.orchestra.definition.activity.Scope.executeActivity(Scope.jav
a:113)
        at org.ow2.orchestra.definition.activity.AbstractActivity.execute(Abstra
ctActivity.java:168)
        at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyI
nitializer.java:157)
        at org.ow2.orchestra.definition.activity.Scope$$EnhancerByCGLIB$$eb2b967
.execute(<generated>)
        at org.jbpm.pvm.internal.model.op.ExecuteNode.perform(ExecuteNode.java:5
5)
        at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(
ExecutionImpl.java:1000)
        at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(Exec
utionImpl.java:558)
        at org.jbpm.pvm.internal.model.ExecutionImpl.execute(ExecutionImpl.java:
468)
        at org.ow2.orchestra.definition.activity.ForEach.sequentialFor(ForEach.j
ava:235)
        at org.ow2.orchestra.definition.activity.ForEach.executeActivity(ForEach
.java:192)
        at org.ow2.orchestra.definition.activity.AbstractActivity.execute(Abstra
ctActivity.java:168)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyI
nitializer.java:157)
        at org.ow2.orchestra.definition.activity.ForEach$$EnhancerByCGLIB$$c4186
dbd.execute(<generated>)
        at org.jbpm.pvm.internal.model.op.ExecuteNode.perform(ExecuteNode.java:5
5)
        at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(
ExecutionImpl.java:1000)
        at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(Exec
utionImpl.java:558)
        at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:3
81)
        at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:3
75)
        at org.ow2.orchestra.services.Receiver$SignalExecCommand.execute(Receive
r.java:120)
        at org.ow2.orchestra.services.Receiver$SignalExecCommand.execute(Receive
r.java:107)
        at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultComman
dService.java:42)
        at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(Stand
ardTransactionInterceptor.java:54)
        at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentI
nterceptor.java:40)
        at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.j
ava:52)
        at org.ow2.orchestra.services.Receiver.handle(Receiver.java:177)
        at org.ow2.petals.engine.orchestra.jbi.JBIReceiver.onJBIMessageReceived(
JBIReceiver.java:186)
        at org.ow2.petals.engine.orchestra.listener.JBIListener.onJBIMessage(JBI
Listener.java:159)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.
processInOutAsProvider(MessageExchangeProcessor.java:524)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.
processAsProvider(MessageExchangeProcessor.java:421)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.
process(MessageExchangeProcessor.java:308)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.
run(MessageExchangeProcessor.java:145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[Petals.Container.Components.petals-se-orchestra]-INFO 2008-12-23 10:41:57,600 s
tate of the execution = active
[Petals.Container.Components.petals-se-orchestra]-INFO 2008-12-23 10:41:57,663 d
elete the execution
[Petals.Container.Components.petals-se-orchestra]-SEVERE 2008-12-23 10:41:57,663
 The MessageExchange state and the current Role do not allow this operation.
javax.jbi.messaging.MessagingException: The MessageExchange state and the curren
t Role do not allow this operation.
        at org.objectweb.petals.jbi.messaging.exchange.MessageExchangeImpl.setFa
ult(MessageExchangeImpl.java:297)
        at org.objectweb.petals.jbi.messaging.exchange.MessageExchangeDecorator.
setFault(MessageExchangeDecorator.java:297)
        at org.ow2.petals.component.framework.message.ExchangeImpl.setFault(Exch
angeImpl.java:291)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.
processInOutAsProvider(MessageExchangeProcessor.java:537)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.
processAsProvider(MessageExchangeProcessor.java:421)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.
process(MessageExchangeProcessor.java:308)
        at org.ow2.petals.component.framework.listener.MessageExchangeProcessor.
run(MessageExchangeProcessor.java:145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[Petals.Container.Components.petals-sample-client-1.5-SNAPSHOINFO 2008-12-23 10:
41:57,663 process(org.objectweb.petals.jbi.messaging.exchange.types.InOutImpl at b4
4cf3)




But when I replace the ForEach bpel clause by a sequence of copy clauses. It works correctly !

Code:

<bpws:assign validate="no" name="ExtraiteXC01ResultToReleveDetteResponse">
                     <bpws:copy>
                        <bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[$XC01PLResponse.xc01ResponsePart/ecarts/ecart[1]/xsd:CodePeriode]]>
                        </bpws:from>
                        <bpws:to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[$output.ReleveDetteResponse/tns:ecarts/tns:ecart[1]/tns:CodePeriode]]>
                        </bpws:to>
                    </bpws:copy>
<bpws:copy>
                        <bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[$XC01PLResponse.xc01ResponsePart/ecarts/ecart[2]/xsd:CodePeriode]]>
                        </bpws:from>
                        <bpws:to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[$output.ReleveDetteResponse/tns:ecarts/tns:ecart[2]/tns:CodePeriode]]>
                        </bpws:to>
                    </bpws:copy>
<bpws:copy>
                        <bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[$XC01PLResponse.xc01ResponsePart/ecarts/ecart[3]/xsd:CodePeriode]]>
                        </bpws:from>
                        <bpws:to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                            <![CDATA[$output.ReleveDetteResponse/tns:ecarts/tns:ecart[3]/tns:CodePeriode]]>
                        </bpws:to>
                    </bpws:copy>
</bpws:assign>







-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=373#373

-------------------- m2f --------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/20bbb01a/attachment.htm>


More information about the Users mailing list