AnsweredAssumed Answered

Signaling Error state to Java receive task

Question asked by bkwf2 on Oct 26, 2011
Latest reply on Oct 31, 2011 by bkwf2

We are tying to use Activiti Workflow Engine (Version 5.6) in order replace IBM's Workflow process engine. And till now I think we are having good success.

We are trying to model Activiti WF processes as closely as possible to the existing IBM processes that we have.

I have attached an example/simple WF process that I have designed. Below explains what this process does:

1. The process starts

2. A user gets a task to review Loss Event.

3. The User either approves or dis-approves the event.

4. Based on the approval result, the process transitions to either "On Approved Auto Tasks" or "On Not Approved Auto Tasks" Java Receive tasks.

5. Both these tasks use "listeners" that start "EXTERNAL" process. That is the listeners send XML message to MQ Queue and a daemon process reads that message and performs BE business processes. Once the external BE process ends, a "signal" is sent back to the "Java receive task" to proceed ahead.


My questions are:

a) If an error/exception occurs in the external BE process, like an MQ queue fails etc, how can I send a "signal" to the "Java receive task" with description of the exception and change the state of the receive task to an "error state".

b) Assuming I am able to do (a) above somehow and we fix any issues with the external process. Is there a way to "restart" the Java receive task back again [instead of starting the WF process from the beginning], so that the receive task will pick up where it left..?

I read the complete documentation but I do not have a clue on how to do the above.