how to mark success or failure for a service task java delegate implementation
I have a custom implementation [ I do not use activiti bpm - UI or its persistence ]
All tasks are implementation of java delegate as diff task types and i create a pure java activiti model and run it via activiti process engine.
Say there is a linear workflow containing 3 tasks and sequence flows tying them together. How do i implement so that activiti understands the task failed or succeeded. As of now it just runs each line of code in the taks and moves on to the next task.
Desired behavior is, if a task fails, subsequent task should not start and process should exit.
Is there any way above can be achieved in activiti?
Re: how to mark success or failure for a service task java delegate implementation
If a task fails it should throw an appropriate exception or other business error. The workflow engine will not continue then. Exiting the process could be implemented using an error boundary event handler to react to the specific issue.