Skip to main content
Version: v2026.0.0

The TaskClassService service exposes all operations available around TaskClass type components.

Retrieving task classes

Retrieve all task classes

The examples below show how to retrieve all task classes.

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

Retrieve a defined list of task classes

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

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: list of task class identifiers
curl -X GET "<CORE_HOST>/rest/taskclass/<IDS>" \
-H "token: <TOKEN>"

Creating task classes

The examples below show how to create a task class.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
curl -X POST "<CORE_HOST>/rest/taskclass" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '[
{
"answers": [
{
"displayNames": [
{
"language": "FR",
"value": "Traiter"
}
],
"id": "Treat"
}
],
"autoAssign": true,
"category": "TASK",
"data": {
"ACL": "acl-treatment",
"creationDate": "2024-03-07 13:59:54.854 +0100",
"lastUpdateDate": "2024-03-07 13:59:54.854 +0100",
"owner": "fadmin"
},
"displayNames": [
{
"language": "FR",
"value": "Traitement du courrier"
}
],
"icon": "fa fa-clone",
"id": "GEC_traitement",
"tagReferences": [
{
"descriptions": [
{
"language": "FR",
"value": "Référence du client"
}
],
"mandatory": true,
"multivalued": false,
"order": 0,
"readonly": false,
"tagName": "NumReference",
"technical": false
}
],
"technical": true,
"workflow": "GEC"
}
]'

Modifying task classes

The examples below show how to modify a task class.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: comma-separated list of task class identifiers to be updated
curl -X POST "<CORE_HOST>/rest/taskclass/<IDS>" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '[
{
"answers": [
{
"displayNames": [
{
"language": "FR",
"value": "Traiter"
}
],
"id": "Treat"
},
{
"displayNames": [
{
"language": "FR",
"value": "Refuser"
}
],
"id": "Refuse"
}
],
"autoAssign": false,
"category": "TASK",
"data": {
"ACL": "acl-treatment",
"creationDate": "2024-03-07 13:59:54.854 +0100",
"lastUpdateDate": "2024-03-07 13:59:54.854 +0100",
"owner": "fadmin"
},
"displayNames": [
{
"language": "FR",
"value": "Traitement du courrier"
}
],
"icon": "fa fa-envelope",
"id": "GEC_traitement",
"tagReferences": [
{
"descriptions": [
{
"language": "FR",
"value": "Référence du client"
}
],
"mandatory": true,
"multivalued": false,
"order": 0,
"readonly": false,
"tagName": "NumReference",
"technical": false
}
],
"technical": true,
"workflow": "GEC"
}
]'
warning

If you use the REST service, any information that has not been filled in will be emptied: you need to send the entire task class, not just the information to be modified.

Deleting task classes

The examples below show how to delete a list of task classes.

# <CORE_HOST>: FlowerDocs Core base URL
# <TOKEN>: authentication token
# <IDS>: comma-separated list of task class identifiers to be deleted
curl -X DELETE "<CORE_HOST>/rest/taskclass/<IDS>" \
-H "token: <TOKEN>"
warning

Before deleting a task class, it's important to make sure you've deleted all instances of this class, as well as all references to it in workflow objects.