-
1. Re: Exception Handling in JBPM workflow - EAP 6.4, BPMSuite - 6.3
happyhippo Oct 14, 2016 3:55 AM (in response to subramanianm)Hi,
have a look at Async WorkItemHandlers.
Chapter 24. Concurrency and asynchronous execution Chapter
24.2.2.1. WorkItemHandler backed with jbpm executor
You can configure the amount of retries and delays and it works simular to the quartz scheduler.
Also have a look at the Class org.jbpm.executor.impl.wih.AsyncWorkItemHandler in jbpm-executor.
dan
-
2. Re: Exception Handling in JBPM workflow - EAP 6.4, BPMSuite - 6.3
subramanianm Oct 14, 2016 5:31 AM (in response to happyhippo)Hi Dan,
Thank you very much.
I tried using it. Though it offers the ability to retry, doesn't give the ability to put the workflow in a wait state, like a user task. Though I could achieve it via the BPMN modelling, but attaching an exception process/loop to every Service task or Custom Task seems too much. Is there a better/elegant way to achieve it?
I'm also having issues with the AsyncWorkItemHandler. In our case, we use the REMOTE CLIENT and the WIH are initialized from the deployment descriptor as below. But, this doesn't seem to work. I'm getting some crazy LinkageError
<work-item-handler>
<resolver>mvel</resolver>
<identifier>new org.jbpm.executor.impl.wih.AsyncWorkItemHandler(org.jbpm.executor.ExecutorServiceFactory.newExecutorService(), "org.jbpm.executor.commands.PrintOutCommand")</identifier>
<parameters/>
<name>async</name>
</work-item-handler>
Even if this works, not sure how the Executor Service will be shutdown? After the callback the Executor service doesn't seem to be cleaned up and the remote client wouldn't have the ability to do it either. So, how to cleanup the executor service after either OnDone or OnError?
Thank you,
Muthu