This means, that the exceptions only can occur in your actions. And this can be handled by the exception handlers from jbpm (sorry, if hhave no no example for this at the moment).
In my opinion it is also a good design to catch business exceptions within your Actions and set some process variables, dependent on what exception is thrown.
Then you can model a Decision in your process, which takes a special path of execution.
And if you talk from RuntimeExceptions (technical issues), don't deal with these in the processes, business processes should be free of those technical issues.
You can use exception handlers to affect the data context (e.g. set a flag variable). Alternatively, you can catch exceptions within your "normal" action handlers.
Later on, you can query the context to take a different path of execution (e.g. a decision node checking the value of the flag).
Okay... I got your point!
But... supose that an administrator deploys a new process definition and someone starts a new execution. Then, the process really needs to be redefined for some very good reason during the execution. How can I handle this situation in jBpm?
I know there are good practises for designing process definitions in order to reduce these situations. But, runtime process exceptions can happen anyway!
I don't get your real problem.
If a technical, unexpected runtime exception is thrown (and you are working inside a application server) the transaction is rolled back, so the user, triggering the process can get a "Service not available" exception or something like this. This technical exceptions should not be watched at in the business process.
and business exceptions can be handled with the described soltuions
I'm not talking about those runtime exceptions (technical issues). I just wanna know how can the jBpm framework handle with process redefinitions. What happens to the running processes for the redefined definition? Is there any way to change a process definition and consequently affect the running processes?
I hope this explains better my point.
it does, but it would be better if you start a new topic for this question and mention here that you did. This question has no relation with the original subject