Chapter 1: Create a Basic Process Model, App and Deploy

Create the Process

In Flowable Design, go to the Processes section and select Create Process. In the dialog, name the process model "Leave Application", set the key to leaveApplication and optionally add a meaningful description of the process model.

Create a Process model

Once created, the process editor opens, and we can start defining our Leave Application process.

There is already 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 a "Pool / Lane" element 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".

Add Pool, Lanes and User tasks

Drag and drop a start event to 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 it "Request leave". Now, click the small user task icon on the right of this user task to directly add a 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.

This is the result:

Add pool

Create Leave Application App and Publish it

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.

Go to the Apps section of Flowable Design and hit "Create App".

Set the name to "Leave Application", the key to "leaveApplicationApp" and optionally add a meaningful description of what the app contains.

Create the Leave Application app

Once created, you are in the app editor. Select Edit included models to define what we want to add to the app.

In the 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.

Models included in the app definition

That is it. Now you can close the dialog, click the Save button 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.

First Run of the Leave Application Process

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 with any user (e.g., shane.bowen) and select "Create new" under the "Work" app 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. On completion, the next user task, Review leave request, is displayed in the open tasks list and this can also be completed.

Process instance runtime

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.