-
1. What happens if the TaskServer is shutdown between Created and Complete states?
krisverlaenen Apr 6, 2011 11:13 AM (in response to bpmn2user)The engine registers itself to the task service when you initialize your WSHumanTaskHandler. Assume you need to recreated your session and task service (for example due to failure), the state of your process instances and of your human tasks are persisted in the session and task service respectively. So you can restore them from database. When reconnecting the session to the task service, the listener will also be restored.
There used to be an issue where there was one listener for each requested task. The fix as applied in JBRules-2002 now uses a generic listener for all tasks. This is also how it works in jBPM 5.0.
Note that the task handler usually only lazily connects to the task service (so the first time the session tries to create a task). To make sure you connect immediately (so you can retrieve task completion events even before the first task is created), do handler.connect() after registering it. This will instantiate the listener.
Kris