code: public void saveTask() {
      assertCommandContextNotActive();
      assertTaskAssociated();
  
      final Task task = getTask();
      // save the task
      processEngine.getTaskService().saveTask(task);
    }
docs: Save the currently associated task.
  
  @throws ProcessEngineCdiException if called from a process engine command or if no Task is currently associated.