How to Dynamically Set Different Timeout Events for User Tasks in Camunda 7?

Hi,

I am working on a process in Camunda 7 where I need to unassign a user task if the assignee doesn’t complete the task within a certain time. However, the timeout duration varies for different tasks based on specific business cases.

Here is what I want to achieve:
1. When a user task is created, a timeout event should start.
2. After the specified timeout (e.g., 7 days for some tasks, 3 days for others), the task should be unassigned (set assignee to null) so that it becomes available to everyone.
3. The timeout duration should be dynamic and configurable, possibly using process variables.

I have explored using the timeout event in task listeners and attaching timer boundary events, but I am unsure how to set the timeout dynamically for different tasks.

Is there a best practice or recommended approach to achieve this in Camunda 7?

Any guidance, examples, or references would be greatly appreciated.

Thanks!

Hi, and welcome to the forum.

Personally, I would see that as a distinct process (much like the history cleanup is a distinct process), which wouldn’t get modeled in the process.
You could have a process that runs every minute (or 5 minutes, etc), that gets all tasks of a particular type (or name) from the API where their assigned time is before the appropriate timeout (ie. they exceeded their timeout), and then unassigns them.

BUT. I’m just a process designer - not an implementer. So others on the forum might have better ideas / feedback than I do.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.