Chapter 1: Create a Basic Process Model, App and Deploy
In Flowable Design, go to the Processes section and select the
Create process button.
In the dialog, name the process model "Leave Application",
set the key to
and optionally add a meaningful description of the process model.
Once created, the process editor opens, and we can start defining our Leave Application process.
By default there is a Start event, so we could go ahead and directly start defining the process, however, it is always a good practice to use pool and lanes to define the roles involved in a process. So delete that Start event and then drag and drop aelement onto the process canvas. We can name that pool the same as the process Leave application process. By default, one lane is defined, so double-click its label and name it Employee. Add another lane by dragging and dropping a "Pool/Lane" element again below the existing lane (drop it once you see that green box below the existing lane). Name that lane Supervisor.
Drag and drop ato the Employee lane where we want to start the process, then click the small User task icon on the right of the Start event to directly add a User task. Name the task, Request leave. Now, click the small user task icon on the right of this User task to directly add another User task and drag it into the Reporting Manager lane. Name it Review leave request. Click the End event icon on the right of this user task to directly add the End event to the same lane.
The diagram now looks like the following:
To deploy our process model, we need to include it in an App that we can then use as a deployment unit. An App is a container of all the items related to a specific process and in this example, all the content related to the process model we are building.
Save the process model, and go to the
Apps section of
Flowable Design and select the Create app button.
Set the app definition name to Leave Application, the key to leaveApplicationApp and optionally add a meaningful description of what the app contains.
Once created, you are in the app editor. Select the Edit included models button to define what we want to add to the app.
BPMN models tab, click our newly created process model: "Leave Application".
The model should be the first one in the list as it was the most recently edited model.
That is it. Now you can Close the dialog, click the Save icon, and choose Save and close editor.
You should now see our newly created app in the list. Select it and click the Publish button. To successfully publish the app requires that Flowable Design is configured to publish (deploy) to your local runtime environment or wherever you want to run and test your app.
Now that we have published the very first and basic version of our app let us run it and create the first process instance.
Go to the Flowable Work runtime, log in, and selectitem in the left-hand side menu. Choose our "Leave Application" in the dialog and confirm the creation of a new process instance.
You should now see your first process instance in the inbox and
the process details. The
Open tasks list already contains the
Request leave user task.
Although this task does not have a
task form attached to it as of now, it can still be completed.
Select the menu:Tasks item and then the Complete.
On completion, the next user task,
is displayed in the tasks list, and this can also be completed.
As we did not link any forms to these user tasks, there was nothing to be entered for these tasks. However, do not worry; we are going to change that behavior in the next chapter.