Class: Workflow

Workflow(workflow, opts)

The Workflow class wraps a workflow.

Cannot directly be instantiated

Constructor

new Workflow(workflow, opts)

Creates a Workflow.

Parameters:
Name Type Description
workflow object

The initial workflow object. This User object will be extended with workflow properties.

opts object

The configuration options.

Properties
Name Type Attributes Description
nuxeo string

The Nuxeo object linked to this workflow.

documentId string <optional>

The attached document id of this workflow, if any.

Source:

Methods

_buildTasksRequest() → {Request}

Builds the correct Request object depending of whether this workflow is attached to a document or not.

Source:
Returns:

A request object.

Type
Request

fetchGraph(optsopt) → {Promise}

Fetches this workflow graph.

Parameters:
Name Type Attributes Description
opts object <optional>

Options overriding the ones from this object.

Source:
Returns:

A promise object resolved with the workflow graph.

Type
Promise

fetchTasks(optsopt) → {Promise}

Fetches the tasks of this workflow.

Parameters:
Name Type Attributes Description
opts object <optional>

Options overriding the ones from this object.

Source:
Returns:

A promise object resolved with the tasks.

Type
Promise