I’m trying to use Camunda to manage our internal documents flow , and we need to set a due date for the whole process, not for an individual task. I’ve googled a bit and I found some articles about the timeout task listener, but I don’t know how to use it. This is what I’m trying to do:
- In the process start form, add a
process_due_datevariable to let the user select a date.
- Add a “create” task listener Java class and assign it to each of the following tasks. Basically, I want to set the newly created task due date to
- Now, add a “timeout” task listener Java class to each task. My idea is that, whenever any task exceed the due date that we set at the beginning, an email is sent to the task owner.
I’ve read some of the articles about the timeout task listener, but I don’t know how to proceed. These are the steps I think I need to take:
Enable Job Executor. I’ve edited the
resources/META-INF/processes.xmlfile and I’ve added the following line:
<property name="jobExecutorActivate" value="true" />
Create a Java class to hold the listener code (f.i.
Use Modeler to add that class to all the tasks.
Is this approach correct? I see that, to define a timeout listener in the Modeler, I must define a
Listener Id but I don’t know what to put in here. A different name for each task (f.i. ‘StartTaskTimer’, ‘CheckTaskTimer’, etc? Do I have to define these ids elsewhere?
Any help is welcome, thanks!