-
1. Re: problem in ESB/JBPM exception handling
cammette Jan 18, 2010 2:30 AM (in response to lizhihao)you can't get any exception info in another jbpm node。
if you need to do this,you should put the exception info to jbpm a variable,and in another jbpm node put the variable to esb.
-
2. Re: problem in ESB/JBPM exception handling
lizhihao Jan 18, 2010 2:51 AM (in response to cammette)so I should use the exception handler mechanism which I can put the Exception in a variable , right ? -
3. Re: problem in ESB/JBPM exception handling
cammette Jan 18, 2010 3:11 AM (in response to lizhihao)yes,you could add a custom action to put the exception info to the esb message body . -
4. Re: problem in ESB/JBPM exception handling
lizhihao Jan 18, 2010 3:57 AM (in response to cammette)but i have try many times ,still meet some problems
1. the exception handler config only work for the Exception threw from the actionHandler Action ,right? but my Exception is threw from the Action of ESB service ,so I couldn't catch it.
2. I found the exception not only save in the Fault, but also in the "org.jboss.soa.esb.message.fault.throwable" field in Body.So I plan to transimit the Exception data to jbpm,then to esb again. but I met a new trouble, the config map is used MVEL, that means if I user
<mapping><esb = "org.jboss.soa.esb.message.fault.throwable" bpm="faultBody"></mapping> then it will try to get message.getBody().get("org").get("jboss").... is that right? hwo can I handle it?
can you explain me how can I fetch exception threw from esb action ? thank you very much
-
5. Re: problem in ESB/JBPM exception handling
cammette Jan 18, 2010 4:31 AM (in response to lizhihao)1. the exception handler config only work for the Exception threw from the actionHandler Action ,right? but my Exception is threw from the Action of ESB service ,so I couldn't catch it.
right.but you should catch EsbActionHandler‘exception,for example
<exception-handler exception-class="java.lang.Throwable">
<action class="xx.ProcessJbpmException">
<transitionName>to process error
</transitionName>
</action>
</exception-handler>ProcessJbpmException:
ec.getNode().leave(ec, transitionName);2. I found the exception not only save in the Fault, but also in the "org.jboss.soa.esb.message.fault.throwable" field in Body.So I plan to transimit the Exception data to jbpm,then to esb again. but I met a new trouble, the config map is used MVEL, that means if I user
<mapping><esb = "org.jboss.soa.esb.message.fault.throwable" bpm="faultBody"></mapping> then it will try to get message.getBody().get("org").get("jboss").... is that right? hwo can I handle it?
can you explain me how can I fetch exception threw from esb action ?
i also has tried many MVELs to put exception info to jbpm,but i failed.at last,i added a custom action that processing the excepion to esb body'errorInfo in jbpm.esb/jboss-esb.xml,before
<action name="action" class="org.jboss.soa.esb.services.jbpm.actions.JBpmCallback" />
-
6. Re: problem in ESB/JBPM exception handling
lizhihao Jan 18, 2010 4:52 AM (in response to cammette)ha ha, i finally handle the MVELs in the config, it has a escape char '\',if use this, then the MVEL will see it as a whole word.
use
<mapping><esb = "org\.jboss\.soa\.esb\.message\.fault\.throwable" bpm="faultBody"></mapping>
then it done.
when threw a exception in the esb action, then this field will transimit to jbpm. then transimit to esb again, it worked.
hope this can help you.
-
7. Re: problem in ESB/JBPM exception handling
altoo2 Apr 27, 2011 5:49 AM (in response to lizhihao)Thank you, you saved my day!
<esbToBpmVars>
<mapping bpm="faultBody" esb = "org\.jboss\.soa\.esb\.message\.fault\.throwable" />
</esbToBpmVars>
and later on
<bpmToEsbVars>
<mapping bpm="faultBody" esb = "faultBody" />
</bpmToEsbVars>