cancel
Showing results for 
Search instead for 
Did you mean: 

Human Task E-Mail Notification

damokles
Champ in-the-making
Champ in-the-making
Hi,

we want to have an E-Mail notification to all assignees/canditates/canditategroups
when a new Human Task is available.

What would be the best way to implement this?
  • ExecutionListener

  • TaskListener

  • Something else
When the assignment of the candidates is done by a TaskListener, the ExecutionListener
is executed before the TL so he won't see the new assignments.

It would be best if this can be configured once in the spring config or once per process.

Any ideas?
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi,

A task listener would be the best fit I think.
But by default you would have to configure it for every task for which you want this behavior.

If you want to add a task listener for every (or almost every) task than a pre or post parse listener would be a good fit.
In the process engine configuration you can set a list of preParseListeners and postParseListeners that consists of BpmnParseListener items.
A good example is the HistoryParseListener that you can find in the Activiti Engine source code.

Best regards,

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Personally I think this would be a great addition to the core of Activiti. jBPM had it and we used it a lot. We will have the same requirement in the near future. Maybe I can convince som collegue to implement it.

trademak
Star Contributor
Star Contributor
Hi Ronald,

Do you mean the e-mail notification in specific, or being able to define some kind of global task / execution listener?

Best regards,

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Email notification in this specifc case ((re-)assignments, reminders etc).

damokles
Champ in-the-making
Champ in-the-making
If you want to add a task listener for every (or almost every) task than a pre or post parse listener would be a good fit.
In the process engine configuration you can set a list of preParseListeners and postParseListeners that consists of BpmnParseListener items.
A good example is the HistoryParseListener that you can find in the Activiti Engine source code.

Thanks for the answer, this looks indeed like a good way to achieve our goal.
Could you give me an spring-xml snippet for the ProcessEngineConfiguration. I couldn't find the properties in the sourcecode of ProcessEngineConfiguration.

[Edit]Ok found the properties in the ProcessEngineConfigurationImpl, but what is the correct property for this pre- or ParseListeners, or does it not matter which?[/Edit]

What would be the best way to have TaskListeners that can have injected properties, since those in the HistoryParseListener don't use injections? Create them in the config and pass them as constructor arguments to the ParseListener?

Thanks