code: void updateDue(Instant due, String cuid, String comment)
      throws ServiceException, DataAccessException {
          boolean hasOldSlaInstance;
          EventServices eventManager = ServiceLocator.getEventServices();
          EventInstance event = eventManager.getEventInstance(ScheduledEvent.SPECIAL_EVENT_PREFIX + "TaskDueDate." + taskInstance.getId());
          boolean isEventExist = event == null ? false : true;
          hasOldSlaInstance = !isEventExist;
          Map<String,Object> changes = new HashMap<String,Object>();
          changes.put("DUE_DATE", Date.from(due));
          changes.put("COMMENTS", comment);
          TaskDataAccess dataAccess = new TaskDataAccess();
          dataAccess.updateTaskInstance(taskInstance.getTaskInstanceId(), changes, false);
          if (due == null) {
              unscheduleTaskSlaEvent();
          }
          else {
              String alertIntervalString = getTemplate().getAttribute(TaskAttributeConstant.ALERT_INTERVAL);
              int alertInterval = StringHelper.isEmpty(alertIntervalString)?0:Integer.parseInt(alertIntervalString);
              scheduleTaskSlaEvent(Date.from(due), alertInterval, !hasOldSlaInstance);
          }
          auditLog(UserAction.Action.Change.toString(), cuid, null, "change due date / comments");
      }
docs: Updates the due date for a task instance.
  The method should only be called in summary (or summary-and-detail) task manager.