cancel
Showing results for 
Search instead for 
Did you mean: 

DueDate Task, how?

sfigueras
Champ in-the-making
Champ in-the-making
Hi everyone,

In some of my tasks I need to put a relative due date. Like "now + 1d", or "1d". I've seen in the Activiti Tutorial for this feature and saw about ISO8601. I tried with PT1H, PT60M, PT3D, but nothing works.

This is the exception:
Caused by: org.activiti.engine.ActivitiException: couldn't resolve duedate: Invalid format: "PT1H"java.lang.IllegalArgumentException: Invalid format: "PT1H"‍‍‍


What I'm missing?

Thanks! Smiley Happy
1 REPLY 1

sai576
Champ on-the-rise
Champ on-the-rise
Which version you are using and Due Date in user task u get this problem but in  timer events there is no problem.

Because before 5.12 in user task this dueDate is not accept directly in period format like PT1H,PT50M etc. Before u assign duedate u should convert into date format from  like    

DateTime.now().plus(Period.parse(duedate)).toDate();


But from 5.13 onwards there is no problem because by default in activiti-engine-5.13.jar file there added this code in "DueDateBusinessCalender" class  (u want refer check the package org.activiti.engine.impl.calendar)

If u want check previous topics on this question refer

http://forums.activiti.org/content/task-duedate-v-boundary-timer

http://forums.activiti.org/content/time-duration-support-user-task-due-date