My Journey With Camunda — Part 5 — Tasklist Form
This is multipart series where I wrote my journey using Camunda from a non-java developer perspective.
In Part 4, we have created external task handler with Golang. Now we will work with Camunda default web app to start process and handle user tasks. Camunda provide a ready-to-use web application that allows end users to work on the tasks assigned to them. It’s called Tasklist. While REST API is convenient way for us as developer to interact with Camunda, normal user will appreciate Tasklist because it allows them to do their BPM related tasks without need to understand REST API.
Before user can use Tasklist, we need to grant them authorizations to use it.
After we grant authorizations to all our groups, login to Tasklist with one of the user and click Start Process button (its on upper right menu). You will see following.
Certainly it need improvement. Normal user wouldn’t know what variables they need to add in order to start the process. Let’s go back to Camunda Modeler to fix this.
We will use generated task form. Camunda can generate HTML task forms based on Form Data Metadata provided in the BPMN. We use this because its involve least amount of code. In Camunda Modeler, we add form fields in Start Event and User Task.
After we add form fields, our start process will changed.
It’s improvement but not really great. There are several issues:
- ID, Name, Email, Level should be pre-filled because its logged-in user information. User should not put that information every time he/she wants to submit leave request form.
- We might want to add validation.
- We might want to add available days for leave that belongs to logged-in user so that user aware.
- Leave ID is business key. It should be automatically generated.
There are two approaches to resolve above issues:
- We can deploy webapp written in Java with embedded task form similar to provided example in Camunda Docker image, or
- We can create a custom Tasklist application that interact with Camunda engine through REST API. This is what we are going to do next, create a custom Tasklist application.
Try Tasklist Form
Start Process
User task
That’s all for now. Next we will look how we can create a custom Tasklist application.