Task Lifecycle notifications and reminders

Hi,
im looking for solution for a case where i need to send email reminder to candidate group or task assignee in specific time interval while respecting due date at the same time.

Background: in my use case we have created mechanism for dynamic task assignment which is plugged into camunda reactor and its pretty simple:

  • when task is created without assignee → determine candidate groups for task and notify them via email
  • when task is assigned → notify assignee via email

now i would like to add a reminder feature:

  • if task is not assigned, send email reminder to candidate groups in task specific intervals, until task gets assigned.
  • if task is assigned, send email reminder to assignee in task specific intervals, until either task reaches due date or task gets completed

now i was thinking of some kind of generic processes to handle these two cases and i came up with this:

Where messaging particular instance is solved with message correlation keys.

However i have some concerns about process/task cancellation. Since reminder process would be loosely coupled to task, how can i handle process/task cancellation? Will canceling task/process emit TaskListener.EVENTNAME_DELETE i can listen on, or is cancellation something else than delete event?
Moreover this use case seems like some kind of standard behavior, is there some solution in camunda engine for task notifications/reminders i could use to simplify this?

Hi @JohnArray,

You are correct, cancelling a process/task will result in a TaskListener.EVENTNAME_DELETE. Regarding your generic reminder subprocesses, you can actually add them as a subprocess to your main process where your task is. They can then check the status of a task and send out reminders.

Regarding your second question, currently there is no standard behaviour to define reminders on User tasks. However, from version 7.12 (coming out at the end of November), Time Triggered Task Listeners will be available, and I think they will fit your use-case nicely. You can read more about the feature here: https://blog.camunda.com/post/2019/09/camunda-bpm-7120-alpha4-released/

Best,
Nikola

2 Likes

Before the new version is released, you could setup your notifications in a similar way to that described here: https://github.com/camunda-consulting/code/tree/master/snippets/task-overdue-job-handler

1 Like

@nikola.koevski
embedding this in process is not an option in my case since i have multiple processes with multiple tasks where this mechanic is necessary. I will look forward to the release om 7.12 as it seems to be exactly what i need here. Thanks!

@tiesebarrell
this is more or less something that i have implement but instead of job handlers i used processes for evaluation purpose, nonetheless this is a great example :+1: