Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration support for zeebe user tasks #4573

Merged
merged 35 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
40230b8
migration support for zeebe user tasks
christinaausley Nov 5, 2024
c20160d
grammatical tweaks
christinaausley Nov 5, 2024
d305b3d
begin updating migration guide
christinaausley Nov 5, 2024
11f359d
update imports
christinaausley Nov 5, 2024
0e6d8d0
typo
christinaausley Nov 5, 2024
3b27682
update to c8 api
christinaausley Nov 5, 2024
e10dd41
fix broken links
christinaausley Nov 5, 2024
892eea8
formatted table
jonathanlukas Nov 14, 2023
adcccc9
Update resource-planning.md
jonathanlukas Nov 21, 2023
77e0914
rebase
christinaausley Nov 25, 2024
6cf68ed
rebase
christinaausley Nov 25, 2024
7d9efda
update based on new changes
christinaausley Nov 25, 2024
8cec521
Merge branch 'main' into migration-support-zeebe-user-task
christinaausley Nov 26, 2024
a0c7109
backport
christinaausley Nov 26, 2024
917a197
adjust sidebars
christinaausley Nov 26, 2024
03807d4
adjust sidebars
christinaausley Nov 26, 2024
c1c9c92
revert some 8.5 changes
christinaausley Nov 26, 2024
42a8eb6
revert 8.5 changes
christinaausley Nov 26, 2024
9b018ab
adjust link
christinaausley Nov 26, 2024
6a15477
adjust sidebar
christinaausley Nov 26, 2024
85876e8
revert 8.5 sidebar
christinaausley Nov 26, 2024
05ac72a
update 8.5 sidebar
christinaausley Nov 26, 2024
84685cf
remove get user task from 8.6
christinaausley Nov 26, 2024
444e3d3
Merge branch 'main' into migration-support-zeebe-user-task
christinaausley Dec 4, 2024
9ab546b
Update 03-task-application-architecture.md
volodymyr-melnykc Dec 6, 2024
caecd73
Update the migration guide to Zeebe (Camunda) user tasks
volodymyr-melnykc Dec 6, 2024
ecdf33d
Update the documentation about user tasks
volodymyr-melnykc Dec 6, 2024
6ad14cd
Rename "Zeebe user task" to "Camunda user task"
volodymyr-melnykc Dec 6, 2024
ce66df2
Note that embedded forms are supported only by Job worked-based user …
volodymyr-melnykc Dec 6, 2024
0656102
revert a few changes in next
christinaausley Dec 6, 2024
b00f7d7
revert user task changes
christinaausley Dec 6, 2024
bc367c4
backport a few changes
christinaausley Dec 6, 2024
7df4c77
Merge branch 'main' into migration-support-zeebe-user-task
christinaausley Dec 6, 2024
952c8ef
Update migrate-to-zeebe-user-tasks.md
christinaausley Dec 6, 2024
05c1334
resolve build errors
christinaausley Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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-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/migration-manuals/migrate-to-zeebe-user-tasks.md).

:::tip
Starting a completely new project? Use only Zeebe user tasks to simplify your implementation.
Expand Down Expand Up @@ -72,8 +72,8 @@ 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"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ description: "Learn how to migrate job worker-based user tasks to Zeebe-based ta

import DocCardList from '@theme/DocCardList';
import FormViewer from "@site/src/mdx/FormViewer";
import YesItem from "./assets/react-components/YesItem";
import NoItem from "./assets/react-components/NoItem";
import TableTextSmall from "./assets/react-components/TableTextSmall";
import userTaskMigrationDecisionHelperForm from "./assets/forms/userTaskMigrationDecisionHelperForm.js";
import "./assets/css/condensedTable.module.css";
import styles from "./assets/css/cleanImages.module.css";
import APIArchitectureImg from './assets/img/api-architecture.png';
import ZeebeTaskSelectionImg from './assets/img/zeebe-user-task-selection.png';

Camunda 8.5 introduces a new [user task](/components/modeler/bpmn/user-tasks/user-tasks.md) implementation type: Zeebe user tasks.
import YesItem from "../tasklist-api-rest/assets/react-components/YesItem";
import NoItem from "../tasklist-api-rest/assets/react-components/NoItem";
import TableTextSmall from "../tasklist-api-rest/assets/react-components/TableTextSmall";
import userTaskMigrationDecisionHelperForm from "../tasklist-api-rest/assets/forms/userTaskMigrationDecisionHelperForm.js";
import "../tasklist-api-rest/assets/css/condensedTable.module.css";
import styles from "../tasklist-api-rest/assets/css/cleanImages.module.css";
import APIArchitectureImg from '../tasklist-api-rest/assets/img/api-architecture.png';
import ZeebeTaskSelectionImg from '../tasklist-api-rest/assets/img/zeebe-user-task-selection.png';

Camunda 8.5 introduced a new [user task](/components/modeler/bpmn/user-tasks/user-tasks.md) implementation type: Zeebe user tasks.
Zeebe user tasks have several benefits, including:

- Running directly on the automation engine for high performance.
Expand Down Expand Up @@ -91,11 +91,11 @@ Learn the differences between both task types and make an informed decision, and
<td>
<div>Partially</div>
<TableTextSmall>Queries, GET tasks, forms, variables</TableTextSmall>
<TableTextSmall>ℹ Currently, you must use Zeebe and Tasklist APIs to use Zeebe user tasks</TableTextSmall>
<TableTextSmall>ℹ Currently, you must use the Camunda 8 and Tasklist APIs to use Zeebe user tasks</TableTextSmall>
</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Supports Zeebe API</th>
<th style={{ textAlign: "end" }}>Supports Camunda 8 API</th>
<td><NoItem /></td>
<td>
<YesItem />
Expand Down Expand Up @@ -181,39 +181,39 @@ We recommend you migrate process-by-process, allowing you to thoroughly test the

Repeat these steps for all user tasks in the process. Then, deploy the process to your development cluster and test it by running the process and ensuring your custom task applications work.

## Use the new Zeebe Task API
## Use the new Camunda 8 API

:::note
The Tasklist REST API is not deprecated, and you still need it for queries on both task types.
akeller marked this conversation as resolved.
Show resolved Hide resolved
:::

Operations on Zeebe user tasks which modify the task state have to be performed using the new Zeebe REST API. However, queries and adjacent operations still require the Tasklist REST API. The following table provides a breakdown of which operations are supported in which API, and for which user tasks.
Operations on Zeebe user tasks which modify the task state have to be performed using the new [Camunda 8 REST API](/apis-tools/camunda-api-rest/camunda-api-rest-overview.md). However, queries and adjacent operations still require the [Tasklist REST API](/apis-tools/tasklist-api-rest/tasklist-api-rest-overview.md). The following table provides a breakdown of which operations are supported in which API, and for which user tasks.

<table style={{ textAlign: "center" }}>
<tr>
<th style={{ textAlign: "end" }}>Operation</th>
<th>Tasklist API</th>
<th>Zeebe Task API (8.5)</th>
<th>Camunda 8 API</th>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Query tasks</th>
<th style={{ textAlign: "end" }}>Query user task</th>
<td><span style={{ color: "green" }}>✔</span> All types</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
<td><span style={{ color: "green" }}>✔</span> Zeebe tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Get task</th>
<th style={{ textAlign: "end" }}>Get user task</th>
<td><span style={{ color: "green" }}>✔</span> All types</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
<td><span style={{ color: "green" }}>✔</span> Zeebe tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Retrieve task variables</th>
<td><span style={{ color: "green" }}>✔</span> All types</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Get task form</th>
<th style={{ textAlign: "end" }}>Get user task form</th>
<td><span style={{ color: "green" }}>✔</span> All types</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
<td><span style={{ color: "green" }}>✔</span> Zeebe tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Change task assignment</th>
Expand All @@ -231,7 +231,7 @@ Operations on Zeebe user tasks which modify the task state have to be performed
<td><span style={{ color: "green" }}>✔</span> Zeebe tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Safe and retrieve draft variables</th>
<th style={{ textAlign: "end" }}>Save and retrieve draft variables</th>
<td><span style={{ color: "green" }}>✔</span> All types</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
</tr>
Expand All @@ -243,7 +243,7 @@ You can also operate both task types at the same time in the same application ut

The major changes are:

- Create and maintain new, additional secrets for the Zeebe REST API.
- Create and maintain new, additional secrets for the Camunda 8 API.
- Call dedicated endpoints on separate components (Zeebe vs. Tasklist) for all state modifications on tasks for the respective task types.
- Manage new request/response objects.

Expand All @@ -253,34 +253,42 @@ The following table outlines the respective endpoints. Click the endpoints to fo
<tr>
<th style={{ textAlign: "end" }}>Operation</th>
<th>Tasklist API</th>
<th>Zeebe Task API (8.5)</th>
<th>Camunda 8 API</th>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Query tasks</th>
<th style={{ textAlign: "end" }}>Query user tasks</th>
<td>
<a href="../specifications/search-tasks">
<a href="../../tasklist-api-rest/specifications/search-tasks">
<code>POST /tasks/search</code>
</a>
</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
<td>
<a href="../../camunda-api-rest/specifications/assign-user-task">
<code>POST /user-tasks/:userTaskKey/assignment</code>
</a>
</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Get task</th>
<th style={{ textAlign: "end" }}>Get user task</th>
<td>
<a href="../specifications/get-task-by-id/">
<a href="../../tasklist-api-rest/specifications/get-task-by-id/">
<code>GET /tasks/:taskId</code>
</a>
</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
<td>
<a href="../../camunda-api-rest/specifications/get-user-task">
<code>GET /user-tasks/:userTaskKey</code>
</a>
</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Retrieve task variables</th>
<td>
<a href="../specifications/get-variable-by-id/">
<a href="../../tasklist-api-rest/specifications/get-variable-by-id/">
<code>GET /variables/:variableId</code>
</a>
<br/>
<a href="../specifications/search-task-variables/">
<a href="../../tasklist-api-rest/specifications/search-task-variables/">
<code>POST /tasks/:taskId/variables/search</code>
</a>
</td>
Expand All @@ -289,64 +297,68 @@ The following table outlines the respective endpoints. Click the endpoints to fo
<tr>
<th style={{ textAlign: "end" }}>Get task form</th>
<td>
<a href="../specifications/get-form/">
<a href="../../tasklist-api-rest/specifications/get-form/">
<code>GET /forms/:formId</code>
</a>
</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
<td>
<a href="../../camunda-api-rest/specifications/get-user-task-form">
<code>GET /user-tasks/:userTaskKey/form</code>
</a>
</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Assign a task</th>
<td>
<a href="../specifications/assign-task/">
<a href="../../tasklist-api-rest/specifications/assign-task/">
<code>PATCH /tasks/:taskId/assign</code>
</a>
</td>
<td>
<a href="../../zeebe-api-rest/specifications/assign-a-user-task">
<code>POST /user-tasks/:taskKey/assignment</code>
<a href="../../camunda-api-rest/specifications/assign-user-task">
<code>POST /user-tasks/:userTaskKey/assignment</code>
</a>
</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Unassign a task</th>
<td>
<a href="../specifications/unassign-task/">
<a href="../../tasklist-api-rest/specifications/unassign-task/">
<code>PATCH /tasks/:taskId/unassign</code>
</a>
</td>
<td>
<a href="../../zeebe-api-rest/specifications/unassign-a-user-task">
<code>DELETE /user-tasks/:taskKey/assignee</code>
<a href="../../camunda-api-rest/specifications/unassign-user-task">
<code>DELETE /user-tasks/:userTaskKey/assignee</code>
</a>
</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Complete task</th>
<td>
<a href="../specifications/complete-task/">
<a href="../../tasklist-api-rest/specifications/complete-task/">
<code>PATCH /tasks/:taskId/complete</code>
</a>
</td>
<td>
<a href="../../zeebe-api-rest/specifications/complete-a-user-task">
<code>POST /user-tasks/:taskKey/completion</code>
<a href="../../camunda-api-rest/specifications/complete-user-task">
<code>POST /user-tasks/:userTaskKey/completion</code>
</a>
</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Update task</th>
<td>-</td>
<td>
<a href="../../zeebe-api-rest/specifications/update-a-user-task">
<code>PATCH /user-tasks/:taskKey</code>
<a href="../../camunda-api-rest/specifications/update-user-task">
<code>PATCH /user-tasks/:userTaskKey</code>
</a>
</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Safe and retrieve draft variables</th>
<th style={{ textAlign: "end" }}>Save and retrieve draft variables</th>
<td>
<a href="../specifications/save-draft-task-variables/">
<a href="../../tasklist-api-rest/specifications/save-draft-task-variables/">
<code>POST /tasks/:taskId/variables</code>
</a>
</td>
Expand All @@ -373,16 +385,16 @@ docId:"apis-tools/tasklist-api-rest/tasklist-api-rest-overview"
},
{
type:"link",
href:"/docs/next/apis-tools/zeebe-api-rest/zeebe-api-rest-overview/",
label: "Zeebe API (REST)",
docId:"apis-tools/zeebe-api-rest/zeebe-api-rest-overview"
href:"/docs/next/apis-tools/camunda-api-rest/camunda-api-rest-overview/",
label: "Camunda 8 API (REST)",
docId:"apis-tools/camunda-api-rest/camunda-api-rest-overview"
}
]}/>

## Troubleshooting and common issues

If your task application does not work properly after migration, check the following:

- **The endpoints return specific error messages when you run them on the wrong task type**: Ensure to call the right endpoint for the right task type, c.f. above [table](#use-the-new-zeebe-task-api).
- **The endpoints return specific error messages when you run them on the wrong task type**: Ensure to call the right endpoint for the right task type, c.f. above [table](#use-the-new-camunda-8-api).
- **Forms do not appear**: Ensure you have extracted embedded forms, if any, and [transformed them into linked forms](/components/modeler/bpmn/user-tasks/user-tasks.md#camunda-form-linked), before you change the task type implementation.
- **Task update operation does not work**: The update operation is only available to Zeebe user tasks.
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",
],
};
2 changes: 1 addition & 1 deletion docs/apis-tools/zeebe-api-rest/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ In this tutorial, we will execute arguments to assign and unassign a user to and
## Assign a Zeebe user task (POST)

:::note
In this tutorial, you will capture a **Zeebe user task** ID to assign and unassign users in this API. Camunda 8.5 introduced this new [user task](/components/modeler/bpmn/user-tasks/user-tasks.md) implementation type, and these Zeebe user tasks are different from job worker-based user tasks. See more details on task type differences in the [migrating to Zeebe user tasks documentation](/apis-tools/tasklist-api-rest/migrate-to-zeebe-user-tasks.md#task-type-differences).
In this tutorial, you will capture a **Zeebe user task** ID to assign and unassign users in this API. Camunda 8.5 introduced this new [user task](/components/modeler/bpmn/user-tasks/user-tasks.md) implementation type, and these Zeebe user tasks are different from job worker-based user tasks. See more details on task type differences in the [migrating to Zeebe user tasks documentation](/apis-tools/migration-manuals/migrate-to-zeebe-user-tasks.md#task-type-differences).
:::

First, let's script an API call to assign a Zeebe user task.
Expand Down
6 changes: 6 additions & 0 deletions docs/apis-tools/zeebe-api-rest/zeebe-api-rest-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ title: "Overview"
description: "Interact with Zeebe clusters. Run user task state operations for Zeebe user tasks."
---

:::warning Deprecation notice
The Zeebe REST API has been deprecated. Camunda introduced the [Camunda 8 REST API](/apis-tools/camunda-api-rest/camunda-api-rest-overview.md) with `8.6` to manage and query process entities such as processes, decisions, forms, and user tasks.

Camunda also introduced [Zeebe user tasks](/apis-tools/migration-manuals/migrate-to-zeebe-user-tasks.md) to build more advanced functionalities, replacing job worker-based user tasks.
:::

## Introduction

The Zeebe REST API is a REST API designed to interact with the Zeebe process automation engine.
Expand Down
2 changes: 1 addition & 1 deletion docs/components/modeler/bpmn/user-tasks/user-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ A user task does not have to be managed by Zeebe. Instead, you can also use
job workers to implement a custom user task logic. Note that you will lose all the task lifecycle and state management features that Zeebe provides and will have to implement them yourself. Use job workers only in case you require a very specific implementation of user tasks that can't be implemented on top of Zeebe user tasks.

:::info
If you started using Camunda 8 with version 8.4 or a lower version and upgraded to 8.5 or newer, your user tasks are probably implemented as job workers. Refer to the [migration guide](/apis-tools/tasklist-api-rest/migrate-to-zeebe-user-tasks.md) to find a detailed list of the differences between the task implementation types and learn how to migrate to Zeebe user tasks.
If you started using Camunda 8 with version 8.4 or a lower version and upgraded to 8.5 or newer, your user tasks are probably implemented as job workers. Refer to the [migration guide](/apis-tools/migration-manuals/migrate-to-zeebe-user-tasks.md) to find a detailed list of the differences between the task implementation types and learn how to migrate to Zeebe user tasks.
:::

You can define a job worker implementation for a user task by removing its `zeebe:userTask` extension element.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/release-notes/850.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The first iteration of this feature brings back existing features from Camunda 7

<!-- https://github.com/camunda/product-hub/issues/2039 -->

The first step to offer an intuitive and consistent experience via a single, [unified Camunda 8 REST API](https://camunda.com/blog/2024/03/streamlining-camunda-apis-zeebe-rest-api/) is to provide the Zeebe REST API. With this release, developers can use the Zeebe REST API to manage [Zeebe user tasks](/apis-tools/tasklist-api-rest/migrate-to-zeebe-user-tasks.md), enabling immediate task state changes. The Zeebe REST API includes support for Identity authentication and multi-tenancy, ensuring parity to the Zeebe gRPC API.
The first step to offer an intuitive and consistent experience via a single, [unified Camunda 8 REST API](https://camunda.com/blog/2024/03/streamlining-camunda-apis-zeebe-rest-api/) is to provide the Zeebe REST API. With this release, developers can use the Zeebe REST API to manage [Zeebe user tasks](/apis-tools/migration-manuals/migrate-to-zeebe-user-tasks.md), enabling immediate task state changes. The Zeebe REST API includes support for Identity authentication and multi-tenancy, ensuring parity to the Zeebe gRPC API.

### Refactoring suggestions <span class="badge badge--long" title="This feature affects Modeler">Modeler</span>

Expand Down
5 changes: 0 additions & 5 deletions optimize_sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -2092,11 +2092,6 @@ module.exports = {
},
],
},

docsLink(
"Migrate to Zeebe user tasks",
"apis-tools/tasklist-api-rest/migrate-to-zeebe-user-tasks/"
),
],
},

Expand Down
Loading