Article

I Loved UML. But It Never Loved Me Back.

I have to admit that I have a weakness for UML diagrams. In the early 90’s, as a new computer science student, light headed with the promise of OO languages, I loved the simplicity of UML. 

I loved the way it allowed complex system interactions and user needs to be abstracted away and objectively communicated. I still feel nostalgic when I see if it used to represent an Enterprise Architect’s vision. There is an elegance to it that I will always love. I mean, who could not love this?

No alt text provided for this image

Or even this?

No alt text provided for this image

But it always gets ugly, eventually turning into this.

No alt text provided for this image

I believe we can do better. I believe we can do better with BPMN. 

Similarities and differences between Use Case Diagrams and BPMN diagrams

Admittedly, there is some overlap between Unified Modeling Language (UML) use case diagrams and Business Process Modeling Notation (BPMN) diagrams, as both are used to model and document processes. 

However, there are key differences between the two. Those differences are important. 

UML use case diagrams are primarily used to represent functional requirements and do not provide a comprehensive view of a system. They are focused on the interactions between a system and its actors and do not consider non-functional requirements such as performance, security, and usability. In contrast, BPMN diagrams are used to model and document business processes and provide a more comprehensive view of a process, including tasks, events, gateways, and data objects.

For example, here is a use case diagram for placing an order.

No alt text provided for this image

And here is the same in a BPMN diagram.

No alt text provided for this image

But if you start to answer any of the organic questions that come up, one of these models bears weight, and that other doesn’t. I’ll let you guess where my opinion lies on that spectrum. 

No alt text provided for this image

The difference is the level of detail provided by the diagrams. UML use case diagrams do not provide a high level of detail and do not show how a system will actually be implemented. BPMN diagrams, on the other hand, provide a more detailed representation of a process and allow for the modeling of multiple scenarios and alternatives within a single process.

In terms of visual representation, UML use case diagrams use natural language and do not have a standardized notation. BPMN diagrams use standard symbols and notation, which makes them more visually intuitive and easier to understand.

UML use case diagrams are primarily used to represent functional requirements, while BPMN diagrams are used to model and document business processes in a more comprehensive and detailed manner. It’s fine to start with UML if you’re the sentimental type, but if you need to look into how systems interact with each other, you’re going to need a different approach. 

Now, it’s natural for my tradition-loving brethren to point to sequence diagrams at this point. But is that really the answer? Let’s take a minute to explore.

Similarities and differences between Sequence Diagrams and BPMN diagrams

Admittedly, sequence diagrams are intuitive and do a good job of showing the high level interactions between systems — but so are BPMN diagrams, as both are used to model and document processes. And, again, BPMN has capabilities that sequence diagrams just can’t match. 

UML sequence diagrams are primarily used to represent the interactions between objects in a system and the sequence of messages exchanged between them. They are focused on the flow of control and do not provide a comprehensive view of a system. In contrast, BPMN diagrams are used to model and document business processes and provide a more comprehensive view of a process, including tasks, events, gateways, and data objects.

And have you ever tried to show if/then/intermediate events in a Sequence Diagram?

It has to do with the level of detail provided by the diagrams. UML sequence diagrams do not provide a high level of detail and do not show how a system will actually be implemented. BPMN diagrams, on the other hand, provide a more detailed representation of a process and allow for the modeling of multiple scenarios and alternatives within a single process.

In terms of visual representation, UML sequence diagrams use a standardized notation, but they do not have a visual representation of the process itself. BPMN diagrams use standard symbols and notation, which makes them more visually intuitive and easier to understand, and also provide a visual representation of the process.

Yes, there is overlap between UML sequence diagrams and BPMN diagrams — but it’s not enough. UML sequence diagrams are primarily used to represent the interactions and sequence of messages between objects in a system, while BPMN diagrams are used to model and document business processes in a more comprehensive and detailed manner. The latter encompasses the former, and is more useful to the people building systems. 

The weakness of UML use case diagrams

Limited scope

UML use case diagrams are limited to the representation of functional requirements and do not provide a comprehensive view of a system. They do not consider non-functional requirements such as performance, security, and usability.

Lack of detail

UML use case diagrams do not provide a high level of detail and do not show how a system will actually be implemented. This can make it difficult to understand how the system will work in practice.

Single flow of events

UML use case diagrams only allow for the representation of a single flow of events and do not provide the ability to model alternative scenarios or exceptions.

Complexity

UML use case diagrams can become complex and difficult to understand as the number of actors and use cases increases.

Limited testing coverage

UML use case diagrams do not provide a comprehensive view of the system, which can limit the scope of testing and result in incomplete testing coverage.

Misuse

UML use case diagrams can be misused as a standalone documentation tool, leading to a lack of completeness and accuracy.

The relative strength of BPMN diagrams

On the other hand, we have the lovely and practical BPMN, where flow, gateways, milestones, events, timers, and roles are used to provide additional context and detail to a process.

Flow

Flow refers to the movement of activities or tasks within a process. It represents the sequence of activities that need to be completed in order to achieve a specific goal. This includes activities, events, and gateways. 

Activities are the tasks or actions that need to be performed as part of the process, and are represented by a rectangle. Events are points in the process where something happens, and are represented by a circle. Gateways are used to control the flow of the process and are represented by a diamond.

Flow objects are connected by flow arrows, which represent the sequence in which the activities and events are to be performed. The flow of a process can be modified using control elements such as looping and branching, which allow for the process to repeat certain steps or take different paths based on certain conditions.

No alt text provided for this image

Gateways

Gateways are used in BPMN to control the flow of the process and are represented by a diamond. There are several types of gateways, including exclusive, inclusive, and parallel, which are used to specify how the flow of the process should be directed based on certain conditions.

Exclusive gateways

Exclusive gateways, also known as “XOR” gateways, allow the process to follow one of several paths, but not all of them. 

They are used to make a decision based on a specific condition and are represented by a solid diamond with a single outgoing flow arrow.

Inclusive gateways, also known as “OR” gateways, allow the process to follow one or more of several paths. They are used to make a decision based on multiple conditions and are represented by a solid diamond with multiple outgoing flow arrows.

Parallel gateways

Parallel gateways, also known as “AND” gateways, allow the process to follow all of several paths simultaneously. They are used to split the process into parallel branches and are represented by a solid diamond with multiple outgoing flow arrows and multiple incoming flow arrows.

Overall, gateways in BPMN are used to control the flow of the process and specify how the process should progress based on certain conditions. They help to make the process more dynamic and adaptable.

Milestones

Milestones are used to mark the achievement of a specific goal or objective within a process. They are represented by a round-cornered rectangle with a horizontal line across the middle. Milestones can be used to represent the completion of a task, the achievement of a specific process step, or the accomplishment of a particular objective.

Events

Events are points in the process where something happens, and are represented by a circle. There are several types of events in BPMN, including start events, intermediate events, and end events.

Start events indicate the beginning of a process and are represented by a solid circle. They are triggered by some external factor, such as the receipt of a customer order.

Intermediate events are events that occur during the course of a process and are represented by a hollow circle. They can be triggered by a variety of factors, such as the completion of an activity or the expiration of a timer.

End events indicate the end of a process and are represented by a solid circle with a cross inside. They are triggered by the completion of all activities in the process or by the occurrence of a specific event.

Timers

Timers in BPMN are used to specify a duration or point in time at which an event should be triggered. They are represented by a clock icon attached to an intermediate event. For example, a timer could be used to trigger an event after a certain period of time has elapsed, or at a specific time of day.

Events and timers in BPMN are used to represent points in the process where something happens, and help to control the flow of the process.

Roles

Roles are used to represent the various actors involved in a process, such as employees, systems, or external partners. Roles are represented by a horizontal ellipse with the name of the role inside. Roles can be used to clarify who is responsible for performing certain tasks or activities within a process and to provide additional context and detail to the process.

Using milestones and roles in BPMN diagrams can help to provide additional context and detail to a process and can make it easier to understand and interpret. They can also be useful for process analysis and improvement, as they allow for the identification of specific goals, objectives, and responsibilities within a process.

Summary

BPMN is more comprehensive and flexible than UML. A single process diagram can convey more information than a dozen use case and sequence diagrams.  It allows for the modeling of a wide range of process elements, including tasks, events, gateways, and data objects, which allows for a more detailed and accurate representation of the process being modeled. 

Additionally, BPMN allows for the modeling of multiple scenarios and alternatives within a single process, whereas traditional use cases are limited to a single flow of events.

Simply put, modeling in BPMN is superior to traditional use cases because of its comprehensiveness and flexibility.  BPMN allows for the modeling of a wide range of process elements, including tasks, events, gateways, and data objects. This allows for a more detailed and accurate representation of the process being modeled.

Events in BPMN represent points in time or conditions within a process. There are various types of events, such as start events, intermediate events, and end events. Start events mark the beginning of a process, intermediate events mark the occurrence of a particular event within a process, and end events mark the end of a process.

Gateways in BPMN are used to model conditional branching and merging within a process. They allow for the modeling of multiple scenarios and alternatives within a single process, which is not possible with traditional use cases.

Data objects in BPMN represent the data that is processed or produced within a process. This can include documents, files, or any other type of data that is relevant to the process.

By allowing for the modeling of these various process elements, BPMN provides a more comprehensive and flexible representation of a business process compared to traditional use cases.

Subscribe

Share