Set/update the dueDate on a running process-instance

Hi
is it possible to set/update the dueDate on a running process-instance?

Since Camunda 8 currently only offers limited support for migrating a process-instance to a new version of the process-definition we are following Camunda’s recommendation [1] to create a new process-instance:

If your specific case is not (yet) supported by process instance migration, you can use cancel process instance and create and start at a user-defined element to recreate your process instance in the other process definition.

Use case

  • The old process instance has an active user task with a calculated dueDate (e.g “now() + duration(“P31D”)”)
  • During migration we cancel this process instance and create a new process instance based on the new version of the process-definition
  • When we move the new process instance to the user task, the dueDate is set to “now() + duration(“P31D”)” → Since now() returns a different result the new process-instance has the wrong dueDate.

[1] Process instance migration | Camunda 8 Docs