Save a Task Without Completing It - Save a Task Without Completing It - This operation saves task data without completing the task. Use it when a script needs to save task variables as draft data while keeping the task open. - Content Innovation Cloud - Hyland Automate Modeler - Current/Hyland-Automate-Modeler/zsf8740482723449 - Current - Current

Hyland Automate Modeler

Platform
Content Innovation Cloud
Product
Hyland Automate Modeler
Release
Current
License
ft:lastPublication
2026-11-16T23:02:28.533499
ft:locale
en-US

This operation saves task data without completing the task. Use it when a script needs to save task variables as draft data while keeping the task open.

The base request is:

saveTask(taskId, saveTaskPayload)

Use SaveTaskPayload to specify the task variables to save.

The following example saves a draft comment:

new RuntimeTaskService()
    .saveTask(
        variables.taskId,
        {
            variables: {
                draftComment: variables.comment
            }
        }
    );

Use SaveTaskPayload when a script needs to save task variables without completing the task.

The following example saves multiple task variables:

const saveTaskPayload = {
    variables: {
        draftComment: variables.comment,
        savedByScript: true
    }
};

new RuntimeTaskService()
    .saveTask(
        variables.taskId,
        saveTaskPayload
    );

In this example:

  • draftComment: variables.comment saves the value stored in variables.comment.
  • savedByScript: true saves a Boolean value indicating that the data was saved by the script.
  • saveTask(...) saves the variables provided in SaveTaskPayload without completing the task.