2 Replies Latest reply: Jan 23, 2012 10:00 PM by 912758 RSS

    BPEL Assign Activity - Merging BPEL Variables using a key

    912758
      I have the following issue. I have a BPEL process that is invoking an external service with the following message:


      <messages>
      <message1>
           <value1>Text1</value1>
           <value2>Text2</value2>
           <value3>Text3</value3>
           <position>1</position>
           <responseCode/>
           <responseType/>
           <responseText/>               
      </message1>     
      <message2>
           <value1>Text1</value1>
           <value2>Text2</value2>
           <value3>Text3</value3>
           <position>2</position>
           <responseCode/>
           <responseType/>
           <responseText/>               
      </message2>
      </messages>

      After invoking the external service I receive the following response:

      <responseMessages>
      <response1>
      <responseCode>Code1</responseCode>
           <responseType>Type1</resposneType>
           <responseText>1</responseText>     
      <response1>
      <response2>
      <responseCode>Code2</responseCode>
           <responseType>Type2</responseType>
           <responseText>2</responseText>     
      <response2>
      <responseMessages>


      The responseText element value maps to the position element value in the message sent,
      How can I do an assign and update the initial message elements (responseCode, responseType, responseText) with the value received
      from the web service response?

      Can I use responseText (responseMessage) and position (messages) as some sort of key?

      Edited by: 909755 on Jan 23, 2012 1:51 PM