Nuxeo Server

Workflow APIs

Updated: March 18, 2024

We list here all the useful available workflow APIs if you want to programmatically change a workflow instance.

Java API

You can read the javadoc of the workflow engine main services:

Note that most of the time provided Automation operations will do what you want to do and are easier to use.

Automation

The framework provides a few interesting Automation operation, in the category "Workflow Context".

  • Start Workflow: Starts a workflow with the given id and to initialize its workflow variable. The document id of the created workflow instance is available under the workflowInstanceId context variable. The id parameter is the id of the workflow definition, as it was configured in Studio.
  • Cancel Workflow: Cancels a workflow giving its id. The id parameter is the id of the document representing the workflow instance.
  • Resume Workflow: Allows to resume a node of the workflow. It probably was suspended waiting for a task to be solved. This operation allows to force the resuming, and will let the task in a "cancelled" state.
  • Complete task: Allows to close a task as if it was done via the user interface, with the ability to pass some data, as if it came from a form.
  • Set Workflow Variable: Allows to set workflow variables, either from within the execution of a workflow automation chain (input, output, transition) or externally, provided the workflow instance id.
  • Set Node Variable: Allows to set node variables within the execution of a workflow automation chain (input, output, transition).

REST API

See Workflow and Task endpoints.