Skip to content

Commit

Permalink
migration support for zeebe user tasks (#4573)
Browse files Browse the repository at this point in the history
* migration support for zeebe user tasks

* grammatical tweaks

* begin updating migration guide

* update imports

* typo

* update to c8 api

* fix broken links

* formatted table

* Update resource-planning.md

* rebase

* rebase

* update based on new changes

* backport

* adjust sidebars

* adjust sidebars

* revert some 8.5 changes

* revert 8.5 changes

* adjust link

* adjust sidebar

* revert 8.5 sidebar

* update 8.5 sidebar

* remove get user task from 8.6

* Update 03-task-application-architecture.md

* Update the migration guide to Zeebe (Camunda) user tasks

* Update the documentation about user tasks

* Rename "Zeebe user task" to "Camunda user task"

* Note that embedded forms are supported only by Job worked-based user tasks

* revert a few changes in next

* revert user task changes

* backport a few changes

* Update migrate-to-zeebe-user-tasks.md

* resolve build errors

---------

Co-authored-by: Jonathan Lukas <[email protected]>
Co-authored-by: volodymyr-melnykc <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent ca7d090 commit a5a10a0
Show file tree
Hide file tree
Showing 30 changed files with 214 additions and 262 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Make sure that you create your own validation logic that matches your use case.

## Implement the life cycle with the task API

To implement task life cycle operations with the Zeebe task API, call the respective endpoints:
To implement task life cycle operations with the task API, call the respective endpoints:

- [`POST /user-tasks/:taskKey/assignment`](/apis-tools/zeebe-api-rest/specifications/assign-a-user-task.api.mdx) or [`DELETE /user-tasks/:taskKey/assignee`](/apis-tools/zeebe-api-rest/specifications/unassign-a-user-task.api.mdx) to change task assignment.
- [`PATCH /user-tasks/:taskKey`](/apis-tools/zeebe-api-rest/specifications/update-a-user-task.api.mdx) to update a task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ description: "Understand and decide on the architecture of your task application

A typical task application architecture consists of a task application frontend, a backend-for-frontend, and one or more data sources or services that contain business data relevant for the application users to perform their work. The backend implements Camunda Zeebe and Tasklist clients to retrieve and interact with tasks via Camunda APIs. For historical process instance data, Operate is also required.

Depending on the user task implementation type (job-based vs Zeebe user task) you use in your processes, you need to run either the Tasklist or Zeebe client to run operations on task. Task, form, and variable retrieval happens via the Tasklist API. Learn more about the differences of the task implementation types in the [migration guide for Zeebe user tasks](/apis-tools/tasklist-api-rest/migrate-to-zeebe-user-tasks.md).
Depending on the user task implementation type (job worker-based vs Zeebe user task) you use in your processes, you need to run either the Tasklist or Zeebe client to run operations on task. Task, form, and variable retrieval happens via the API. Learn more about the differences of the task implementation types in the [migration guide for Zeebe user tasks](/apis-tools/migration-manuals/migrate-to-zeebe-user-tasks.md).

:::tip
Starting a completely new project? Use only Zeebe user tasks to simplify your implementation.
Starting a new project? Use Zeebe user tasks to simplify your implementation.
:::

Click on any element of this diagram to jump to the documentation page for the respective component:
Expand Down Expand Up @@ -72,14 +72,14 @@ style Tasklist stroke:#10c95d,color:#000
click Forms "../../forms/introduction-to-forms"
click Rest "../../../tasklist-api-rest/tasklist-api-rest-overview"
click Job "../../../tasklist-api-rest/migrate-to-zeebe-user-tasks"
click ZeebeTasks "../../../tasklist-api-rest/migrate-to-zeebe-user-tasks"
click Job "../../../migration-manuals/migrate-to-zeebe-user-tasks"
click ZeebeTasks "../../../migration-manuals/migrate-to-zeebe-user-tasks"
click ZeebeRest "../../../zeebe-api-rest/zeebe-api-rest-overview"
```

Follow these resources to learn more about the individual components:

- Familiarize yourself with the [Tasklist API](/apis-tools/tasklist-api-rest/tasklist-api-rest-overview.md) for task, variable, and form retrieval, and to run operations on job-based user tasks.
- Learn how to use the [Zeebe API](/apis-tools/zeebe-api-rest/zeebe-api-rest-overview.md) to run operations on Zeebe-based user tasks.
- Learn how to use the [Camunda 8 API](/apis-tools/camunda-api-rest/specifications/assign-user-task.api.mdx) for task, variable, and form retrieval, and to run operations on Zeebe user tasks.
- Familiarize yourself with the [Tasklist API](/apis-tools/tasklist-api-rest/tasklist-api-rest-overview.md) to run operations on job worker-based user tasks.
- Understand how to design, embed, and customize [forms](/apis-tools/frontend-development/03-forms/01-introduction-to-forms.md).
- Understand how this architecture fits into the overall Camunda architecture with the [Java greenfield stack](/components/best-practices/architecture/deciding-about-your-stack.md).

Large diffs are not rendered by default.

Binary file not shown.
1 change: 0 additions & 1 deletion docs/apis-tools/tasklist-api-rest/sidebar-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ module.exports = {
{
Specifications: require("./specifications/sidebar.js"),
},
"apis-tools/tasklist-api-rest/migrate-to-zeebe-user-tasks",
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ When using REST API with JWT authentication token following request body paramet

On success returned.

</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The unique identifier of the task."}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The name of the task."}}></SchemaItem><SchemaItem collapsible={false} name={"taskDefinitionId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"User task ID from the BPMN definition."}}></SchemaItem><SchemaItem collapsible={false} name={"processName"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The name of the process."}}></SchemaItem><SchemaItem collapsible={false} name={"creationDate"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"When was the task created (renamed equivalent of `Task.creationTime` field)."}}></SchemaItem><SchemaItem collapsible={false} name={"completionDate"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"When was the task completed (renamed equivalent of `Task.completionTime` field)."}}></SchemaItem><SchemaItem collapsible={false} name={"assignee"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The username/id of who is assigned to the task."}}></SchemaItem><SchemaItem collapsible={false} name={"taskState"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`CREATED`, `COMPLETED`, `CANCELED`, `FAILED`]"} schema={{"type":"string","description":"The state of the task.","readOnly":true,"enum":["CREATED","COMPLETED","CANCELED","FAILED"]}}></SchemaItem><SchemaItem collapsible={false} name={"formKey"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Reference to the task form."}}></SchemaItem><SchemaItem collapsible={false} name={"formId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Reference to the ID of a deployed form. If the form is not deployed, this property is null."}}></SchemaItem><SchemaItem collapsible={false} name={"formVersion"} required={false} schemaName={"int64"} qualifierMessage={undefined} schema={{"type":"integer","description":"Reference to the version of a deployed form. If the form is not deployed, this property is null.","format":"int64"}}></SchemaItem><SchemaItem collapsible={false} name={"isFormEmbedded"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","description":"Is the form embedded for this task? If there is no form, this property is null."}}></SchemaItem><SchemaItem collapsible={false} name={"processDefinitionKey"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Reference to process definition (renamed equivalent of `Task.processDefinitionId` field)."}}></SchemaItem><SchemaItem collapsible={false} name={"processInstanceKey"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Reference to process instance id (renamed equivalent of `Task.processInstanceId` field)."}}></SchemaItem><SchemaItem collapsible={false} name={"tenantId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The tenant ID associated with the task."}}></SchemaItem><SchemaItem collapsible={false} name={"dueDate"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","description":"The due date for the task.","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"followUpDate"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","description":"The follow-up date for the task.","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"candidateGroups"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","description":"The candidate groups for the task.","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"candidateUsers"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","description":"The candidate users for the task.","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"implementation"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`JOB_WORKER`, `ZEEBE_USER_TASK`]"} schema={{"type":"string","enum":["JOB_WORKER","ZEEBE_USER_TASK"]}}></SchemaItem><SchemaItem collapsible={false} name={"priority"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `[0,100]`"} schema={{"description":"The priority of a user task. The higher the value the higher the priority. Applicable only for Zeebe user tasks.","type":"integer","minimum":0,"maximum":100,"default":50}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"taskDefinitionId\": \"string\",\n \"processName\": \"string\",\n \"creationDate\": \"string\",\n \"completionDate\": \"string\",\n \"assignee\": \"string\",\n \"taskState\": \"CREATED\",\n \"formKey\": \"string\",\n \"formId\": \"string\",\n \"formVersion\": 0,\n \"isFormEmbedded\": true,\n \"processDefinitionKey\": \"string\",\n \"processInstanceKey\": \"string\",\n \"tenantId\": \"string\",\n \"dueDate\": \"2024-08-16T13:54:01.392Z\",\n \"followUpDate\": \"2024-08-16T13:54:01.392Z\",\n \"candidateGroups\": [\n \"string\"\n ],\n \"candidateUsers\": [\n \"string\"\n ],\n \"implementation\": \"JOB_WORKER\",\n \"priority\": 50\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
</div><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The unique identifier of the task."}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The name of the task."}}></SchemaItem><SchemaItem collapsible={false} name={"taskDefinitionId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"User task ID from the BPMN definition."}}></SchemaItem><SchemaItem collapsible={false} name={"processName"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The name of the process."}}></SchemaItem><SchemaItem collapsible={false} name={"creationDate"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"When was the task created (renamed equivalent of `Task.creationTime` field)."}}></SchemaItem><SchemaItem collapsible={false} name={"completionDate"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"When was the task completed (renamed equivalent of `Task.completionTime` field)."}}></SchemaItem><SchemaItem collapsible={false} name={"assignee"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The username/id of who is assigned to the task."}}></SchemaItem><SchemaItem collapsible={false} name={"taskState"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`CREATED`, `COMPLETED`, `CANCELED`, `FAILED`]"} schema={{"type":"string","description":"The state of the task.","readOnly":true,"enum":["CREATED","COMPLETED","CANCELED","FAILED"]}}></SchemaItem><SchemaItem collapsible={false} name={"formKey"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Reference to the task form."}}></SchemaItem><SchemaItem collapsible={false} name={"formId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Reference to the ID of a deployed form. If the form is not deployed, this property is null."}}></SchemaItem><SchemaItem collapsible={false} name={"formVersion"} required={false} schemaName={"int64"} qualifierMessage={undefined} schema={{"type":"integer","description":"Reference to the version of a deployed form. If the form is not deployed, this property is null.","format":"int64"}}></SchemaItem><SchemaItem collapsible={false} name={"isFormEmbedded"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","description":"Is the form embedded for this task? If there is no form, this property is null."}}></SchemaItem><SchemaItem collapsible={false} name={"processDefinitionKey"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Reference to process definition (renamed equivalent of `Task.processDefinitionId` field)."}}></SchemaItem><SchemaItem collapsible={false} name={"processInstanceKey"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Reference to process instance id (renamed equivalent of `Task.processInstanceId` field)."}}></SchemaItem><SchemaItem collapsible={false} name={"tenantId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The tenant ID associated with the task."}}></SchemaItem><SchemaItem collapsible={false} name={"dueDate"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","description":"The due date for the task.","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"followUpDate"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","description":"The follow-up date for the task.","format":"date-time"}}></SchemaItem><SchemaItem collapsible={false} name={"candidateGroups"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","description":"The candidate groups for the task.","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"candidateUsers"} required={false} schemaName={"string[]"} qualifierMessage={undefined} schema={{"type":"array","description":"The candidate users for the task.","items":{"type":"string"}}}></SchemaItem><SchemaItem collapsible={false} name={"implementation"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`JOB_WORKER`, `ZEEBE_USER_TASK`]"} schema={{"type":"string","enum":["JOB_WORKER","ZEEBE_USER_TASK"]}}></SchemaItem><SchemaItem collapsible={false} name={"priority"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `[0,100]`"} schema={{"description":"The priority of a user task. The higher the value the higher the priority. Applicable only for Camunda user tasks.","type":"integer","minimum":0,"maximum":100,"default":50}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"name\": \"string\",\n \"taskDefinitionId\": \"string\",\n \"processName\": \"string\",\n \"creationDate\": \"string\",\n \"completionDate\": \"string\",\n \"assignee\": \"string\",\n \"taskState\": \"CREATED\",\n \"formKey\": \"string\",\n \"formId\": \"string\",\n \"formVersion\": 0,\n \"isFormEmbedded\": true,\n \"processDefinitionKey\": \"string\",\n \"processInstanceKey\": \"string\",\n \"tenantId\": \"string\",\n \"dueDate\": \"2024-08-16T13:54:01.392Z\",\n \"followUpDate\": \"2024-08-16T13:54:01.392Z\",\n \"candidateGroups\": [\n \"string\"\n ],\n \"candidateUsers\": [\n \"string\"\n ],\n \"implementation\": \"JOB_WORKER\",\n \"priority\": 50\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

An error is returned when the task is not active (not in the CREATED state).<br/>An error is returned when task was already assigned, except the case when JWT authentication token used and `allowOverrideAssignment = true`.

Expand Down
Loading

0 comments on commit a5a10a0

Please sign in to comment.