You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Dave Chodos <da...@gmail.com> on 2010/01/18 02:57:16 UTC

Correlation set problem

Hi,
   I have been trying to get a long-running "counter" process up and running
on ODE, but have run into timeout errors when I make repeated calls to the
process. Specifically, my process has a receive to initiate the process, and
then another receive in a while loop that increments the counter. The
initial call, and the first call to the increment operation appear to work
fine. Subsequent calls to the increment operation, however, simply time out,
and nothing is returned.

   Initially I was working with my own process, but then decided to try out
a sample "counter" process (which I found here:
http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/)
to 1) make sure that this process executed properly, and then 2) try and
figure out what was going wrong with my own code. To my surprise, this
process exhibited the same behaviour* (timeouts on increment calls after the
first one), which makes me think that either I'm passing the wrong
parameters into the process, or that there's a problem with my ODE setup.

   To test out whether the problem was with all correlation-based processes,
I wrote another process that has a sequence of different correlated receive
operations, and this one works fine. However, calling different operations
within a loop (using a pick within a while loop, for instance) results in
the same timeout problem. Thus, it seems that the problem is with calling
receive(s) multiple times within a loop (while, do-while, for-each, etc.)

   I am running Apache Tomcat 5.5.27 on Unix, and using ODE 1.3.3. For what
it's worth, I'm using NetBeans to write my BPEL processes, but I haven't had
problems with other processes I've written, so I don't think it's a NetBeans
issue.

   I've attached the code for my counter process, as well as the code for
the working sequential correlation process. I also pasted my SOAP calls to
the counter process (generated using SoapUI) so that you can see what I've
tried there. I suspect that either there is something wrong with my
Apache/ODE setup or I am misunderstanding something fundamental about how
correlation sets work -- I'm relatively new to BPEL and web services, so
this is a definite possibility :)

   Thanks in advance for any help you can provide.

Dave Chodos

* When doing one last test this morning, I found that the counter process is
now timing out on the first attempt to call getAndIncrement, rather than the
second, like it was doing last night. Not sure what to make of this...
However, it is definitely not working as expected :(

*** call to init operation ***
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:coun="http://example.com/bpel/counter">
   <soapenv:Header/>
   <soapenv:Body>
      <coun:init>
         <name>testProc</name>
         <alias>testProcAlias</alias>
      </coun:init>
   </soapenv:Body>
</soapenv:Envelope>

*** call to getAndIncrement operation ***
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:coun="http://example.com/bpel/counter">
   <soapenv:Header/>
   <soapenv:Body>
      <coun:getAndIncrement>
         <name>testProc</name>
         <alias>testProcAlias</alias>
      </coun:getAndIncrement>
   </soapenv:Body>
</soapenv:Envelope>

Re: Correlation set problem

Posted by Dave Chodos <da...@gmail.com>.
Hi Brian,
   Unfortunately, I am also having some problems getting invocation to work
properly (see my recent post :( ), but once I get that figured out I will
give your idea a try and see if it helps. Although my mail program says that
it attached the BPEL files, according to the mailing list archive they
didn't actually get attached. Thus, I have included the BPEL files at the
end of this email. Thanks,

Dave

*** SimpleTest.bpel ***
<?xml version="1.0" encoding="UTF-8"?>
<process
    name="SimpleTest"
    targetNamespace="
http://enterprise.netbeans.org/bpel/SimpleTest/SimpleTest"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:sxt="
http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace"
    xmlns:sxed="
http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor"
    xmlns:tns="http://enterprise.netbeans.org/bpel/SimpleTest/SimpleTest"
xmlns:ns0="http://j2ee.netbeans.org/wsdl/SimpleTest">
    <import namespace="http://j2ee.netbeans.org/wsdl/SimpleTest"
location="SimpleTest.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>


    <partnerLinks>
        <partnerLink name="PartnerLink1" xmlns:tns="
http://j2ee.netbeans.org/wsdl/SimpleTest" partnerLinkType="tns:SimpleTest"
myRole="SimpleTestPortTypeRole"/>
    </partnerLinks>

    <variables>
        <variable name="CallCount" type="xsd:int"/>
        <variable name="SimpleTestStartOpOut"
messageType="ns0:SimpleTestStartOpResponse"/>
        <variable name="SimpleTestStartOpIn"
messageType="ns0:SimpleTestStartOpRequest"/>
        <variable name="SimpleTestOperationOut" xmlns:tns="
http://j2ee.netbeans.org/wsdl/SimpleTest"
messageType="tns:SimpleTestOperationResponse"/>
        <variable name="SimpleTestOperationIn" xmlns:tns="
http://j2ee.netbeans.org/wsdl/SimpleTest"
messageType="tns:SimpleTestOperationRequest"/>
    </variables>

    <correlationSets>
        <correlationSet name="CorrelationSet1" properties="ns0:InstanceID"/>
    </correlationSets>
    <sequence>
        <receive name="Receive1" createInstance="yes"
partnerLink="PartnerLink1" operation="SimpleTestStartOp"
portType="ns0:SimpleTestPortType" variable="SimpleTestStartOpIn">
            <correlations>
                <correlation set="CorrelationSet1" initiate="yes"/>
            </correlations>
        </receive>
        <assign name="Assign1">
            <copy>
                <from>0</from>
                <to variable="CallCount"/>
            </copy>
            <copy>
                <from variable="SimpleTestStartOpIn" part="part1"/>
                <to variable="SimpleTestStartOpOut" part="part1"/>
            </copy>
        </assign>

        <reply name="Reply1" partnerLink="PartnerLink1"
operation="SimpleTestStartOp" portType="ns0:SimpleTestPortType"
variable="SimpleTestStartOpOut">
            <correlations>
                <correlation set="CorrelationSet1" initiate="no"/>
            </correlations>
        </reply>
        <while name="While1">
            <condition>$CallCount &lt; 5</condition>
            <sequence name="Sequence1">
                <receive name="Receive2" partnerLink="PartnerLink1"
operation="SimpleTestOperation" portType="ns0:SimpleTestPortType"
createInstance="no" variable="SimpleTestOperationIn">
                    <correlations>
                            <correlation set="CorrelationSet1"
initiate="no"/>
                        </correlations>
                </receive>
                <assign name="Increment">
                    <copy>
                            <from>$CallCount + 1</from>
                                <to variable="CallCount"/>
                        </copy>
                </assign>
                <assign name="Print">
                    <copy>
                            <from>concat('Param: ',
$SimpleTestOperationIn.InputPart1, ' Count: ', string($CallCount))</from>
                                <to variable="SimpleTestOperationOut"
part="OutputPart1"/>
                        </copy>
                </assign>
                <reply name="Reply2" partnerLink="PartnerLink1"
operation="SimpleTestOperation" portType="ns0:SimpleTestPortType"
variable="SimpleTestOperationOut"/>
            </sequence>
        </while>
    </sequence>
</process>

*** SimpleTest_Seq.bpel ***
<?xml version="1.0" encoding="UTF-8"?>
<process
    name="SimpleTest"
    targetNamespace="
http://enterprise.netbeans.org/bpel/SimpleTest/SimpleTest"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:sxt="
http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace"
    xmlns:sxed="
http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor"
    xmlns:tns="http://enterprise.netbeans.org/bpel/SimpleTest/SimpleTest"
xmlns:ns0="http://j2ee.netbeans.org/wsdl/SimpleTest">
    <import namespace="http://j2ee.netbeans.org/wsdl/SimpleTest"
location="SimpleTest.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>


    <partnerLinks>
        <partnerLink name="PartnerLink1" xmlns:tns="
http://j2ee.netbeans.org/wsdl/SimpleTest" partnerLinkType="tns:SimpleTest"
myRole="SimpleTestPortTypeRole"/>
    </partnerLinks>

    <variables>
        <variable name="SimpleTestThirdOpOut"
messageType="ns0:SimpleTestThirdOpResponse"/>
        <variable name="SimpleTestThirdOpIn"
messageType="ns0:SimpleTestThirdOpRequest"/>
        <variable name="CallCount" type="xsd:int"/>
        <variable name="SimpleTestStartOpOut"
messageType="ns0:SimpleTestStartOpResponse"/>
        <variable name="SimpleTestStartOpIn"
messageType="ns0:SimpleTestStartOpRequest"/>
        <variable name="SimpleTestOperationOut" xmlns:tns="
http://j2ee.netbeans.org/wsdl/SimpleTest"
messageType="tns:SimpleTestOperationResponse"/>
        <variable name="SimpleTestOperationIn" xmlns:tns="
http://j2ee.netbeans.org/wsdl/SimpleTest"
messageType="tns:SimpleTestOperationRequest"/>
    </variables>

    <correlationSets>
        <correlationSet name="CorrelationSet1" properties="ns0:InstanceID"/>
    </correlationSets>
    <sequence>
        <receive name="Receive1" createInstance="yes"
partnerLink="PartnerLink1" operation="SimpleTestStartOp"
portType="ns0:SimpleTestPortType" variable="SimpleTestStartOpIn">
            <correlations>
                <correlation set="CorrelationSet1" initiate="yes"/>
            </correlations>
        </receive>
        <assign name="Assign1">
            <copy>
                    <from>concat('Initializing workflow: ',
$SimpleTestStartOpIn.part1)</from>
                        <to variable="SimpleTestStartOpOut" part="part1"/>
                </copy>
            <copy>
                <from>0</from>
                <to variable="CallCount"/>
            </copy>
        </assign>
        <reply name="Reply1" partnerLink="PartnerLink1"
operation="SimpleTestStartOp" portType="ns0:SimpleTestPortType"
variable="SimpleTestStartOpOut"/>
        <receive name="Receive2" partnerLink="PartnerLink1"
operation="SimpleTestOperation" portType="ns0:SimpleTestPortType"
createInstance="no" variable="SimpleTestOperationIn">
            <correlations>
                    <correlation set="CorrelationSet1" initiate="no"/>
                </correlations>
        </receive>
        <assign name="Increment">
            <copy>
                    <from>$CallCount + 1</from>
                        <to variable="CallCount"/>
                </copy>
        </assign>
        <assign name="Print">
            <copy>
                    <from>concat('Response: ',
$SimpleTestOperationIn.InputPart1, 'Call count: ',
string($CallCount))</from>
                        <to variable="SimpleTestOperationOut"
part="OutputPart1"/>
                </copy>
        </assign>
        <reply name="Reply2" partnerLink="PartnerLink1"
operation="SimpleTestOperation" portType="ns0:SimpleTestPortType"
variable="SimpleTestOperationOut">
                    </reply>
        <receive name="Receive3" partnerLink="PartnerLink1"
operation="SimpleTestThirdOp" portType="ns0:SimpleTestPortType"
createInstance="no" variable="SimpleTestThirdOpIn">
            <correlations>
                    <correlation set="CorrelationSet1" initiate="no"/>
                </correlations>
        </receive>
        <assign name="IncrementAgain">
            <copy>
                <from>$CallCount + 1</from>
                <to variable="CallCount"/>
            </copy>
        </assign>
        <assign name="PrintAgain">
            <copy>
                    <from>concat('Response: ', $SimpleTestThirdOpIn.part1, '
New call count: ', string($CallCount))</from>
                        <to variable="SimpleTestThirdOpOut" part="part1"/>
                </copy>
        </assign>
        <reply name="Reply3" partnerLink="PartnerLink1"
operation="SimpleTestThirdOp" portType="ns0:SimpleTestPortType"
variable="SimpleTestThirdOpOut"/>
    </sequence>
</process>

On Mon, Jan 18, 2010 at 10:18 AM, Brian Lund <br...@concur.com> wrote:

> Hi Dave,
> I had a bit of trouble getting the correlations to work inside loops as
> well.  Your BPEL(s) didn¹t come across for me so i¹m not sure if you¹re
> already tried this, but have you tried to break out the sequence/flow
> inside
> your loop into It¹s own process (i.e. The first activity inside the loop
> would be an invoke, and the other process would instantiate a new process
> on
> each receive)?  Perhaps it would be an easier correlation to create since
> ode would be spawning an entirely new process to send message(s) to?
> I would be very interested in your solution when you get this to work.
>
> Thanks,
> Brian
>
> On 1/17/10 5:57 PM, "Dave Chodos" <da...@gmail.com> wrote:
>
> > Hi,
> >    I have been trying to get a long-running "counter" process up and
> running
> > on ODE, but have run into timeout errors when I make repeated calls to
> the
> > process. Specifically, my process has a receive to initiate the process,
> and
> > then another receive in a while loop that increments the counter. The
> initial
> > call, and the first call to the increment operation appear to work fine.
> > Subsequent calls to the increment operation, however, simply time out,
> and
> > nothing is returned.
> >
> >    Initially I was working with my own process, but then decided to try
> out a
> > sample "counter" process (which I found
> > here:
> http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/resources/bp
> > el/2.0/TestCounter/) to 1) make sure that this process executed properly,
> and
> > then 2) try and figure out what was going wrong with my own code. To my
> > surprise, this process exhibited the same behaviour* (timeouts on
> increment
> > calls after the first one), which makes me think that either I'm passing
> the
> > wrong parameters into the process, or that there's a problem with my ODE
> > setup.
> >
> >    To test out whether the problem was with all correlation-based
> processes, I
> > wrote another process that has a sequence of different correlated receive
> > operations, and this one works fine. However, calling different
> operations
> > within a loop (using a pick within a while loop, for instance) results in
> the
> > same timeout problem. Thus, it seems that the problem is with calling
> > receive(s) multiple times within a loop (while, do-while, for-each, etc.)
> >
> >    I am running Apache Tomcat 5.5.27 on Unix, and using ODE 1.3.3. For
> what
> > it's worth, I'm using NetBeans to write my BPEL processes, but I haven't
> had
> > problems with other processes I've written, so I don't think it's a
> NetBeans
> > issue.
> >
> >    I've attached the code for my counter process, as well as the code for
> the
> > working sequential correlation process. I also pasted my SOAP calls to
> the
> > counter process (generated using SoapUI) so that you can see what I've
> tried
> > there. I suspect that either there is something wrong with my Apache/ODE
> setup
> > or I am misunderstanding something fundamental about how correlation sets
> work
> > -- I'm relatively new to BPEL and web services, so this is a definite
> > possibility :)
> >
> >    Thanks in advance for any help you can provide.
> >
> > Dave Chodos
> >
> > * When doing one last test this morning, I found that the counter process
> is
> > now timing out on the first attempt to call getAndIncrement, rather than
> the
> > second, like it was doing last night. Not sure what to make of this...
> > However, it is definitely not working as expected :(
> >
> > *** call to init operation ***
> > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:coun="http://example.com/bpel/counter">
> >    <soapenv:Header/>
> >    <soapenv:Body>
> >       <coun:init>
> >          <name>testProc</name>
> >          <alias>testProcAlias</alias>
> >       </coun:init>
> >    </soapenv:Body>
> > </soapenv:Envelope>
> >
> > *** call to getAndIncrement operation ***
> > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:coun="http://example.com/bpel/counter">
> >    <soapenv:Header/>
> >    <soapenv:Body>
> >       <coun:getAndIncrement>
> >          <name>testProc</name>
> >          <alias>testProcAlias</alias>
> >       </coun:getAndIncrement>
> >    </soapenv:Body>
> > </soapenv:Envelope>
>
>

RE: Correlation set problem

Posted by Jonathan Coogan <Jo...@Attachmate.com>.
 Thank you, Rafal. See https://issues.apache.org/jira/browse/ODE-760

-Jon

-----Original Message-----
From: Rafal Rusin [mailto:rafal.rusin@gmail.com] 
Sent: Thursday, February 04, 2010 5:37 PM
To: user@ode.apache.org
Subject: Re: Correlation set problem

I tried your process on ODE 1.3.3 and it shows this error.
Please create a Jira entry for it, because it's a bug.

On 5 February 2010 01:07, Jonathan Coogan <Jo...@attachmate.com> wrote:
> I recently ran into this problem also (Ode 1.3.3, war distribution).  I'd like to know if any of the Ode devlopers can comment on this.
>
> In my tests it fails even without a loop.  If you have more than 2 Receive activities (with correlation) the server will throw an internal error on the 3rd one.  The first 2 work.
>
> Here's a stupid simple example.  I created a process that you can call 4 times to add 4 different numbers together.  Each time you call it you pass in an int value and a String that is used to identify the instance.  Each time you call it, the process will return the running sum of the previous inputs.  After the 4th input the process will complete.  It works the 1st 2 times and hangs on the 3rd run.  The server console says, "INTERNAL ERROR: No ENTRY for RESPONSE CHANNEL 20" and prints this stacktrace:
>
> java.lang.IllegalArgumentException: INTERNAL ERROR: No ENTRY for 
> RESPONSE CHANNEL 20
>        at 
> org.apache.ode.bpel.engine.OutstandingRequestManager.associate(Outstan
> dingRequestManager.java:145)
>        at 
> org.apache.ode.bpel.engine.BpelRuntimeContextImpl.inputMsgMatch(BpelRu
> ntimeContextImpl.java:934)
>        at 
> org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeInstance(Partne
> rLinkMyRoleImpl.java:220)
>        at 
> org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:
> 241)
>        at 
> org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.jav
> a:408)
>        at 
> org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImp
> l.java:439)
>        at 
> org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImp
> l.java:441)
>        at 
> org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleSchedul
> er.java:411)
>        at 
> org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleSchedul
> er.java:405)
>        at 
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simple
> Scheduler.java:218)
>        at 
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler
> .java:404)
>        at 
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler
> .java:401)
>        at 
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
> tor.java:886)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:908)
>        at java.lang.Thread.run(Thread.java:619)
>
> Thank you.
> -Jon
>
>
>
> -----Original Message-----
> From: Brian Lund [mailto:brian.lund@concur.com]
> Sent: Monday, January 18, 2010 9:18 AM
> To: user@ode.apache.org
> Subject: Re: Correlation set problem
>
> Hi Dave,
> I had a bit of trouble getting the correlations to work inside loops as well.  Your BPEL(s) didn¹t come across for me so i¹m not sure if you¹re already tried this, but have you tried to break out the sequence/flow inside your loop into It¹s own process (i.e. The first activity inside the loop would be an invoke, and the other process would instantiate a new process on each receive)?  Perhaps it would be an easier correlation to create since ode would be spawning an entirely new process to send message(s) to?
> I would be very interested in your solution when you get this to work.
>
> Thanks,
> Brian
>
> On 1/17/10 5:57 PM, "Dave Chodos" <da...@gmail.com> wrote:
>
>> Hi,
>>    I have been trying to get a long-running "counter" process up and 
>> running on ODE, but have run into timeout errors when I make repeated 
>> calls to the process. Specifically, my process has a receive to 
>> initiate the process, and then another receive in a while loop that 
>> increments the counter. The initial call, and the first call to the increment operation appear to work fine.
>> Subsequent calls to the increment operation, however, simply time 
>> out, and nothing is returned.
>>
>>    Initially I was working with my own process, but then decided to 
>> try out a sample "counter" process (which I found 
>> here:http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/res
>> o
>> urces/bp
>> el/2.0/TestCounter/) to 1) make sure that this process executed 
>> properly, and then 2) try and figure out what was going wrong with my 
>> own code. To my surprise, this process exhibited the same behaviour* 
>> (timeouts on increment calls after the first one), which makes me 
>> think that either I'm passing the wrong parameters into the process, 
>> or that there's a problem with my ODE setup.
>>
>>    To test out whether the problem was with all correlation-based 
>> processes, I wrote another process that has a sequence of different 
>> correlated receive operations, and this one works fine. However, 
>> calling different operations within a loop (using a pick within a 
>> while loop, for instance) results in the same timeout problem. Thus, 
>> it seems that the problem is with calling
>> receive(s) multiple times within a loop (while, do-while, for-each,
>> etc.)
>>
>>    I am running Apache Tomcat 5.5.27 on Unix, and using ODE 1.3.3. 
>> For what it's worth, I'm using NetBeans to write my BPEL processes, 
>> but I haven't had problems with other processes I've written, so I 
>> don't think it's a NetBeans issue.
>>
>>    I've attached the code for my counter process, as well as the code 
>> for the working sequential correlation process. I also pasted my SOAP 
>> calls to the counter process (generated using SoapUI) so that you can 
>> see what I've tried there. I suspect that either there is something 
>> wrong with my Apache/ODE setup or I am misunderstanding something 
>> fundamental about how correlation sets work
>> -- I'm relatively new to BPEL and web services, so this is a definite 
>> possibility :)
>>
>>    Thanks in advance for any help you can provide.
>>
>> Dave Chodos
>>
>> * When doing one last test this morning, I found that the counter 
>> process is now timing out on the first attempt to call 
>> getAndIncrement, rather than the second, like it was doing last night. Not sure what to make of this...
>> However, it is definitely not working as expected :(
>>
>> *** call to init operation ***
>> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:coun="http://example.com/bpel/counter">
>>    <soapenv:Header/>
>>    <soapenv:Body>
>>       <coun:init>
>>          <name>testProc</name>
>>          <alias>testProcAlias</alias>
>>       </coun:init>
>>    </soapenv:Body>
>> </soapenv:Envelope>
>>
>> *** call to getAndIncrement operation *** <soapenv:Envelope 
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:coun="http://example.com/bpel/counter">
>>    <soapenv:Header/>
>>    <soapenv:Body>
>>       <coun:getAndIncrement>
>>          <name>testProc</name>
>>          <alias>testProcAlias</alias>
>>       </coun:getAndIncrement>
>>    </soapenv:Body>
>> </soapenv:Envelope>
>
>


Regards,
--
Rafał Rusin
http://rrusin.blogspot.com
http://www.touk.pl
http://top.touk.pl

Re: Correlation set problem

Posted by Rafal Rusin <ra...@gmail.com>.
I tried your process on ODE 1.3.3 and it shows this error.
Please create a Jira entry for it, because it's a bug.

On 5 February 2010 01:07, Jonathan Coogan
<Jo...@attachmate.com> wrote:
> I recently ran into this problem also (Ode 1.3.3, war distribution).  I'd like to know if any of the Ode devlopers can comment on this.
>
> In my tests it fails even without a loop.  If you have more than 2 Receive activities (with correlation) the server will throw an internal error on the 3rd one.  The first 2 work.
>
> Here's a stupid simple example.  I created a process that you can call 4 times to add 4 different numbers together.  Each time you call it you pass in an int value and a String that is used to identify the instance.  Each time you call it, the process will return the running sum of the previous inputs.  After the 4th input the process will complete.  It works the 1st 2 times and hangs on the 3rd run.  The server console says, "INTERNAL ERROR: No ENTRY for RESPONSE CHANNEL 20" and prints this stacktrace:
>
> java.lang.IllegalArgumentException: INTERNAL ERROR: No ENTRY for RESPONSE CHANNEL 20
>        at org.apache.ode.bpel.engine.OutstandingRequestManager.associate(OutstandingRequestManager.java:145)
>        at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.inputMsgMatch(BpelRuntimeContextImpl.java:934)
>        at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeInstance(PartnerLinkMyRoleImpl.java:220)
>        at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:241)
>        at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:408)
>        at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:439)
>        at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:441)
>        at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:411)
>        at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:405)
>        at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:218)
>        at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:404)
>        at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:401)
>        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:619)
>
> Thank you.
> -Jon
>
>
>
> -----Original Message-----
> From: Brian Lund [mailto:brian.lund@concur.com]
> Sent: Monday, January 18, 2010 9:18 AM
> To: user@ode.apache.org
> Subject: Re: Correlation set problem
>
> Hi Dave,
> I had a bit of trouble getting the correlations to work inside loops as well.  Your BPEL(s) didn¹t come across for me so i¹m not sure if you¹re already tried this, but have you tried to break out the sequence/flow inside your loop into It¹s own process (i.e. The first activity inside the loop would be an invoke, and the other process would instantiate a new process on each receive)?  Perhaps it would be an easier correlation to create since ode would be spawning an entirely new process to send message(s) to?
> I would be very interested in your solution when you get this to work.
>
> Thanks,
> Brian
>
> On 1/17/10 5:57 PM, "Dave Chodos" <da...@gmail.com> wrote:
>
>> Hi,
>>    I have been trying to get a long-running "counter" process up and
>> running on ODE, but have run into timeout errors when I make repeated
>> calls to the process. Specifically, my process has a receive to
>> initiate the process, and then another receive in a while loop that
>> increments the counter. The initial call, and the first call to the increment operation appear to work fine.
>> Subsequent calls to the increment operation, however, simply time out,
>> and nothing is returned.
>>
>>    Initially I was working with my own process, but then decided to
>> try out a sample "counter" process (which I found
>> here:http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/reso
>> urces/bp
>> el/2.0/TestCounter/) to 1) make sure that this process executed
>> properly, and then 2) try and figure out what was going wrong with my
>> own code. To my surprise, this process exhibited the same behaviour*
>> (timeouts on increment calls after the first one), which makes me
>> think that either I'm passing the wrong parameters into the process,
>> or that there's a problem with my ODE setup.
>>
>>    To test out whether the problem was with all correlation-based
>> processes, I wrote another process that has a sequence of different
>> correlated receive operations, and this one works fine. However,
>> calling different operations within a loop (using a pick within a
>> while loop, for instance) results in the same timeout problem. Thus,
>> it seems that the problem is with calling
>> receive(s) multiple times within a loop (while, do-while, for-each,
>> etc.)
>>
>>    I am running Apache Tomcat 5.5.27 on Unix, and using ODE 1.3.3. For
>> what it's worth, I'm using NetBeans to write my BPEL processes, but I
>> haven't had problems with other processes I've written, so I don't
>> think it's a NetBeans issue.
>>
>>    I've attached the code for my counter process, as well as the code
>> for the working sequential correlation process. I also pasted my SOAP
>> calls to the counter process (generated using SoapUI) so that you can
>> see what I've tried there. I suspect that either there is something
>> wrong with my Apache/ODE setup or I am misunderstanding something
>> fundamental about how correlation sets work
>> -- I'm relatively new to BPEL and web services, so this is a definite
>> possibility :)
>>
>>    Thanks in advance for any help you can provide.
>>
>> Dave Chodos
>>
>> * When doing one last test this morning, I found that the counter
>> process is now timing out on the first attempt to call
>> getAndIncrement, rather than the second, like it was doing last night. Not sure what to make of this...
>> However, it is definitely not working as expected :(
>>
>> *** call to init operation ***
>> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:coun="http://example.com/bpel/counter">
>>    <soapenv:Header/>
>>    <soapenv:Body>
>>       <coun:init>
>>          <name>testProc</name>
>>          <alias>testProcAlias</alias>
>>       </coun:init>
>>    </soapenv:Body>
>> </soapenv:Envelope>
>>
>> *** call to getAndIncrement operation *** <soapenv:Envelope
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:coun="http://example.com/bpel/counter">
>>    <soapenv:Header/>
>>    <soapenv:Body>
>>       <coun:getAndIncrement>
>>          <name>testProc</name>
>>          <alias>testProcAlias</alias>
>>       </coun:getAndIncrement>
>>    </soapenv:Body>
>> </soapenv:Envelope>
>
>


Regards,
-- 
Rafał Rusin
http://rrusin.blogspot.com
http://www.touk.pl
http://top.touk.pl

RE: Correlation set problem

Posted by Jonathan Coogan <Jo...@Attachmate.com>.
I recently ran into this problem also (Ode 1.3.3, war distribution).  I'd like to know if any of the Ode devlopers can comment on this.

In my tests it fails even without a loop.  If you have more than 2 Receive activities (with correlation) the server will throw an internal error on the 3rd one.  The first 2 work.

Here's a stupid simple example.  I created a process that you can call 4 times to add 4 different numbers together.  Each time you call it you pass in an int value and a String that is used to identify the instance.  Each time you call it, the process will return the running sum of the previous inputs.  After the 4th input the process will complete.  It works the 1st 2 times and hangs on the 3rd run.  The server console says, "INTERNAL ERROR: No ENTRY for RESPONSE CHANNEL 20" and prints this stacktrace:

java.lang.IllegalArgumentException: INTERNAL ERROR: No ENTRY for RESPONSE CHANNEL 20
        at org.apache.ode.bpel.engine.OutstandingRequestManager.associate(OutstandingRequestManager.java:145)
        at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.inputMsgMatch(BpelRuntimeContextImpl.java:934)
        at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeInstance(PartnerLinkMyRoleImpl.java:220)
        at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:241)
        at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:408)
        at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:439)
        at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:441)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:411)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:405)
        at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:218)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:404)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:401)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

Thank you.
-Jon



-----Original Message-----
From: Brian Lund [mailto:brian.lund@concur.com] 
Sent: Monday, January 18, 2010 9:18 AM
To: user@ode.apache.org
Subject: Re: Correlation set problem

Hi Dave,
I had a bit of trouble getting the correlations to work inside loops as well.  Your BPEL(s) didn¹t come across for me so i¹m not sure if you¹re already tried this, but have you tried to break out the sequence/flow inside your loop into It¹s own process (i.e. The first activity inside the loop would be an invoke, and the other process would instantiate a new process on each receive)?  Perhaps it would be an easier correlation to create since ode would be spawning an entirely new process to send message(s) to?
I would be very interested in your solution when you get this to work.

Thanks,
Brian

On 1/17/10 5:57 PM, "Dave Chodos" <da...@gmail.com> wrote:

> Hi,
>    I have been trying to get a long-running "counter" process up and 
> running on ODE, but have run into timeout errors when I make repeated 
> calls to the process. Specifically, my process has a receive to 
> initiate the process, and then another receive in a while loop that 
> increments the counter. The initial call, and the first call to the increment operation appear to work fine.
> Subsequent calls to the increment operation, however, simply time out, 
> and nothing is returned.
> 
>    Initially I was working with my own process, but then decided to 
> try out a sample "counter" process (which I found 
> here:http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/reso
> urces/bp
> el/2.0/TestCounter/) to 1) make sure that this process executed 
> properly, and then 2) try and figure out what was going wrong with my 
> own code. To my surprise, this process exhibited the same behaviour* 
> (timeouts on increment calls after the first one), which makes me 
> think that either I'm passing the wrong parameters into the process, 
> or that there's a problem with my ODE setup.
> 
>    To test out whether the problem was with all correlation-based 
> processes, I wrote another process that has a sequence of different 
> correlated receive operations, and this one works fine. However, 
> calling different operations within a loop (using a pick within a 
> while loop, for instance) results in the same timeout problem. Thus, 
> it seems that the problem is with calling
> receive(s) multiple times within a loop (while, do-while, for-each, 
> etc.)
> 
>    I am running Apache Tomcat 5.5.27 on Unix, and using ODE 1.3.3. For 
> what it's worth, I'm using NetBeans to write my BPEL processes, but I 
> haven't had problems with other processes I've written, so I don't 
> think it's a NetBeans issue.
> 
>    I've attached the code for my counter process, as well as the code 
> for the working sequential correlation process. I also pasted my SOAP 
> calls to the counter process (generated using SoapUI) so that you can 
> see what I've tried there. I suspect that either there is something 
> wrong with my Apache/ODE setup or I am misunderstanding something 
> fundamental about how correlation sets work
> -- I'm relatively new to BPEL and web services, so this is a definite 
> possibility :)
> 
>    Thanks in advance for any help you can provide.
> 
> Dave Chodos
> 
> * When doing one last test this morning, I found that the counter 
> process is now timing out on the first attempt to call 
> getAndIncrement, rather than the second, like it was doing last night. Not sure what to make of this...
> However, it is definitely not working as expected :(
> 
> *** call to init operation ***
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:coun="http://example.com/bpel/counter">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <coun:init>
>          <name>testProc</name>
>          <alias>testProcAlias</alias>
>       </coun:init>
>    </soapenv:Body>
> </soapenv:Envelope>
> 
> *** call to getAndIncrement operation *** <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:coun="http://example.com/bpel/counter">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <coun:getAndIncrement>
>          <name>testProc</name>
>          <alias>testProcAlias</alias>
>       </coun:getAndIncrement>
>    </soapenv:Body>
> </soapenv:Envelope>


Re: Correlation set problem

Posted by Brian Lund <br...@concur.com>.
Hi Dave, 
I had a bit of trouble getting the correlations to work inside loops as
well.  Your BPEL(s) didn¹t come across for me so i¹m not sure if you¹re
already tried this, but have you tried to break out the sequence/flow inside
your loop into It¹s own process (i.e. The first activity inside the loop
would be an invoke, and the other process would instantiate a new process on
each receive)?  Perhaps it would be an easier correlation to create since
ode would be spawning an entirely new process to send message(s) to?
I would be very interested in your solution when you get this to work.

Thanks,
Brian

On 1/17/10 5:57 PM, "Dave Chodos" <da...@gmail.com> wrote:

> Hi,
>    I have been trying to get a long-running "counter" process up and running
> on ODE, but have run into timeout errors when I make repeated calls to the
> process. Specifically, my process has a receive to initiate the process, and
> then another receive in a while loop that increments the counter. The initial
> call, and the first call to the increment operation appear to work fine.
> Subsequent calls to the increment operation, however, simply time out, and
> nothing is returned.
> 
>    Initially I was working with my own process, but then decided to try out a
> sample "counter" process (which I found
> here:http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/resources/bp
> el/2.0/TestCounter/) to 1) make sure that this process executed properly, and
> then 2) try and figure out what was going wrong with my own code. To my
> surprise, this process exhibited the same behaviour* (timeouts on increment
> calls after the first one), which makes me think that either I'm passing the
> wrong parameters into the process, or that there's a problem with my ODE
> setup.
> 
>    To test out whether the problem was with all correlation-based processes, I
> wrote another process that has a sequence of different correlated receive
> operations, and this one works fine. However, calling different operations
> within a loop (using a pick within a while loop, for instance) results in the
> same timeout problem. Thus, it seems that the problem is with calling
> receive(s) multiple times within a loop (while, do-while, for-each, etc.)
> 
>    I am running Apache Tomcat 5.5.27 on Unix, and using ODE 1.3.3. For what
> it's worth, I'm using NetBeans to write my BPEL processes, but I haven't had
> problems with other processes I've written, so I don't think it's a NetBeans
> issue.
> 
>    I've attached the code for my counter process, as well as the code for the
> working sequential correlation process. I also pasted my SOAP calls to the
> counter process (generated using SoapUI) so that you can see what I've tried
> there. I suspect that either there is something wrong with my Apache/ODE setup
> or I am misunderstanding something fundamental about how correlation sets work
> -- I'm relatively new to BPEL and web services, so this is a definite
> possibility :)
> 
>    Thanks in advance for any help you can provide.
> 
> Dave Chodos
> 
> * When doing one last test this morning, I found that the counter process is
> now timing out on the first attempt to call getAndIncrement, rather than the
> second, like it was doing last night. Not sure what to make of this...
> However, it is definitely not working as expected :(
> 
> *** call to init operation ***
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:coun="http://example.com/bpel/counter">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <coun:init>
>          <name>testProc</name>
>          <alias>testProcAlias</alias>
>       </coun:init>
>    </soapenv:Body>
> </soapenv:Envelope>
> 
> *** call to getAndIncrement operation ***
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:coun="http://example.com/bpel/counter">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <coun:getAndIncrement>
>          <name>testProc</name>
>          <alias>testProcAlias</alias>
>       </coun:getAndIncrement>
>    </soapenv:Body>
> </soapenv:Envelope>