Skip to main content

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.

GET {{core}}/rest/taskclass HTTP/1.1

-- URL parameters --
core: FlowerDocs Core host

-- Headers --
token: {{token}}

Retrieve a defined list of task classes

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

GET {{core}}/rest/taskclass/{ids} HTTP/1.1

-- URL parameters --
core: FlowerDocs Core host
ids: list of task class identifiers

-- Headers --
token: {{token}}

Creating task classes

The examples below show how to create a task class.

POST {{core}}/rest/taskclass HTTP/1.1

-- URL parameters --
core: FlowerDocs Core host

-- Headers --
token: {{token}}
Content-Type: application/json

-- Body (json) --
[

"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.

POST {{core}}/rest/taskclass/{ids} HTTP/1.1

-- URL Parameters --
core: FlowerDocs Core host
ids : comma-separated list of task class identifiers to be updated

-- Headers --
token: {{token}}
Content-Type: application/json

-- Body (json) --
[

"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"

]

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.

DELETE {{core}}/rest/taskclass/{ids} HTTP/1.1

-- URL Parameters --
core: FlowerDocs Core host
ids : comma-separated list of task class identifiers to be deleted

-- Headers --
token: {{token}}

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.