Skip to content

Commit

Permalink
intro changes for smooth migration zeebe user tasks next
Browse files Browse the repository at this point in the history
  • Loading branch information
christinaausley committed Dec 6, 2024
1 parent ca7d090 commit 4134da2
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: camunda-api-rest-overview
title: "Overview"
description: "Interact with Camunda 8 clusters. Activate jobs and run user task state operations for Zeebe user tasks."
description: "Interact with Camunda 8 clusters. Activate jobs and run user task state operations for Camunda user tasks."
---

The Camunda 8 REST API is a REST API designed to interact with a Camunda 8 cluster.
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 Camunda 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 Camunda 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 Camunda 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
2 changes: 1 addition & 1 deletion docs/apis-tools/java-client/zeebe-process-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ processes. It will start a lightweight in-memory Zeebe engine and provide you wi
verify your process behaves as expected.

:::note
As of 8.5.0, Zeebe Process Test does not support the new REST API and related features (e.g. Zeebe user tasks).
As of 8.5.0, Zeebe Process Test does not support the new REST API and related features (e.g. Camunda user tasks).
:::

## Prerequisites
Expand Down
39 changes: 20 additions & 19 deletions docs/apis-tools/tasklist-api-rest/migrate-to-zeebe-user-tasks.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: migrate-to-zeebe-user-tasks
title: Migrate to Zeebe user tasks
description: "Learn how to migrate job worker-based user tasks to Zeebe-based tasks."
title: Migrate to Camunda user tasks
description: "Learn how to migrate job worker-based user tasks to Camunda user tasks."
---

import DocCardList from '@theme/DocCardList';
Expand All @@ -15,8 +15,9 @@ 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.
Zeebe user tasks have several benefits, including:
Camunda 8.5 introduced a new [user task](/components/modeler/bpmn/user-tasks/user-tasks.md) implementation type: Camunda user task.

Camunda user tasks have several benefits, compared to Job worked-based user tasks. It includes:

- Running directly on the automation engine for high performance.
- Removing dependencies and round trips to Tasklist.
Expand All @@ -30,7 +31,7 @@ In this guide, you will learn:

## Decide on your migration path

Zeebe user tasks require migration of the user tasks in both your diagrams and the task API.
Camunda user tasks require migration of the user tasks in both your diagrams and the task API.

With this in mind, you can migrate at your own pace. If you should migrate now or later, and what is required to migrate depends on your current setup and future plans.

Expand All @@ -47,7 +48,7 @@ Use the following decision helper questionnaire to figure out what's right for y

### Task type differences

Learn the differences between both task types and make an informed decision, and understand the new capabilities of Zeebe user tasks. Refer to this table for important high-level differences of the two task types:
Learn the differences between both task types and make an informed decision, and understand the new capabilities of Camunda user tasks. Refer to this table for important high-level differences of the two task types:

<table>
<tr>
Expand All @@ -57,7 +58,7 @@ Learn the differences between both task types and make an informed decision, and
<TableTextSmall>Existing implementation</TableTextSmall>
</th>
<th>
<div>Zeebe user tasks</div>
<div>Camunda user tasks</div>
<TableTextSmall>Recommended for new projects</TableTextSmall>
</th>
</tr>
Expand Down Expand Up @@ -91,7 +92,7 @@ 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 Zeebe and Tasklist APIs to use Camunda user tasks</TableTextSmall>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -175,7 +176,7 @@ We recommend you migrate process-by-process, allowing you to thoroughly test the
3. Check if the task has an embedded form.
- If a form is embedded, [transform it into a linked form](/components/modeler/bpmn/user-tasks/user-tasks.md#camunda-form-linked) before you change the task type implementation. Press `Ctrl+Z` or `⌘+Z` to undo if you accidentally removed your embedded form.
4. Open the **Implementation** section in the properties panel.
5. Click the **Type** dropdown and select **Zeebe user task**. The linked form or external form reference will be preserved.
5. Click the **Type** dropdown and select **Camunda user task**. The linked form or external form reference will be preserved.

<img src={ZeebeTaskSelectionImg} className={styles.noShadow} style={{width: 341}} alt="Task Type Selection" />

Expand All @@ -184,7 +185,7 @@ Repeat these steps for all user tasks in the process. Then, deploy the process t
## Use the new Zeebe Task API

:::note
The Tasklist REST API is not deprecated, and you still need it for queries on both task types.
The Tasklist REST API is deprecated and will be deleted with the 8.9 release.
:::

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.
Expand All @@ -198,42 +199,42 @@ Operations on Zeebe user tasks which modify the task state have to be performed
<tr>
<th style={{ textAlign: "end" }}>Query tasks</th>
<td><span style={{ color: "green" }}>✔</span> All types</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
<td><span style={{ color: "green" }}>✔</span> Camunda user tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Get 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> Camunda user 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>
<td><span style={{ color: "green" }}>✔</span> Camunda user tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Get 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> Camunda user tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Change task assignment</th>
<td><span style={{ color: "green" }}>✔</span> Job worker-based tasks</td>
<td><span style={{ color: "green" }}>✔</span> Zeebe tasks</td>
<td><span style={{ color: "green" }}>✔</span> Camunda user tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Complete task</th>
<td><span style={{ color: "green" }}>✔</span> Job worker-based tasks</td>
<td><span style={{ color: "green" }}>✔</span> Zeebe tasks</td>
<td><span style={{ color: "green" }}>✔</span> Camunda user tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Update task</th>
<td>-</td>
<td><span style={{ color: "green" }}>✔</span> Zeebe tasks</td>
<td><span style={{ color: "green" }}>✔</span> Camunda user tasks</td>
</tr>
<tr>
<th style={{ textAlign: "end" }}>Safe and retrieve draft variables</th>
<td><span style={{ color: "green" }}>✔</span> All types</td>
<td style={{color: "gray"}}>← Use Tasklist API</td>
<td><span style={{ color: "green" }}>✔</span> Camunda user tasks</td>
</tr>
</table>

Expand Down Expand Up @@ -385,4 +386,4 @@ If your task application does not work properly after migration, check the follo

- **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).
- **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.
- **Task update operation does not work**: The update operation is only available to Camunda user tasks.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ An array used to specify a list of variable names that should be included in the

</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The name of the variable."}}></SchemaItem><SchemaItem collapsible={false} name={"alwaysReturnFullValue"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","description":"Always return the full value of the variable?","default":false}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></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={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>priority</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Rules to filter out tasks by their priority. Applicable only for Zeebe user tasks.
Rules to filter out tasks by their priority. Applicable only for Camunda user tasks.

</div><SchemaItem collapsible={false} name={"eq"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `[0,100]`"} schema={{"type":"integer","minimum":0,"maximum":100}}></SchemaItem><SchemaItem collapsible={false} name={"gte"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `[0,100]`"} schema={{"type":"integer","minimum":0,"maximum":100}}></SchemaItem><SchemaItem collapsible={false} name={"gt"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `[0,100]`"} schema={{"type":"integer","minimum":0,"maximum":100}}></SchemaItem><SchemaItem collapsible={false} name={"lt"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `[0,100]`"} schema={{"type":"integer","minimum":0,"maximum":100}}></SchemaItem><SchemaItem collapsible={false} name={"lte"} required={false} schemaName={"integer"} qualifierMessage={"**Possible values:** `[0,100]`"} schema={{"type":"integer","minimum":0,"maximum":100}}></SchemaItem></div></details></SchemaItem></ul></details></TabItem></MimeTabs><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Expand Down
39 changes: 22 additions & 17 deletions docs/components/modeler/bpmn/user-tasks/user-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@ When the user task instance is completed, the process instance continues.

![user-task](assets/user-task.png)

:::info
Camunda 8 also supports the implementation of user tasks with a [service task](/components/modeler/bpmn/service-tasks/service-tasks.md)-like behavior.
Refer to the [job worker implementation](#job-worker-implementation) section below.
Version 8.4 and below are limited to the job worker implementation.
:::
## User task implementation types

## Define a user task
A default user task implementation type is the **Camunda user task** with the `zeebe:userTask` extension element.
It is the recommended implementation type that is introduced on Camunda version 8.6.

A user task is marked as a **Zeebe user task** by the `zeebe:userTask` extension element. Without the `zeebe:userTask` extension element, the user task behaves like a [service task](#job-worker-implementation).
Alternatively, user tasks can be implemented with **Job workers** by removing the `zeebe:userTask` extension element.
Refer to the [Job worker implementation](#job-worker-implementation) section for details.

You can define assignments, scheduling, variable mappings, and a form for the user task as detailed in the following sections.
## Camunda user tasks

The [job worker implementation](#job-worker-implementation) section details the differences and limitations of job worker-based user tasks.
Camunda user tasks support assignments, scheduling, task updates, variable mappings, and a form for a user task as detailed in the following sections.

:::note
The Camunda user task implementation type was previously referred to as the **Zeebe user task**.
:::

### Assignments

Expand Down Expand Up @@ -98,7 +100,7 @@ To set the priority of a user task, specify the priority in the `priority` attri

### Variable mappings

By default, all Zeebe user task variables are merged into the process instance. This
By default, all Camunda user task variables are merged into the process instance. This
behavior can be customized by defining an output mapping at the user task.

Input mappings can be used to transform the variables into a different format.
Expand Down Expand Up @@ -158,16 +160,19 @@ configuration parameters for tasklist applications.

## Job worker implementation

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.
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 Camunda 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.
Camunda version 8.4 and lower support only user tasks with the Job worker implementation.

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 Camunda user tasks.
:::

You can define a job worker implementation for a user task by removing its `zeebe:userTask` extension element.
You can define a Job worker implementation for a user task by removing its `zeebe:userTask` extension element.

User tasks with a job worker implementation behave exactly like [service tasks](/components/modeler/bpmn/service-tasks/service-tasks.md). The differences between these task
User tasks with a Job worker implementation behave exactly like [service tasks](/components/modeler/bpmn/service-tasks/service-tasks.md). The differences between these task
types are the visual representation (i.e. the task marker) and the semantics for the model.

When a process instance enters a user task with job worker implementation, it creates
Expand All @@ -190,9 +195,9 @@ This also limits available metrics and reporting for such user tasks to what is
All user task-specific data like assignments and scheduling information is provided in the job as
[task headers](/components/modeler/bpmn/service-tasks/service-tasks.md#task-headers).

You cannot use the Camunda 8 Zeebe User Task API to work on user tasks based on job workers.
You cannot use the Camunda 8 API to work on user tasks based on job workers.
Overall, you are limiting those user tasks to the capabilities of [service tasks](/components/modeler/bpmn/service-tasks/service-tasks.md).
Zeebe user task-specific features are not available to those user tasks.
Camunda user task-specific features are not available to those user tasks.

## Additional resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ To correct any instances affected by this issue, we recommend the following step

### Camunda Form (embedded)

:::info
Embedded forms are supported only by Job worker-based user tasks and are not available for the [Camunda user task implementation type](/components/modeler/bpmn/user-tasks/user-tasks.md#user-task-implementation-types).
:::

When choosing **Camunda Form (embedded)** as type you have the option to directly paste the form's JSON schema into the **Form JSON configuration** field of the properties panel.
The form will be embedded directly into the BPMN diagram's XML representation.

Expand Down

0 comments on commit 4134da2

Please sign in to comment.