This operation creates an ad hoc task. Use it when script logic needs to create follow-up work that is not defined as a task in the process model.
The base request is:
createNewTask(createTaskPayload)
Use CreateTaskPayload to specify the properties of the task to create.
The following example creates a task and assigns it to a user:
variables.task =
new RuntimeTaskService()
.createNewTask({
name: 'Review document',
assignee: variables.assignee
});