have a look at Async WorkItemHandlers.
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.
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
<identifier>new org.jbpm.executor.impl.wih.AsyncWorkItemHandler(org.jbpm.executor.ExecutorServiceFactory.newExecutorService(), "org.jbpm.executor.commands.PrintOutCommand")</identifier>
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?