Set due date JavaScript or Java Class

How do I get a date field from a form and put it on the set due date? it can be scripted in the form itself or through a java delegate class.

Hi @MarceloCP,

Just set the attribute camunda:dueDate of the user task to an expression resolves to a java.util.Date, java.util.String (ISO8601 formatted) or null.

Below is an example where a process variable is used to set the due date.

<userTask id="theTask" name="Important task" camunda:dueDate="${dateVariable}"/>

https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/#due-date

1 Like

That’s right, it worked and very simple. Thank you

1 Like