cancel
Showing results for 
Search instead for 
Did you mean: 

JavaServiceTasks and exceptions during invocation

mskaesz
Champ in-the-making
Champ in-the-making
Hey guys,

imagine you have a simple process with three JavaServiceTasks in one row. Task 1 and task 2 are completed successfully. Task 3 couldn't complete successfully because the Java code threw an exception. What's the Activiti engine now doing? Does it try it to invoke the method again? Is the process in a wait state? Will the exception in task 3 affect the completed tasks?

Thanks in advance.

Cheers,
Marc
1 REPLY 1

tombaeyens
Champ in-the-making
Champ in-the-making
it will roll back until the last wait state.
in case you only have 3 automatic java activities, your whole start process instance will be rolled back.

later we'll introduce the concept of asynchronous continuations.  that means that you can demarcate your process with a kind of safe points.  ongoing transaction will then be committed and a new transaction will be automatically started to continue the process.  this can be handy if you have consequetive automatic activities that you want to be executed in separate transactions