0 Replies Latest reply: Nov 1, 2012 7:43 AM by Shishir RSS

    Variable initialized with wrong message type

    Shishir
      Hi,

      I have a BPEL process variableA of Message type A as defined in the partnerlink WSDL file. This variable get initialized during operation A from the partnerlink. The WSDL has another message type B defined for another operation B.

      During runtime when operation A is called variable A gets initialized with message type A, however when operation B is invoked with mesage type B variableA gets initialized again with the content of message type B even though it's defined to be of message type A. Below are the snippets from the WSDL and BPEL process file

      WSDL file ..
      ..
      <message name="MessageTypeA">
      <part name="payload" element="mpx:MessageARequest"/>
      </message>
      <message name="MessageTypeB">
      <part name="payload" element="mpx:MessageBRequest"/>
      </message>
      <portType name="MutilPort">
      <operation name="A">
      <input message="tns:MessageTypeA"/>
      </operation>
      <operation name="BA">
      <input message="tns:MessageTypeB"/>
      </operation>
      </portType>
      ....
      ..
      ..

      Process BPEL file
      <variable name="VariableA"
      messageType="tns1:MessageTypeA"/>
      <variable name="VariableB"
      messageType="tns1:MessageTypeB"/>

      <pick name="Pick_2" createInstance="yes">
      <onMessage portType="tns1:MutilPort" operation="square"
      variable="VariableA" partnerLink="Multiplex">
      <sequence name="Sequence_1">
      <assign name="Assign_2">
      <copy>
      <from variable="VariableA" part="payload"
      query="/ns1:MessageARequest/ns1:Operand1"/>
      <to variable="ResponseVariable" part="payload"
      query="/ns1:AllOpProcessResponse/ns1:Result1"/>
      </copy>
      </assign>
      </sequence>
      </onMessage>
      <onMessage portType="tns1:MutilPort" operation="addition"
      variable="VariableB" partnerLink="Multiplex">
      <sequence name="Sequence_2">
      <assign name="Assign_1">
      <copy>
      <from variable="VariableB" part="payload"
      query="/ns1:MessageBRequest/ns1:Operand5"/>
      <to variable="ResponseVariable" part="payload"
      query="/ns1:AllOpProcessResponse/ns1:Result1"/>
      </copy>
      </assign>
      </sequence>
      </onMessage>
      </pick>
      ----------------------------------------------------------

      Please can anyone shed some light on why and how this can happen and where is it going wrong.

      Thanks,
      Shishir