11 Replies Latest reply on Feb 26, 2014 3:36 PM by David Ward

    How do I return BPM SIGNAL_EVENT Result output to the SOAP client?

    Dustin Barlow Newbie

      Consider the following Switchyard 1.0 project diagram:

       

      Switchyard-Diagram.png

      The "ServiceProcessComponent" is a BPM Implementation whose interfaces is as follows:

       

      public interface ServiceProcess {
          Payload submit(Payload payload);
          Payload signalTest1(Payload payload);
      }
      
      

       

      The ServiceProcess interface is promoted and a SOAP binding is used.

       

      The BPM portion of the switchyard.xml:

       

      <bpm:implementation.bpm persistent="false" processId="ServiceProcess">
          <bpm:manifest>
              <bpm:resources>
                  <bpm:resource location="ServiceProcessComponent.bpmn" type="BPMN2"/>
              </bpm:resources>
          </bpm:manifest>
          <bpm:operations>
              <bpm:operation name="submit" type="START_PROCESS">
                  <bpm:inputs>
                      <bpm:input from="message.content" to="Parameter"/>
                  </bpm:inputs>
                  <bpm:outputs>
                      <bpm:output from="Result" to="message.content"/>
                  </bpm:outputs>
                  </bpm:operation>
                  <bpm:operation eventId="Signal_1" name="signalTest1" type="SIGNAL_EVENT">
                  <bpm:inputs>
                      <bpm:input from="message.content" to="Parameter"/>
                  </bpm:inputs>
                  <bpm:outputs>
                      <bpm:output from="Result" to="message.content"/>
                  </bpm:outputs>
              </bpm:operation>
          </bpm:operations>
      </bpm:implementation.bpm>
      
      

       

      The BPM Diagram for the ServiceProcessComponent looks like this:

      BPM-Diagram.png

      When the "submit" process is invoked via the SOAP client, the BPM  "ServiceOne Task" fires and calls the "ServiceOneBean".   The "ServiceOneBean" receives a Payload object and then returns a new Payload object that gets asynchronously marshaled by Switchyard back to the calling SOAP client in the SOAP response.  The BPM process flow then goes into a Converging gateway pausing the process flow until a signal is received.

       

      The SIGNAL_EVENT is then triggered by the SOAP client by calling the "signalTest1" operation.  The BPM "ServiceTwo Task" is then triggered and receives a Payload object and then returns a new Payload result.  The BPM process moves on through the Converging gateway into the final "ProcessCompleteTask" which simply logs a message.  The BPM process then ends.

       

      The SOAP client receives an HTML error page.  In the server log I see a SOAP error that states that the result Payload object cannot be null.

       

      As shown in the above Switchyard XML, I've mapped the "Result" to the "message.content".

       

      I then confirmed that I have mapped the output of the "ServiceTwo Task" to ServiceProcess/Result.

       

      ServiceTwoBean-Edit.png

       

      I then go into the BPM diagram to see if I can map the output of the signal to the ServiceProcess/Result target.  All I see is that I can map the Incoming Signal Data.

       

      Edit-Signal-Dialog.png

       

      Is it possible and how do I configure Switchward to return some sort of an acknowledgement/payload back to the SOAP client when the client is calling a method that invokes a BPM SIGNAL_EVENT?