0 Replies Latest reply on Jun 29, 2011 1:59 PM by dward

    Composers and Decomposers

    dward

      As part of the BPM work ( https://issues.jboss.org/browse/SWITCHYARD-174 ), I modified the SOAP component's DefaultComposer and DefaultDecomposer classes ( http://goo.gl/q8kGb and http://goo.gl/KhLuP , respectively).

       

      In the case of the composer, I mapped the (incoming) SOAP Headers into the Exchange's Context as Scope.IN properties. This is only if the header names were listed in the (newly created) <soap:composer mappedVariableNames=""/> XML config attribute.

       

      In the case of the decomposer, I mapped the Exchange Context Scope.OUT properties as (outgoing) SOAP Headers. This is only if the header names were listed in the (newly created) <soap:decomposer mappedVariableNames=""/> XML config attribute.

       

      The reason I did this is because there are certain contextual variables that are required so that the DroolsBpmExchangeHandler knows what to do.  Variables like processActionType (= startProcess | signalEvent | abortProcessInstance), processEvent, processEventType, processInstanceId, to be specific.

       

      A couple questions for discussion:

      1. Is this sufficient, or can you think of a better way of going about doing it?
      2. What about introducing some kind of generic/pluggable Composer/Decomposer mechanism, as we have in JBoss ESB (which does the "message" translation in a gateway between the native on-the-wire format, and the internal ESB Message canonical structure)?