pixabay_egg-583163_1920_stevepb

Engineering

Low-code, High Impact: Flowable & CMMN for Complex Use Cases

OCTOBER 3, 2023

In the dynamic world of software development, managing real-world requirements is like capturing the essence of a complex image: there is always another detail you missed compared to the previous time you looked at it. Just as a simple electrical wire can evolve into a labyrinth of intricacies, software projects often start with straightforward ideas, but commonly, over time, they become increasingly complex.

AdobeStock_196342159

Unlike the physical constraints of our picturesque example, the software realm knows no bounds except those defined by our creativity and innovation (and time and budget). Change is a constant factor, driven by the digital transformation of businesses, rapid technological shifts, and heightened customer expectations for top-tier software.

The Flowable history

To manage this complexity, the vision of Flowable has always been clear: There isn’t just a single tool to tackle all problems. We believe that combining different and multiple tools leads to better, faster, and more maintainable solutions. For example, combining BPMN with CMMN (and others) to elevate both to the next level.

This is why the concept of tools in Flowable's history evolved, starting with BPMN, and later incorporating DMN and CMMN. The evolution continued with the addition of models such as pages, actions, templates, services, data objects, channels, events, queries, and data dictionaries, all seamlessly integrated into the Flowable Work application.

Why something else than BPMN?

Numerous individuals discover Flowable as they become acquainted with BPMN. Although BPMN excels in providing a well-structured sequence of steps, it presents limitations in handling ad-hoc activities, unpredictability, and knowledge-intensive tasks.

CMMN emerges as the right tool to effectively manage this complexity, providing the user or the system with flexibility and dynamic decision-making capabilities. The name “Cases” implies that each of them is unique. Think about concepts like ‘use case’, ‘business case’, ‘case study’ and ‘edge case’ or ‘corner case’. However, with all those benefits they still retain the strong model guarantees as well as the audit capabilities.

Strengths of CMMN

From a high-level point of view, there are a few clear strengths of CMMN. Let’s go through those:

  1. Context: CMMN is keeping a centralized context. It’s a coherent container for related data: people, processes, documents, … pretty much all types of data. The data doesn’t even need to be stored in CMMN and can also be referenced from an external system through data objects. But the context is there, and related process instances can be mapped easily.

  2. Reacting on Events: CMMN has an easy and natural way to model reacting to. Those events can be either internal or external events, they could come from an external system like Kafka, RabbitMQ, SQS and so on. Alternatively, it could also come through a user. A typical “if-this-then-that” scenario can be implemented with context awareness.

  3. User experience: Various CMMN concepts map easily to classical UX patterns, and we’ve seen that thinking in CMMN often helps modeling users to reason about the UX of interacting with the case at runtime. We can use for example stages or milestones to show the progress we are making in a case, while we can use user event listeners to enrich the user interface with buttons. This allows to guide a user through an application.

CMMN use cases

Use cases for which our customers are using CMMN are broad. They include various domains or industries and a few of them are listed here:

  • Client onboarding

  • Fraud detection

  • Student grants

  • Machine failure handling

  • Estate management

  • Project planning

  • Investment decisions

  • Compliance

  • Patient treatment

CMMN vs. BPMN

The debate is not about CMMN vs. BPMN, but about how both can be combined to achieve the goal in a better and more maintainable way. To illustrate that BPMN alone may not suffice, let's examine a case introduced during the webinar. The case is simple, it represents a customer who can execute orders. To enhance the customer experience, we have the customer context and send continuous offers to the customer. A customer has the possibility to subscribe to have a recurring order. Once a customer has subscribed, we don’t need to send orders anymore since they have now a subscription. This is represented as the following case model:

Without going into details about every single element of the diagram, the stages represent the different states in which a customer can be. While inside the stage is described what can happen during that specific face. Note that the stages “Subscription” and “Special Offer” are started conditionally one or the other on the start of the “Active Customer” stage. The # symbol is called “repetition” and means that this element can occur more than once. Now the big question: can this case also be modeled as a BPMN process? Good news first, yes it can. Basically, everything what can be achieved in CMMN can be represented somehow with BPMN as well, it only looks different:

Obvious things first, this BPMN process brings some complexity with it. The readability is more complex and the user reactions, also known as “User Event Listener” and “Manual Activation” from CMMN are represented here with a User Task “Next User Action”. Besides this, the functionality is the same. The disadvantage of the BPMN standard for this scenario is that there is a heavy usage of parallel gateways, event-based gateways combined with signals to send information within the process. We are not satisfied with this BPMN diagram. Is there no way to make it simpler? Maybe there is. Let’s introduce event subprocesses, maybe those solve the issues:

It makes the diagram clearer, and it also reduces the number of parallel branches. However, the number of elements increased further over the version without event sub-processes. The most important part however is that there’s still no way to represent the context and the state of the case, because, after all, it’s a case.

The point here is that some things simply are easier expressed in one tool or the other. With Flowable, you don’t need to choose, learn the tools available to you and then pick & combine them.

Conclusion

Combine the right tools. It’s not about BPMN vs CMMN, use both together. In case you don’t know CMMN yet, we have some options: Create your free Flowable account and use Flowable Design cloud edition to get acquainted with the concepts and CMMN or enroll in our free eLearning course. In addition, you can also watch the full webinar to see how the case above was created and a short explanation of the different CMMN concepts.

Valentin Zickner

Senior Solution Architect

Valentin is a Solution Architect at Flowable. Besides consulting customers on the best implementation of Flowable, he is currently focused on enhancing the developer experience through documentation improvements and video tutorials. 

Share this Blog post
pexels-google-deepmind-18069697
Engineering | FEBRUARY 19, 2024
The Value of AI in Modeling

As AI gains prominence as a pivotal technology and enterprises increasingly seek to leverage its capabilities, we are actively exploring diverse avenues for integrating AI into process automation.

AdobeStock_566576699
Engineering | OCTOBER 2, 2023
The New Flowable eLearning Platform

Discover the reasons behind our brand-new Flowable eLearning platform and explore its features by registering for our inaugural free course.

AdobeStock_601004869
Engineering | JUNE 21, 2023
Specifying Data Structure with a New Model Type: Data Dictionary

Data is a crucial part of modeling and executing cases and processes. Our new module, Data Dictionary, empowers modelers to define which data structures and constraints are needed in the case or process model and all its child models.