end date of a human task

Can I dynamically change the end date of a human task?

As in programatically?

The nearest thing I can find is setDueData which is here, not used it but is does indicate it is possible…

http://documentation.bonitasoft.com/javadoc/api/6.3/index.html

There is also
processAPI.updateDueDateOfTask(activityId, dueDate);

regards
Seán