DT_Sam
Sam Nice
Dunstan Thomas ConsultingTransaction Modelling with BPMN 2.0
Often, when I am out and about delivering BPMN training to our clients, I am asked if it is possible to model the ability to “undo” certain actions within a process model.
The answer is of course yes, BPMN 2.0 provides us with the necessary tools to show this kind of action via transaction modelling.
As you may or may not know, BPMN 2.0 is broken down into several disciplines, see below:
The tools offered by the notation that allow us to undertake transaction modelling fall firmly into the realm of Analytical Modelling.
This means that for users of Sparx Systems Enterprise Architect, we will find everything we need in the toolboxes for BPMN Collaboration and Process diagrams.
Elements for Transaction Modelling
A Transaction Sub-Process refers to the coordinated execution of multiple activities such that they will all complete successfully or, in the event of a cancellation, the activities are rolled back to a state equivalent to none of them completing. To create a Transaction in Enterprise Architect, you first need to create a Sub-Process and then set the Tagged Value isATransaction in the element properties: |
This event will be triggered should the Transaction reach a state in which a Cancel End Event has been reached. The event will then Cancel (not just a clever name) all successfully completed activities within the Transaction that have defined compensating activities and undo them so that they are in a state equal to none of them having been completed. |
Note for Enterprise Architect Users: despite Enterprise Architect allowing you to set any intermediate event as a Cancel, this event type cannot be used used mid-flow and must be attached to a Transaction Sub-Process. |
Should this End Event be reached within a Transaction Sub-Process, it will then trigger the Cancel Event attached to the boundary of the Transaction. |
An Activity can only be rolled back if it has a Compensation Event set as an interrupting boundary event. This will then need to be connected to a Compensation Activity (or Sub-Process) via the Association relationship. To mark an activity for compensation in Enterprise Architect, you will need to access the element properties and set the tagged value isForCompensation to true: |
When triggered, this End Event will terminate the process and will itself trigger any Compensation Events within the process, and by association any Compensating Activities, allowing us to rollback after the successful completion of our Transactions. |
Approaches to Transaction Modelling
Self-Cancelling
When talking about transaction modelling and the phrase “self-cancelling activities” comes up, it is referring to any activities (including Sub-Processes) within a transaction that can be undone should a Cancel End Event be triggered.
A Transaction can contain a single or multiple self cancelling activities.
In the example below we can see that we have a Transaction Sub-Process (modelled as expanded) that contains multiple activities that can be undone when the Compensation Events are triggered by the Cancel Events.
Each of these compensable activities is then linked to a Service Task that is marked for compensation, and it is this Compensation Activity that roles the others back to a state where none of them have been completed.
Note: Whilst it is good practice for an Activity to have one sequence flow in and one out, the same is not true for Associations as can be seen in the example below. |
Deferred Cancellation
Deferred cancellation of activities happens when we model a way for our Transaction Sub-Processes to be undone after they have been successfully completed. We do this by implementing a Compensation End Event somewhere in our possible sequence of events. An example of this is shown in the process below:
Note: Whilst the example above has been modelled with the Transactions in expanded fashion this is has been done for illustrative purposes. It is better practice to keep things simple and model the Transactions in collapsed fashion and link to the other diagrams via abstraction. It is also worth noting that we do not model any link between the Compensation and Cancel End Events and the events that they trigger. I recommend using the same names for each, as per the examples above, to show that there is a logical link between them. |
This concludes our look at Transaction Modelling in BPMN 2.0, I hope you found it a useful explanation.
How can Dunstan Thomas help you with BPMN 2.0?
Dunstan Thomas have been Sparx Systems partners for the last 18 years, delivering training and consulting services around Enterprise Architect to organisations spanning multiple markets.
Leverage the knowledge and experience of our expert consultants to supplement your teams with services such as:
To Shape Script, or not to Shape Script?
To Shape Script, or not to Shape Script?
Almost a year ago, as we embarked on what was to be the first of a series of lockdowns in the UK, I decided to learn some new skills that I could put into practice with Enterprise Architect (EA). I decided that I would like to learn how to create an MDG to assist not only my own modelling activities, but also those of the clients to which Dunstan Thomas provide consultancy services. Besides, with access to one of the best in the business (Phil “Chudders” Chudley) I had no excuse not to drink from an unending well of knowledge.
What is an MDG and what is a Meta Model?
An MDG, or Model Driven Generator Technology, to give it its official title, is the method in which Sparx Systems Enterprise Architect implements a Meta Model.
A Meta Model is the definition of symbols and relationships within a modelling notation. It also defines the rules to which those relationships must adhere.
Getting to it!
I set aside some time with Phil and followed him down the MDG rabbit hole, like my very own White Rabbit.
Over the course of a couple of days, I spent a lot of time with Phil absorbing his words of wisdom. It was then time to get practical as I, like many others, learn best by doing. Therefore, I set out to create what would become my first MDG. I wanted it to be something that would use again rather than it just be a learning aid, so I looked at my role within DT to see where I could make use of a tool not traditionally used to capture information via modelling. This led me looking into risk capture.
In addition to my role as Consultant, I also lend my hand to various other activities about the office (who remembers offices? I ‘member) and one such activity is performing the fire risk assessment for the office. This had me thinking, can I use EA with a custom MDG to model my risk assessments? The answer is of course yes…else, I would not be writing this article.
Unfortunately, COVID-19 threw a spanner in the works as we were very soon under lockdown conditions. This meant that with the office closed, I could not perform a test using the fire assessment documents, but as luck would have it, DT had to perform COVID-19 risk assessments for the office in the event that staff required access. I was able to use this data to test my ability to model a risk assessment.
This led to the creation of my first MDG, RiskResolve. It is a very simple MDG with a set purpose. Define a goal (e.g. use of the office during pandemic conditions), then identify the different activities that are required to achieve that goal and further narrow that down to the individual tasks that would make up such activities. From there, I could then identify the risks associated with any of these items. This formed the top level of my model as the Risk Identification Diagram (RID) and using abstraction, I could then drill-down into the identified risk elements to the next view, the Risk Resolution Diagram (RRD). In this view, our identified risk is comprised of elements called instigators and then we have our resolution elements, which detail how an instigator is addressed to alleviate risk. These are connected via association.
Here are the example patterns I have built into the MDG:
RID Pattern
RRD Pattern
With the MDG working and me able to generate a document from it to form a risk assessment, I was very happy, but soon I got to thinking about using Shape Scripts to enhance the visuals of the model.
What is a Shape Script?
Sparx Systems talk about Shape Scripts as follows:
“As Shape Scripts are associated with stereotypes, you define them through the ‘Stereotypes’ tab of the ‘UML Types’ dialog; each stereotype can have one Shape Script.”
In plain terms, you can define how EA renders your elements by writing a Shape Script for each of them.
Not content with making things easy on myself for a first attempt at writing a Shape Script, I decided that I would like have my Associated Risk elements on the RID diagram rendered as triangles. This would overwrite the default visuals that the element is inheriting for the stereotype on which it is based.
Here is the Shape Script:
The Shape Script draws the shape by way of you plotting out how EA will draw the element within a given rectangular shape:
Here are the results:
As you can see, this is a less than ideal shape for what I need. The element name in this example simply cannot fit within this shape unless I were to attempt to position the name at the bottom of the shape, but even then I would still need space to render other information such as the associated tagged value to tell me who is at risk and display the composite link icon.
I also performed a similar experiment on the RRD, here are the results:
This is what it should look like:
Whilst you can create a Shape Script that displays the relevant compartments (see below), it is very difficult to create the required subshapes for anything beyond a rectangle.
This is especially true given that we can just use the inherited appearance of the metaclass to which we have assigned our stereotypes. From there we can achieve the same by adding attributes such as ShowNotes=1; and ShowTags=1; our diagram profile to achieve the same:
In my example, I need only to publish particular compartments. However, should I need to display the attributes of an element, I cannot do this with a Shape Script and we are back to using the inherited appearance of the metaclass.
Conclusion
I guess through a combination of my experimentation and the visual examples above we can draw the following conclusions:
- EA provides us with an extremely useful and powerful functionality allowing us to create our own metamodels
- These meta models can be further customised through the use of Shape Scripts
- A Shape Script can be set to react to certain conditions e.g. Tagged Values and Properties (like Rectangle Notation and Composite)
- Creating these Shape Scripts can be time consuming and there are limitations to what they can do
From all of this I guess my advice would be to use a Shape Script if you are desperate to change the shape of your element stereotype, just beware of the time required to create some of the more wacky shapes and have them display your required data on the model.
Evolving your Process Models with Time Aware Modelling
Evolving your Business Processes through Time Aware modelling
Earlier this week I was spending a little time flitting around the various LinkedIn groups that I frequent. In one of the BPMN groups, the group admin had set a fun little challenge as follows:
Create a BPMN model for this leave application process:
- Employee applies for annual leave
- Employee must submit the request to their Manager if the leave is < = 5 days
- Employee must submit the leave to their CEO if the leave is < 5 days
- The Manager or CEO approve/reject the leave
- The Manager or CEO inform Employee that their leave application is approved / rejected
I had some time to spare & thought I would quickly whip up a process model to represent this in its most simple form. This was the result:
As you can see, this is probably as simple as this scenario could possibly be made. But, what if I want to evolve this model, how can I show the evolution of this process?
Time Aware BPMN modelling
You may or may not be aware of the ability to create time aware models within Sparx Systems Enterprise Architect, and this functionality allows us to take our as-is process (the simple process), clone it and make the modifications to process that will show our future state…the to-be model.
So how does this work?
This process works by cloning an existing package and its content as a new structure and using EA to give the newly cloned diagram a new version number.
For BPMN modellers, there is a trick that you must be aware of. Cloning a BPMN diagram for the purpose of time aware modelling requires that the diagram in question is at the highest possible level within the package being cloned. This means that you cannot have the diagram created beneath a model element as shown here:
If you were to attempt to clone this, all that you would end up with is the package structure. To get the successful cloning your package needs to look like this:
If you have an existing model within a model element, all is not lost. First, you will need to copy the package using this option:
Next, paste the package from the clipboard into your repository & rename it e.g. Package X for Time Aware. Then, open the package and expand the model element. Following that, move the diagram and all the elements to the top level of the package. You can then delete the model element as it will not be used and would still be present on the original version.
Having done this, you will now be able to clone the package successfully to undertake your time aware modelling activities.
There are a few things that you need to be aware of. For example, you must remember to rename the cloned diagram to reflect its new version so that it is obvious at a glance. This will prevent you from confusing the new version with the old.
Additionally, to make use of this functionality you will need to activate the following filters on the new diagram:
- Filter to Version
- New to Version
The ‘filter to version’ option will look at your cloned diagram and then grey-out anything that is the same as within version one. The’ new to version’ option will display any element added to the new version as ‘normal’, allowing you distinguish between features that are in place within your process and the features that you wish to add to your process in the newer version.
You can even make minor modifications to version one elements & have them render for version two. You can do this by right-clicking one of your greyed-out elements and cloning to new version:
You will of course need to ensure that the version number you assign to this cloned element matches the version number that you have assigned to the diagram. This will then allow you to see the new version of the element on your to-be diagram.
With this in mind, let us jump back to the original example in this article and see how it has evolved using this time aware approach:
As you can see, in the to-be version of this simple process model, we can immediately see the differences between version one and version two, in which we have modelled how we would like this process to function in a future state, whilst retaining the ability to see how the original version functioned. This has been achieved through a combination of adding entirely new elements and cloning some of the original elements to this version and altering their properties.
This will allow you to make informed decisions on how you can change your processes over time before making sweeping change without seeing the effect on your current state of play.
How can I show messages between independent BPMN processes?
Subscriber Questions: How can I show messaging between BPMN processes?
We regularly get asked questions by our YouTube subscribers and recently one we were asked by someone how they could show messaging between independent processes using Enterprise Architect.
In the clip shown below, and after some serious beard stroking, I look at using a high-level collaboration diagram to demonstrate the connectivity between the processes, which was my initial gut reaction. After some additional consideration of the question I also look at an approach using the conversation diagram in conjunction with model elements and lower level choreographies as a way to show this communication at a high-level.
Please click the link below to view the footage:
https://www.youtube.com/embed/tBjj2QeF3M8
Don't forget to subscribe to our channel for more content like this, and of course ask your subscriber questions!
Dunstan Thomas publish online training for BPMN modelling with EA 15.x
Online Training with Dunstan Thomas
BPMN 2.0 with Enterprise Architect version 15
It looks like social distancing will be with us for the foreseeable future and as such Dunstan Thomas are continuing to operate under a remote delivery model. The updates to our online training content continue and today we are pleased to announce the publication of our Business Process Modelling with BPMN 2.0 and Enterprise Architect version 15.x online training course (written by yours truly).
BPMN 2.0 with Enterprise Architect version 15 - Agenda
Introduction to Enterprise Architect
- Describes the main features of Enterprise Architect and its editions
- Describes the concept of repositories in Enterprise Architect;
- Working with repositories
- Structure of repositories
- Describes the concept of repositories in Enterprise Architect;
- Provides an overview of version control with Enterprise Architect
Introduction to BPMN 2.0
- What is BPMN 2.0?
- The role of BPMN 2.0 within the organisation
- BPMN 2.0 diagrams and their audiences
- Suggested workflow for BPMN 2.0 process modelling
- Examples of the BPMN 2.0 diagrams
The Case Study
- This topic is designed to give practical experience of modelling a defined business process using BPMN 2.0
- How to setup your repository for BPMN modelling
Re-using BPMN 2.0 Elements in EA
- This session looks at the process of creating model libraries to allow the re-use of elements across your BPMN 2.0 diagrams
Business Modelling
- The elements and connectors used for Business Modelling
- How to create a Business Model using the BPMN Conversation diagram
- Augmenting conversation diagrams with diagram legends and element colour
Descriptive Modelling
- The elements and connectors used for Descriptive Modelling
- How to create a Descriptive Model using the BPMN Choreography diagram
- Changing the appearance of elements using tagged values
- Setting participant references to demonstrate the relationship between the Business and Descriptive model
Analytical Modelling
- The elements and connectors used for Analytical Modelling
- How to create an Analytical Model using a combination of Collaboration Diagrams & Business Process Diagrams.
- Creation of a top-level collaboration
- Creation of lower level processes
- Creating relationships via diagram composition
- Changing the appearance of analytical elements using tagged values
Advanced Modelling
- The options for advanced modelling with BPMN 2.0
- Event Sub-processes
- Transactions
- Compensations & Compensating Activities
- Cancel Events
- Compensations
- Self Cancelling Activities
- Deferred Cancelling Activities
Each of these topics is delivered as a lesson activity within Dunstan Thomas' learning site. These lessons are made up of reading materials, step by step exercises guiding you through the publication processes and supplementary video content to support those exercises.
Given the current climate, if you would like to know more about our off-the-shelf online training or to organise an instructor led remote learning webinar, please do not hesitate to This email address is being protected from spambots. You need JavaScript enabled to view it.
Stay safe everyone x
Dunstan Thomas publish new online training content
Online Training with Dunstan Thomas
Reporting with EA 15
In this new world of Social Distancing, remote working and remote delivery have become essential as we all adapt to being at home and away from the traditional meeting room environment. It is with this in mind that we are pleased to announce that this morning we have published an update to one of our popular online training courses, Reporting with Enterprise Architect.
The new version of this online self-study training session is made especially to work with Sparx Systems Enterprise Architect version 15.x and covers the following topics:
Reporting with Enterprise Architect v.15 - Agenda
- Introduction to Enterprise Architect
- The main features of Enterprise Architect and its editions
- The concept of repositories in Enterprise Architect;
- Working with repositories
- Structure of repositories
- Provide an overview of version control with Enterprise Architect
- Publishing to HTML
- Generating an HTML Report
- Using your own logo
- Customisation using Web Style Templates:
- Creating a Web Style Template
- Creating a Web Style Template
- Publishing to a DOCX / PDF Document
- Publishing to a DocX / PDF Document
- Templates and the Template Editor
- Completing the Template
- Adding a Table to a Template
- Generating the Document
- Cover Pages, Templates and Style Sheets
- Cover Pages
- Table of Contents
- Style Sheets
- Creating and applying a Style Sheet
- Combining Templates
- Combining Templates
- Creating a Model / Master Document
- Template Fragments
Each of these topics is delivered as a lesson activity within Dunstan Thomas' learning site. These lessons are made up of reading materials, step by step exercises guiding you through the publication processes and supplementary video content to support those exercises.
Given the current climate, if you would like to know more about our off-the-sheld online training or to organise an instructor led remote learning webinar, please do not hesitate to This email address is being protected from spambots. You need JavaScript enabled to view it..
Remote Delivery; Work Safe, Work Smart
Remote Delivery; Work Safe, Work Smart
COVID-19 has thrust us into uncertain times but we are adapting to our new temporary arrangements. Dunstan Thomas, as of last week,
have suspended all face to face training and consulting engagements and moved to remote delivery of these services.
Our Consultants and staff are working as normal from the comfort and safety of their own homes and carrying out remote delivery via
platforms such as MS Teams, Skype for Business and Webex.
What services are available for remote delivery?
Online Training
Dunstan Thomas offers a range of self-study online training courses for Sparx Systems Enterprise Architect via our virtual learning environment. These materials are delivered to you through the learning site in your web browser. The courses are made up of several lessons containing study materials, exercises and supporting video content.
Currently available for EA 15 we have:
- Enterprise Architecture Modelling with EA and ArchiMate 3.0
- Sparx Systems Enterprise Architect; the Practicalities
- SysML 1.5 made Practical with Sparx Systems Enterprise Architect
We are also currently working on updates to the following popular courses to bring them in line with EA 15:
- Business Process Modelling with BPMN 2.0 and EA
- Reporting with Enterprise Architect
- UML with Enterprise Architect for Beginners
For users of older versions of EA we also have a host of courses available for EA v.13
If you would like to discuss online training or be kept abreast of the latest releases onto the platform, please contact us.
EA Workshops
These workshops follow a less rigid agenda than the traditional classroom style training, allowing for free flowing discussion and advice on practical modelling skills using Enterprise Architect.
Instead of a face to face delivery these sessions are now being run online, via various platforms, enabling your teams to still use our years of expert knowledge to enhance their own use of Enterprise Architect efficiently and effectively.
Our available sessions include:
If you would like to discuss setting up an online workshop for remote delivery to your team, please contact us.
EA Model Insight
Our primary consulting service, EA Model Insight, which works by inserting one of our consultants into your team is still up an running. The only change to this service is that onsite assistance is not available for the foreseeable future.
There are multiple areas in which our Consultants can provide their expertise:
- Custom Meta Model specification and development
- Model Migration
- Notational Modelling covering:
- BPMN
- UML
- ArchiMate
You can find out more about this service by visiting our website.
We wish all of you the best in these strange days, stay safe and follow the advice being given and we will see you all very soon.
All the best, the DT Team x
Applying Layers to Diagrams in EA 15.1
Diagram Layers
As I'm sure we all know by now EA 15.1 is available for registered users to get to grips with. Like a kid in a candy store I went & grabbed it right away so that I could play with one of the new features in particular...diagram layers.
I was particularly keen to get to grips with this feature as recently I have been building up some beefy BPMN 2.0 Collaboration diagrams for some of our internal processes here at Dunstan Thomas. The challenge I was facing was how do I communicate a large process to a stakeholder that does not understand the notation (or any notation) without making their brain explode? Up until now I had resorted to explaining the process one logical path (and the branches therein) at time and walking through step by step. This works but it's not ideal...luckily some of our favorite Australian developers have had an absolutely great idea of being able to add layers to our diagrams (of our own specification) that will then allow us to toggle said layers on and off, thereby hiding any elements not contained by the layer we are focussing on.
I have found this invaluable already in communicating with non-technical stakeholders larger diagrams as I can temporarily hide anything I am not currently presenting and thus removing the risk of an overwhelmed stakeholder losing interest.
I have put together a short clip on how easy it is to apply layers to your diagrams with EA 15.1: https://youtu.be/cFQ0-ecSsTg
Go and download EA 15.1 and try it yourself, it is so easy to do and we are already finding client interest in this feature.
EA User Group - Presenter Spotlight; Peter Lieber
EA User Group
Presenter Spotlight: Peter Lieber
Peter Lieber is the founder and owner of a number of software and related companies, and since 2014 he has held the position of President at the Austrian Software Industry Association (VÖSI).
He enjoys sharing his business knowledge with entrepreneurs, managers and students, and with an underlying commitment to promoting the further evolution and global integration of Austria's software sector. As the founder of Sparx Systems Central Europe and LieberLieber Software, Peter focuses on the so-called model-based development of software and systems. This new approach is paving the way for innovation in even the most challenging projects, such as the engineering of complex safety-critical systems in alignment with the principles of Industry 4.0.
Friday 8th June - Keynote: EA 14
On Friday 8th of June Peter will be providing a special insight to EA 14, the biggest launch of an EA version ever!
See and feel the new highlights based on your input from last year in the new release. These new features include clearer navigation structure, docked property windows (no need of any modal windows) for almost everything in a diagram, easy change of views and technologies, Decision Modelling Notation (DMN) integrated to BPMN, SysML and SoaML, journal functionality, and much more…
The main focus of this huge release is: focus on your business not on the tool, raise productivity with your models.
25% off last minute tickets!
Save money on last minute tickets for the London EA User Group with a massive 25% discount, including full event tickets!
Last Minute Full Event Ticket → £517.50 inc. Vat
Last Minute Friday Ticket → £72.00 inc. Vat
You can purchase your tickets from the EA User Group website today.
Last Minute Tickets; EA User Group London
EA User Group London 2018; Last Minute Tickets
The London EA User Group is now only two weeks away, but don't worry, we still have tickets available!
As an added bonus we have there is a last minute offer on tickets purchased between now and June 6th allowing to save 25% of the price!
Last Minute Full Event Ticket → £517.50 inc. Vat
Last Minute Friday Ticket → £72.00 inc. Vat
Make sure to head to head over to the EA User Group website today to buy your tickets at this reduced price!