Thanks stan for pointing out that attachments don't go through.

Here is the bpel code.

<!-- CorrTest BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Mon Mar 05 12:13:11 IST 2012 -->
<bpel:process name="CorrTest"
         targetNamespace="http://wso2.org/bps/sample";
         suppressJoinFailure="yes"
         xmlns:tns="http://wso2.org/bps/sample";
         xmlns:bpel="
http://docs.oasis-open.org/wsbpel/2.0/process/executable";
         xmlns:ns1="http://www.w3.org/2001/XMLSchema";>

    <!-- Import the client WSDL -->
    <bpel:import location="CorrTestArtifacts.wsdl" namespace="
http://wso2.org/bps/sample";
            importType="http://schemas.xmlsoap.org/wsdl/"; />

    <!-- =================================================================
-->
    <!-- PARTNERLINKS
-->
    <!-- List of services participating in this BPEL process
-->
    <!-- =================================================================
-->
    <bpel:partnerLinks>
        <!-- The 'client' role represents the requester of this service. -->
        <bpel:partnerLink name="client"
                     partnerLinkType="tns:CorrTest"
                     myRole="CorrTestProvider"
                     />
    </bpel:partnerLinks>

    <!-- =================================================================
-->
    <!-- VARIABLES
-->
    <!-- List of messages and XML documents used within this BPEL process
-->
    <!-- =================================================================
-->
    <bpel:variables>
        <!-- Reference to the message passed as input during initiation -->
        <bpel:variable name="input"
                  messageType="tns:CorrTestRequestMessage"/>

        <!--
          Reference to the message that will be returned to the requester
          -->
        <bpel:variable name="output"
                  messageType="tns:CorrTestResponseMessage"/>
        <bpel:variable name="corrRequest"
messageType="tns:CorrOperationRequest"></bpel:variable>
        <bpel:variable name="corrResponse"
messageType="tns:CorrOperationResponse"></bpel:variable>
        <bpel:variable name="onEventResponse"
messageType="tns:OnEventOperationResponse"></bpel:variable>

        <bpel:variable name="onEventRequest"
messageType="tns:OnEventOperationRequest"></bpel:variable>
    </bpel:variables>

    <!-- =================================================================
-->
    <!-- ORCHESTRATION LOGIC
-->
    <!-- Set of activities coordinating the flow of messages across the
-->
    <!-- services integrated within this business process
-->
    <!-- =================================================================
-->
    <bpel:correlationSets>
        <bpel:correlationSet name="CorrelationSet"
properties="tns:corrCorrId"></bpel:correlationSet>
    </bpel:correlationSets>


    <bpel:sequence name="main">

        <!-- Receive input from requester.
             Note: This maps to operation defined in CorrTest.wsdl
             -->
        <bpel:receive name="receiveInput" partnerLink="client"
                 portType="tns:CorrTest"
                 operation="process" variable="input"
                 createInstance="yes">
            <bpel:correlations>
                <bpel:correlation set="CorrelationSet"
initiate="yes"></bpel:correlation>
            </bpel:correlations>
        </bpel:receive>

    <bpel:scope>
          <bpel:eventHandlers>
            <bpel:onEvent partnerLink="client" operation="OnEventOperation"
portType="tns:CorrTest" variable="onEventRequest"
messageType="tns:OnEventOperationRequest">
        <bpel:correlations>
                <bpel:correlation set="CorrelationSet"
initiate="join"></bpel:correlation>
        </bpel:correlations>
            <bpel:scope>
                <bpel:sequence>
                    <bpel:assign validate="no" name="Assign2">
                        <bpel:copy>
                            <bpel:from>
                                <bpel:literal>
                                    <tns:OnEventOperationResponse
xmlns:tns="http://wso2.org/bps/sample"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";><tns:out>tns:out</tns:out>
                                    </tns:OnEventOperationResponse>
                                </bpel:literal>
                            </bpel:from>
                            <bpel:to variable="onEventResponse"
part="parameters"></bpel:to>
                        </bpel:copy>
                        <bpel:copy>
                            <bpel:from part="parameters"
variable="onEventRequest">
                                <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                                    <![CDATA[tns:in]]>
                                </bpel:query>
                            </bpel:from>
                            <bpel:to part="parameters"
variable="onEventResponse">
                                <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
                                    <![CDATA[tns:out]]>
                                </bpel:query>
                            </bpel:to>
                        </bpel:copy>
                    </bpel:assign>
                    <bpel:reply name="Reply1" partnerLink="client"
operation="OnEventOperation" portType="tns:CorrTest"
variable="onEventResponse"></bpel:reply>
                    <bpel:exit name="Exit"></bpel:exit>
                </bpel:sequence>
        </bpel:scope>

    </bpel:onEvent>
    </bpel:eventHandlers>

        <bpel:sequence name="main1">
<!-- Generate reply to synchronous request -->
        <bpel:assign validate="no" name="Assign">
            <bpel:copy>
                <bpel:from>
                    <bpel:literal>
                        <tns:CorrTestResponse xmlns:tns="
http://wso2.org/bps/sample"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
"><tns:result>tns:result</tns:result>

                        </tns:CorrTestResponse>
                    </bpel:literal>
                </bpel:from>
                <bpel:to variable="output" part="payload"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="payload" variable="input">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query>
                </bpel:from>
                <bpel:to part="payload" variable="output">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:reply name="replyOutput"
               partnerLink="client"
               portType="tns:CorrTest"
               operation="process"
               variable="output"
               >
        </bpel:reply>
        <bpel:receive name="Receive" partnerLink="client"
operation="CorrOperation" portType="tns:CorrTest" variable="corrRequest">
            <bpel:correlations>
                <bpel:correlation set="CorrelationSet"
initiate="no"></bpel:correlation>
            </bpel:correlations>
        </bpel:receive>
        <bpel:assign validate="no" name="Assign1">
            <bpel:copy>
                <bpel:from>
                    <bpel:literal>
                        <tns:CorrOperationResponse xmlns:tns="
http://wso2.org/bps/sample"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";><tns:out>tns:out</tns:out>

                        </tns:CorrOperationResponse>
                    </bpel:literal>
                </bpel:from>
                <bpel:to variable="corrResponse"
part="parameters"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="corrRequest">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:in]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="corrResponse">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:out]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:reply name="Reply" partnerLink="client"
operation="CorrOperation" portType="tns:CorrTest"
variable="corrResponse"></bpel:reply>
          </bpel:sequence>
    </bpel:scope>
 </bpel:sequence>
</bpel:process>






On Fri, Jun 21, 2013 at 7:48 PM, Sathwik B P <sathwik...@gmail.com> wrote:

> Here it is.
>
>
> On Fri, Jun 21, 2013 at 6:21 PM, Nandika Jayawardana 
> <jayaw...@gmail.com>wrote:
>
>> Hi Sathwik,
>>
>> Can you please resend the workaround bpel.
>>
>> Regards
>> Nandika
>>
>>
>> On Fri, Jun 21, 2013 at 1:45 PM, Sathwik B P <sathwik...@gmail.com>
>> wrote:
>>
>> > Hi Guys,
>> >
>> > PFA the changed bpel which works as expected.
>> >
>> > regards,
>> > sathwik
>> >
>> >
>> > On Fri, Jun 21, 2013 at 1:06 PM, Sathwik B P <sathwik...@gmail.com>
>> wrote:
>> >
>> >> Hi guys,
>> >>
>> >> The event handler is initialized even before the first receive is
>> >> initialized as it is defined within the process scope. Since the first
>> >> receive which initializes the correlated instance hasn't been processed
>> >> there is no way for the event handler to know the correlation value.
>> So the
>> >> onEvent message will never get routed to the right instance.
>> >>
>> >> I doubt we can fix anything here. if other ODE experts think otherwise
>> >> let me know.
>> >>
>> >> Now as a workaround for this problem I would suggest a change in
>> process
>> >> design. Put the first receive within a scope and the remaining
>> activities
>> >> within another scope and define the event handler on the second scope.
>> This
>> >> way the process instance would have been correlated and when the
>> execution
>> >> of the second scope starts the even handler would have the correlation
>> >> details.
>> >>
>> >> what do you think?
>> >>
>> >> regards,
>> >> sathwik
>> >>
>> >>
>> >> On Wed, Jun 19, 2013 at 1:25 PM, Nandika Jayawardana <
>> jayaw...@gmail.com>wrote:
>> >>
>> >>> Hi sathwik,
>> >>>
>> >>> This is exactly the behavior I observed.Finding the correlation keys
>> for
>> >>> the OnEvent  in EH_EVENT SELECT run() method fails for some reason and
>> >>> hence ode assumes the session keys used for implicit correlation as
>> the
>> >>> correlation key.
>> >>>
>> >>> Regards
>> >>> Nandika
>> >>>
>> >>>
>> >>>
>> >>> On Wed, Jun 19, 2013 at 11:55 AM, Sathwik B P <sathwik...@gmail.com>
>> >>> wrote:
>> >>>
>> >>> > Hi Keheliya,
>> >>> >
>> >>> > I see there is some race condition. I have been testing on the trunk
>> >>> and
>> >>> > able to see this behaviour. I haven't been able to identify the root
>> >>> cause
>> >>> > yet. I can point out that there is some problem in the message
>> routes
>> >>> > getting registered after the arrival of the first message followed
>> >>> > immediately with the second onEvent message.
>> >>> >
>> >>> > Here is the data from ODE_MESSAGE_ROUTE, 8 is the value of the
>> >>> correlation.
>> >>> > Record bearing ID 8354 has a bizzare correlation_key value which
>> >>> > corresponds to the onEvent message. The record bearing ID 8355 is
>> that
>> >>> of
>> >>> > your second receive which is perfect.
>> >>> >
>> >>> > 8354    @2[-1~hqejbhcnphr8dggwax9v7q]    15    0    7952    one
>>  6656
>> >>> > 8355    @2[CorrelationSet~8]                     31    0    7952
>> >>>  one
>> >>> > 6655
>> >>> >
>> >>> > Due to this inappropriate correlation routing data the onEvent
>> message
>> >>> > doesn;t get routed. Will keep posted if I find anything.
>> >>> >
>> >>> > regards,
>> >>> > sathwik
>> >>> >
>> >>> > On Tue, Jun 18, 2013 at 9:49 PM, Keheliya Gallaba <
>> >>> > keheliya.gall...@gmail.com> wrote:
>> >>> >
>> >>> > > Hi Tammo,
>> >>> > >
>> >>> > > I'm using OpenJPA. Because I'm manually invoking the operations
>> via
>> >>> > soapUI,
>> >>> > > there's always a delay between the calls.
>> >>> > >
>> >>> > > Thanks,
>> >>> > > Keheliya
>> >>> > >
>> >>> > > On 18 June 2013 21:42, Tammo van Lessen <tvanles...@gmail.com>
>> >>> wrote:
>> >>> > >
>> >>> > > > Hi Keheliya,
>> >>> > > >
>> >>> > > > do you use OpenJPA or Hibernate? Does this also happen when you
>> >>> add a
>> >>> > > small
>> >>> > > > delay between the first and the second call?
>> >>> > > >
>> >>> > > > Thanks,
>> >>> > > >   Tammo
>> >>> > > >
>> >>> > > >
>> >>> > > > On Tue, Jun 18, 2013 at 8:28 AM, Keheliya Gallaba <
>> >>> > > > keheliya.gall...@gmail.com> wrote:
>> >>> > > >
>> >>> > > > > Hi devs,
>> >>> > > > >
>> >>> > > > > I have deployed a process with simple correlation and an event
>> >>> > handler
>> >>> > > in
>> >>> > > > > ODE 1.3.5 (the process archive attached). Sometimes when I
>> >>> invoke the
>> >>> > > > > onEvent operation as the second call to the process instance,
>> it
>> >>> does
>> >>> > > not
>> >>> > > > > get properly correlated. Process instance remain in the Active
>> >>> state
>> >>> > > > > forever. Note this occurs only for some instances. Please
>> help me
>> >>> > with
>> >>> > > > some
>> >>> > > > > insight on this problem.
>> >>> > > > >
>> >>> > > > > Thanks & Best Regards,
>> >>> > > > > Keheliya
>> >>> > > > >
>> >>> > > > > --
>> >>> > > > > Keheliya Gallaba
>> >>> > > > > More about me: http://about.me/keheliya
>> >>> > > > >
>> >>> > > >
>> >>> > > >
>> >>> > > >
>> >>> > > > --
>> >>> > > > Tammo van Lessen - http://www.taval.de
>> >>> > > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > > --
>> >>> > > Keheliya Gallaba
>> >>> > > More about me: http://about.me/keheliya
>> >>> > >
>> >>> >
>> >>>
>> >>
>> >>
>> >
>>
>
>

Reply via email to