Execute your BPMN diagram

This post will show how to automate BPMN.  That’s to say how a BPMN diagram can be converted into an automated workflow that teams can work from.  BPMN 2.0 is a modelling standard that has been around for 10 years now and although it has its foibles it has been recognised as the best for capturing the business logic behind real-life scenarios.  What most people don’t realise is that the standard itself is supported by an XML definition of the objects.
What does this mean? Essentially that the diagrams can be understood by computers to create an automated workflow application that users can log into and have assigned tasks to work that exactly replicate the business logic of the diagram.  This post then will demonstrate, using a cloud example which you can interact with, how a diagram can be deployed onto an engine that can read the diagram and create such a workflow.  This has huge consequences for process-based organizations who want to change their processes quickly and easily without affecting service levels.
First Things First
So everybody will know what a business process diagram is, it’s that intuitive that it almost doesn’t need explaining.  Here’s an example of one below,  the process takes place in a ‘pool’ and each actor in the process has a ‘swim-lane’.  There is a start event, where you can see an arrow leaving the small circle and an end event where the arrow enters the thicker small circle and the process cannot proceed any further.   
In between there are tasks which take place in the rectangles, these are performed by the owner of the swim-lane in which they are found.  There are decision points where the flow of the process takes one path over another depending on some calculated value or event that has taken place previously.  There are other objects that can be placed on the diagrams as call-outs to pass some extra information to the reader (such as the database/system used for a particular task etc.)
These are the principal objects in a diagram but the standard itself has over 100 objects which are variations of these mentioned above, so a task can be performed by a system or completely manually, an event can happen inside of a process, you may have seen the clock-face on a sequence flow indicating that a certain amount of time has passed.  Together these can model any scenario so that they can be understood by the business.
The models show the logic behind the processes to deliver a service or product for a customer.  These can then be used to build up a hierarchy of processes of how the business works and these can be compared to the overall business objectives to see how well any process supports the business reaching their company vision.
Invoice Receipt Processing
The model below is a BPMN diagram for processing expense receipts.  The process starts when a completed expense form is received, in the Team Assistant’s swim-lane.  The team assistant doesn’t see a task because the task is a decision table which determines to who the expense should be sent to, (for brevity – I won’t include how it functions here but I’ll explain it in another post).
The approver swim-lane contains staff who have been assigned to this group, they will receive expenses from their team members in their own task-list, in this task the approver either approves or rejects the claim. 
If the expense is approved then the ‘Prepare bank transfer’ task is created for this expense in the accountant’s task-list.  After the accountant has completed her task the expense is archived by a system and the process ends. 
For completion, if the expense was not approved by the approver then the sub-process ‘Review invoice’ is created in the team assistant’s task-list
XML Support

As alluded to earlier, the model itself is supported by an XML definition that means that each object in a BPMN diagram can be defined using XML.   Any model that is captured using a BPMN-compliant modelling tool will contain this.  Visio is not a BPMN-compliant tool but there are many free online (for the above diagram has been captured using BPMN.io). 

For the model above I’ve pasted a snippet of the code behind the diagram.  You get the source code from GitHub here and you can see the name of the role “Team assistant” and the names of the sequence flows in this role’s swimlane.

The rest of the code is there in the GitHub link if you want to investigate further.

Deployment onto BPM

The logic that this diagram represents can now be deployed onto an BPM engine and it creates a workflow which ensures that each time the process is called it creates the tasks as and when they are required.  Each time an (expense claim is submitted) then an instance of this process is created and the engine then controls the workflow creating tasks for the right actor in their task-list when the flow of the process diagram moves to a task in their swim-lane. 

In this way, each time the process is launched then there is a record created, furthermore, for each instance then there is a record of where the process has reached, so no job is able to fall through the cracks.  If a task is not completed it stays in the actor’s task list until it is completed.  Let’s look at an example.

The link below connects to an EC2 instance on AWS where I’ve installed the open source version of Camunda‘s BPM platform.  This is the engine that interprets the BPMN diagrams.  Onto this app server I’ve deployed a WAR file which contains the BPMN diagram and also some UI screens that will be displayed for any particular tasks. 

It’s worth mentioning that what is generated on the engine is the business logic not front end screens.  Most engines will have some simple interface for the front-end but 95% of the time a front end is developed in some framework like Angular.  In this case the screens are simple HTML-based forms.

Practical Example
To get started,  click on the link below which will open a new window:
Log-in below using the user-name/password demo/demo.  From there you’ll find yourself in the task-list for the user demo.  The tasklist is the work area for a person/role.  You can have various processes deployed onto a BPM and all the tasks that apply to a person will be found in this area as and when they are created by a process.  From the top right click on the create process button
And from there click on the only process listed available
A form is presented to the user to complete.  Entering data and clicking ‘Start’ initiates the process.  The engine determines what the next task is and creates it with the data values for the relevant user.   You can see process in real-time by navigating to the cockpit.  Either click on the house object on the top right and select cockpit or click on the link below:
This will show a dashboard of the different processes available.  From here you can see the process in real-time.  You can try kicking off new instances of the process in the task-list and entering different values to see how the engine interprets the data and sends the tasks to the correct people’s task-lists in the cockpit. 
To be able to see the tasks that are created for the other users you need to log-in as them.  Below is a reference to the other users configured in this example.  The password for each is the username. 
Changes to the process
If the process needs to change, then it would be a case of changing the diagram and re-deploying the WAR file onto the BPM engine again.  Existing instances of processes would complete using their existing definition of the process.  As we have seen this is how you automate a business process completely.  Every expense claim is recorded as a record in the BPM database, the state of each instance is also always known, so no jobs fall through the cracks.
To Summarise
So to summarise, BPMN is a modelling notation that captures business logic and is backed up with its own XML-definitions.  I showed how to automate BPMN by deploying it onto a BPM engine which then ensures that the business logic of the TO-BE model is perfectly replicated into a live environment for teams to work on. 
The model avoids mis-understandings with development teams and can also be changed easily enough to match any change in the business objectives. 
Please feel free to get in contact if you’d like to find out more.

You might also enjoy

What is Process Improvement and how can it help you

Sign-up for the newsletter which brings you the latest in business process technology applied to the SME sector. 

Your data will be used in accordance with our privacy policy.