Constructor
new Workflow(opts)
Creates a Workflow
Parameters:
Name | Type | Description |
---|---|---|
opts |
object | The configuration options. |
Methods
findLastProcessDefinition(name) → {Promise.<*>}
Get last process definitions of a workflow
Parameters:
Name | Type | Description |
---|---|---|
name |
The name of the workflow |
Returns:
- Return a list of the latest process definitions
- Type
- Promise.<*>
findLastProcessDefinition(name) → {Promise.<*>}
Get last process definitions of a workflow
Parameters:
Name | Type | Description |
---|---|---|
name |
The name of the workflow |
Returns:
- Return a list of the latest process definitions
- Type
- Promise.<*>
findLatestProcessDefinitions() → {Promise.<*>}
Get latest process definitions
Returns:
- Return a list of the latest process definitions
- Type
- Promise.<*>
findLatestProcessDefinitions() → {Promise.<*>}
Get latest process definitions
Returns:
- Return a list of the latest process definitions
- Type
- Promise.<*>
findLogsByProcessInstance(piId) → {Promise.<any>|Promise.<*>}
Find the logs by process instance
Parameters:
Name | Type | Description |
---|---|---|
piId |
The process instance id |
Returns:
- Type
- Promise.<any> | Promise.<*>
findLogsByProcessInstance(piId) → {Promise.<any>|Promise.<*>}
Find the logs by process instance
Parameters:
Name | Type | Description |
---|---|---|
piId |
The process instance id |
Returns:
- Type
- Promise.<any> | Promise.<*>
findProcessInstancesByNode(uuid) → {Promise.<any>|Promise.<*>}
Find the process instances of a task
Parameters:
Name | Type | Description |
---|---|---|
uuid |
The uuid of the node |
Returns:
- Type
- Promise.<any> | Promise.<*>
findProcessInstancesByNode(uuid) → {Promise.<any>|Promise.<*>}
Find the process instances of a task
Parameters:
Name | Type | Description |
---|---|---|
uuid |
The uuid of the node |
Returns:
- Type
- Promise.<any> | Promise.<*>
findTaskInstances(pdId) → {Promise.<any>|Promise.<*>}
Get task instance
Parameters:
Name | Type | Description |
---|---|---|
pdId |
The pdId process definition id |
Returns:
- Type
- Promise.<any> | Promise.<*>
findTaskInstances(pdId) → {Promise.<any>|Promise.<*>}
Get task instance
Parameters:
Name | Type | Description |
---|---|---|
pdId |
The pdId process definition id |
Returns:
- Type
- Promise.<any> | Promise.<*>
findUserTaskInstances(offset, limit) → {Promise.<*>}
Get the task instances assigned to the user
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the wofklow list |
|
limit |
The maximun number of elements returned |
Returns:
Return a list with the task instances assigned to the user
- Type
- Promise.<*>
findUserTaskInstances(offset, limit) → {Promise.<*>}
Get the task instances assigned to the user
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the wofklow list |
|
limit |
The maximun number of elements returned |
Returns:
Return a list with the task instances assigned to the user
- Type
- Promise.<*>
getPooledTaskInstances(offset, limit) → {Promise.<*>}
Get the pooled task instances
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the wofklow list |
|
limit |
The maximun number of elements returned |
Returns:
Return a list with the pooled task instances
- Type
- Promise.<*>
getPooledTaskInstances(offset, limit) → {Promise.<*>}
Get the pooled task instances
Parameters:
Name | Type | Description |
---|---|---|
offset |
The offset of the wofklow list |
|
limit |
The maximun number of elements returned |
Returns:
Return a list with the pooled task instances
- Type
- Promise.<*>
getProcessDefinitionForms(pdId) → {Promise.<any>|Promise.<*>}
Get the process definition forms
Parameters:
Name | Type | Description |
---|---|---|
pdId |
The process definition id |
Returns:
Return a list with process definition forms
- Type
- Promise.<any> | Promise.<*>
getProcessDefinitionForms(pdId) → {Promise.<any>|Promise.<*>}
Get the process definition forms
Parameters:
Name | Type | Description |
---|---|---|
pdId |
The process definition id |
Returns:
Return a list with process definition forms
- Type
- Promise.<any> | Promise.<*>
getProcessDefinitionImage(pdfId, node) → {Promise.<*>}
Get the process definition image
Parameters:
Name | Type | Description |
---|---|---|
pdfId |
The pdfId of the node |
|
node |
The name of the workflow task |
Returns:
- Return void
- Type
- Promise.<*>
getProcessDefinitionImage(pdfId, node) → {Promise.<*>}
Get the process definition image
Parameters:
Name | Type | Description |
---|---|---|
pdfId |
The pdfId of the node |
|
node |
The name of the workflow task |
Returns:
- Return void
- Type
- Promise.<*>
getTaskInstance(tiId) → {Promise.<any>|Promise.<*>}
Get task instance
Parameters:
Name | Type | Description |
---|---|---|
tiId |
The task instance id |
Returns:
- Type
- Promise.<any> | Promise.<*>
getTaskInstance(tiId) → {Promise.<any>|Promise.<*>}
Get task instance
Parameters:
Name | Type | Description |
---|---|---|
tiId |
The task instance id |
Returns:
- Type
- Promise.<any> | Promise.<*>
runProcessDefinition(pdId, uuid, properties) → {Promise.<any>|Promise.<*>}
Run workflow process definition
Parameters:
Name | Type | Description |
---|---|---|
pdId |
The process definition id |
|
uuid |
The node uuid |
|
properties |
The formElement values |
Returns:
- Type
- Promise.<any> | Promise.<*>
runProcessDefinition(pdId, uuid, properties) → {Promise.<any>|Promise.<*>}
Run workflow process definition
Parameters:
Name | Type | Description |
---|---|---|
pdId |
The process definition id |
|
uuid |
The node uuid |
|
properties |
The formElement values |
Returns:
- Type
- Promise.<any> | Promise.<*>
setRestUrl(restUrl)
Set the rest url
Parameters:
Name | Type | Description |
---|---|---|
restUrl |
The rest url |
setRestUrl(restUrl)
Set the rest url
Parameters:
Name | Type | Description |
---|---|---|
restUrl |
The rest url |
setTaskInstanceActorId(tiId, userId) → {Promise.<any>|Promise.<*>}
Set actor to the task instance
Parameters:
Name | Type | Description |
---|---|---|
tiId |
The task instance id |
|
userId |
The user id |
Returns:
- Type
- Promise.<any> | Promise.<*>
setTaskInstanceActorId(tiId, userId) → {Promise.<any>|Promise.<*>}
Set actor to the task instance
Parameters:
Name | Type | Description |
---|---|---|
tiId |
The task instance id |
|
userId |
The user id |
Returns:
- Type
- Promise.<any> | Promise.<*>
setTaskInstanceValues(pdId, tiId, tiName, transName, properties) → {Promise.<any>|Promise.<*>}
Set task instance values
Parameters:
Name | Type | Description |
---|---|---|
pdId |
The process definition id |
|
tiId |
The task instance id |
|
tiName |
The task instance name |
|
transName |
The transition name |
|
properties |
The formElement values |
Returns:
- Type
- Promise.<any> | Promise.<*>
setTaskInstanceValues(pdId, tiId, tiName, transName, properties) → {Promise.<any>|Promise.<*>}
Set task instance values
Parameters:
Name | Type | Description |
---|---|---|
pdId |
The process definition id |
|
tiId |
The task instance id |
|
tiName |
The task instance name |
|
transName |
The transition name |
|
properties |
The formElement values |
Returns:
- Type
- Promise.<any> | Promise.<*>
setToken(token)
Set the token in Workflow variables
Parameters:
Name | Type | Description |
---|---|---|
token |
The authorization token value |
setToken(token)
Set the token in Workflow variables
Parameters:
Name | Type | Description |
---|---|---|
token |
The authorization token value |
startTaskInstance(tiId) → {Promise.<any>|Promise.<*>}
Start a task instance
Parameters:
Name | Type | Description |
---|---|---|
tiId |
The task instance id |
Returns:
- Type
- Promise.<any> | Promise.<*>
startTaskInstance(tiId) → {Promise.<any>|Promise.<*>}
Start a task instance
Parameters:
Name | Type | Description |
---|---|---|
tiId |
The task instance id |
Returns:
- Type
- Promise.<any> | Promise.<*>