Skip to main content
Version: v2026.0.0

The WorkflowService service exhibits all available operations around Workflows.

Retrieving workflows

Retrieving all workflows

The examples below show how to retrieve all workflows present on the scope.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
curl -X GET "<CORE_HOST>/rest/workflow" \
-H "token: <TOKEN>"

Retrieving a defined list of workflows

The examples below show how to retrieve a list of workflows from their identifiers.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: list of workflow identifiers, separated by commas
curl -X GET "<CORE_HOST>/rest/workflow/<IDS>" \
-H "token: <TOKEN>"

Creating workflows

The examples below show how to create a workflow.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
curl -X POST "<CORE_HOST>/rest/workflow" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '[
{
"startTaskClass": "GEC_Step0_Creation",
"taskClasses": [
"GEC_Step1_Distribution",
"GEC_Step2_ATraiter",
"GEC_Step0_Creation"
],
"id": "GECTest"
}
]'

Updating workflows

The examples below show how to update a workflow.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: list of workflow identifiers to update, separated by commas
curl -X POST "<CORE_HOST>/rest/workflow/<IDS>" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '[
{
"id": "GECTest",
"startTaskClass": "GEC_Step0_Creation",
"taskClasses": [
"GEC_Step1_Distribution",
"GEC_Step2_ATraiter",
"GEC_Step3_CourrierTraite",
"GEC_Step0_Creation"
]
}
]'
warning

When using the REST service, unset fields will be cleared: you must send the entire workflow, not just the fields to modify.

Deleting workflows

The examples below show how to delete a list of workflows.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: list of workflow identifiers to delete, separated by commas
curl -X DELETE "<CORE_HOST>/rest/workflow/<IDS>" \
-H "token: <TOKEN>"
warning

Deletion does not perform any checks: you must verify that there are no active instances before deleting a workflow.