Waqar Ali Khan
Waqar Ali Khan

Reputation: 11

User flows and custom user task implementation using Camunda 8

I want to control the user flow in my application using BPMN. Attached is my current BPMN diagram design, which combines service and user tasks. I’m developing a custom web application where the sequence of input screens needs to be configurable.

Here’s how I plan to achieve this:

Upon receiving a request, my backend will instantiate the appropriate process diagram. Based on the next user task (configured with an external form reference via Zeebe/Worker), the backend will execute the task and render the corresponding UI using the returned JSON data. For task transitions, I am utilizing different boundary message events, which are triggered by action buttons on the rendered UI.

Challenges I’m Facing:

  1. I’m uncertain about which type of user task to use—Zeebe’s native user task or the soon-to-be-deprecated worker-based tasks with custom form references.
  2. While I can target specific types for service tasks, I’m unable to achieve similar targeting for user tasks based on a specific custom form reference.
  3. I’m questioning whether this approach is fully achievable with BPMN alone or if adjustments are required.

I would appreciate your feedback and suggestions on addressing these issues.

enter image description here

Alternatively, the following could be a possible solution if I use Service Tasks, but it became very complex. Need suggestions.

enter image description here

Upvotes: 0

Views: 64

Answers (1)

BFR
BFR

Reputation: 143

Your first approach looks decent but may be improved. Rendering a UI for a corresponding user task is the way to go.

However, "completing" a UserTask via a Message Event is unnecessarily complex. Never Versions of the ZeeBeeClient allow the completion of UserTasks directly. See https://javadoc.io/doc/io.camunda/zeebe-client-java/8.6.6/io/camunda/zeebe/client/ZeebeClient.html#newUserTaskCompleteCommand(long)

Upvotes: 0

Related Questions