cancel
Showing results for 
Search instead for 
Did you mean: 

UserTask Follow Up Date

mason6
Champ in-the-making
Champ in-the-making
I am wondering how is possible to add followUpDate attribute to some element in background, because class UserTask.java does not contains this attribue (there is only dueDate attribute).

    <userTask id="task2" name="Name2" activiti:assignee="demo" activiti:dueDate="2015-05-01" followUp></userTask>

What I want:

    <userTask id="task2" activiti:assignee="demo" activiti:followUpDate="2015-04-01"  activiti:dueDate="2015-05-01" name="Name2">


Code behind - where I want to set this attribute:

     UserTask userTask = new UserTask();
      userTask.setName("Name2");
      userTask.setId("task2");
      userTask.setAssignee(assignee);
      userTask.setDueDate("2015-05-01");
      //HOW TO SET ATTRIBUTE followUpDate?


How can I achive that?
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

exactly as you propose. Use extension elements (e.g. activiti:followUpDate) to extend process model.
You can get extension element value from org.activiti.bpmn.model.BaseElement#extensionElements
Regards
Martin

mason6
Champ in-the-making
Champ in-the-making
Thank you for your reply.

Can you please give me some example how to add new attribute to usertask in Java code? I would greatly appreciate it.

Kind regards

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

e.g.
org.activiti.engine.test.bpmn.event.end.TerminateEndEventTest#testParseTerminateEndEventDefinitionWithExtensionsin activiti source.

Regards
Martin