Platform Explorer / Nuxeo Platform LTS 2016 8.10

Operation WorkflowTask.Complete

Complete task

Description

Completes the input task. If this is the last task the workflow will continue. Returns back the task document. "Status" is the id of the button the user would have clicked to submit the task form (if the outgoing transitions of the workflow node that created the task have conditions depending on it).@since 5.9.3 and 5.8.0-HF11 you can set multiple node or workflow variables when completing the task (also similar to ending the task via form submision from the UI).The variables are specified as key=value pairs separated by a new line.To specify multi-line values you can use a \ character followed by a new line.

Example:

description=foo bar
For updating a date, you will need to expose the value as ISO 8601 format, for instance :

Example:

workflowVarString=A sample value
workflowVarDate=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}

For all values, you have to submit a JSON representation. This is an example for a variable of type StringList:

nodeVarList = ["John Doe", "John Test"]

Operation id WorkflowTask.Complete
AliasesWorkflow.CompleteTaskOperation
Category Workflow Context
Label Complete task
Requires Workflow
Since

Parameters

Name Description Type Required Default value
comment string no  
nodeVariables properties no  
status string no  
workflowVariables properties no  

Signature

Inputs document, documents
Outputs document, documents

Implementation information

Implementation class org.nuxeo.ecm.platform.routing.core.api.operation.CompleteTaskOperation
Contributing component org.nuxeo.ecm.platform.routing.operations

JSON definition

{
  "id" : "WorkflowTask.Complete",
  "aliases" : [ "Workflow.CompleteTaskOperation" ],
  "label" : "Complete task",
  "category" : "Workflow Context",
  "requires" : "Workflow",
  "description" : "Completes the input task. If this is the last task the workflow will continue. Returns back the task document. \"Status\" is the id of the button the user would have clicked to submit the task form (if the outgoing transitions of the workflow node that created the task have conditions depending on it).@since 5.9.3 and 5.8.0-HF11 you can set multiple  node or workflow variables when completing the task (also similar to ending the task via form submision from the UI).The variables are specified as <i>key=value</i> pairs separated by a new line.To specify multi-line values you can use a \\ character followed by a new line. <p>Example:<pre>description=foo bar</pre>For updating a date, you will need to expose the value as ISO 8601 format, for instance : <p>Example:<pre>workflowVarString=A sample value<br>workflowVarDate=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}</pre><p>For all values, you have to submit a JSON representation. This is an example for a variable of type StringList:<p><pre>nodeVarList = [\"John Doe\", \"John Test\"]</pre></p>",
  "url" : "WorkflowTask.Complete",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "comment",
    "description" : "",
    "type" : "string",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "nodeVariables",
    "description" : "",
    "type" : "properties",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "status",
    "description" : "",
    "type" : "string",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "workflowVariables",
    "description" : "",
    "type" : "properties",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  } ]
}