Finally, I found a solution to the 2 problems, thanks to the support team:
Problem 1: It seems it only appears on version 7.1.2. A method to implement such funcionality could be:
creating a change rule as:
Condition:
#{oldTask.taskInfo.status} == “new” && #{currentTask.taskInfo.status} == “active”
Action:
#{currentTask.taskInfo.expireDate} = #{currentTask.newExpirationDate} ; #{currentTask.applyChanges}
In your task client, you should code something like the following.
Code assumes that the IS Document (in this case PDoc) has a field called “days”.
public java.util.Date getNewExpirationDate()throws Exception {
java.util.Date created = getTaskInfo().getCreatedDate();
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.setTime(created);
cal.add(java.util.Calendar.DATE, getTaskData().getPdoc().getDays());
return cal.getTime();
}
Problem 2:
The method applyChanges() must be called after the task information is updated so the changes are persisted.
#BPM#webMethods#webMethods-BPMS