User development,

A new message was posted in the thread "The problem with Exception Handling and 
esb<->bpm variables mapping":

http://community.jboss.org/message/525692#525692

Author  : Denis Sborets
Profile : http://community.jboss.org/people/dsborets

Message:
--------------------------------------------------------------
Hi All.
 
Can anybody help me with the next issue I have?
 

I try to do next:
 
1. I need to intercept exception inside ESB service, analyze exception,  add 
some parameter  to message body (e.g. my own error code, error description)
2. I need to have access for that parameters in the BPM, after current node 
forward me to another, for the reason exception transition.
 
The main problem is. It seems after exception BPM doesn't copy main body and 
parameters from esb to bpm's variables.... and maybe completely forget about 
output message.
 
This is some chunks of my esb and bpm descriptions files:
 
-------------------------bpm---------------------------------
  <node name="Save">
    <action 
class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
            <esbCategoryName>
                SampleCategory
            </esbCategoryName>
            <esbServiceName>
                SaveData
            </esbServiceName>
            <bpmToEsbVars>
                <mapping bpm="domainData" esb="domainData"/>
            </bpmToEsbVars>
            <esbToBpmVars>
                <mapping esb="ERROR" bpm="ERROR_DESC"/>
                <mapping esb="ERROR_CODE" bpm="ERROR_CODE"/>
            </esbToBpmVars>
            <exceptionTransition>exception</exceptionTransition>
        </action>
    <transition name="ok" to="Done"/>
    <transition name="exception" to="Error"/>
  </node>


  <node name="Error">
    <event type="node-enter">
        <script>
                <expression>
                    java.lang.System.err.println(&quot;    ERROR      &quot;);
                </expression>

        </script>


        <action 
class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
            <esbCategoryName>SampleCategory</esbCategoryName>
            <esbServiceName>CheckErrorDetails</esbServiceName>
            <bpmToEsbVars>
                <mapping bpm="ERROR_DESC" esb="ERROR"/>
                <mapping bpm="ERROR_CODE" esb="ERROR_CODE"/>
            </bpmToEsbVars>
        </action>
    </event>
    <transition name="to Error Save" to="ErrorSave"/>
  </node>

-------------------------bpm----------------------------------------------------------esb---------------------------------
 <service category="SampleCategory" name="SaveData">
            <actions>

                 <action name="interceptor1" 
class="edu.ggu.integration.actions.ExceptionHandlingAction">
                      <property name="exceptionMethod" value="catchesException" 
/>
                      <property name="code" value="101" />
                      <property name="message" value="message3" />
                 </action>

                <action class="edu.ggu.integration.actions.SaveData" 
name="saveContact">
                   <property name="variables">
               .........
                   </property>
                </action>

                 <action name="interceptor2" 
class="edu.ggu.integration.actions.ExceptionHandlingAction">
                      <property name="exceptionMethod" value="catchesException" 
/>
                      <property name="code" value="102" />
                      <property name="message" value="message3" />
                 </action>

                <action name="soapui-client-action" 
class="org.jboss.soa.esb.actions.soap.SOAPClient">
                   <property name="wsdl" value="..........................." />
                   <property name="responseAsOgnlMap" value="true" />
                   <property name="SOAPAction" value="Action"/>
                   <property name="LoggingMessages" value="true" />
                </action>

            </actions>
 </service>


 
Each of "interceptor<N>" actions handle possible exception, add  ERROR and 
ERRO_CODE to the message.
 
PBM show me error:
[org.jbpm.graph.def.GraphElement] (JbpmJobExector:127.0.1.1:1) action threw 
exception: unable to resolve property: ERROR
if there was an error in the "Save" node. And really, when, I try to see output 
message (without mapping in the "ERROR" node) I cannot see my parameters in the 
message.
 
BTW.The main idea is: I need to know what happened, and get access for 
stacktrace inside another BPM node and another ESB service after exception.
 
P.S. Thanks in advance for help

--------------------------------------------------------------

To reply to this message visit the message page: 
http://community.jboss.org/message/525692#525692


_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to