Digitalizing processes leads to higher efficiency and increased productivity. To benefit from operational advantages, companies need to find the right solution to easily orchestrate even dynamic and evolving business processes. Flowable´s CMMN comes in handy here, as it allows for multiple different ways to model processes and their dependencies. If you want to know how to create, handle and efficiently use conditional dependencies with CMMN, follow us on this post.

In the course of this CMMN series we’ve been showing one example of using CMMN to describe case management automation. In the previous post, we got to the point where the third stage, Handle claim, was activated. In this post we’ll look at an entry sentry with a condition and how auto-completion can be used to complete a claim.

Option 1: Automated task activation without an entry sentry

Looking at the third stage, it’ll be no surprise to you by now that the task, Inform claimant of decision, will have become active as soon as the stage it’s in became active. The reason: it has no entry sentry. As a consequence, it automatically leads to the activation and creation of the task. What else you’ll see in this stage will depend on what action you selected previously: accept or reject. Either way, another element will be triggered and appear on your user interface.

This is how it works: The process task, Make claim payment, has an entry sentry. However, it doesn’t have an event linked to it. The consequence:it will be evaluated every time the state of the case is updated – for example, by case variables’ values being modified. If you selected the accept claim action and look at the current tasks in the UI, you’ll see it must have triggered as there’s an active task from the linked process.

Option 2: Conditional task activation with an entry sentry

What went on for this to happen? When following the process, if you select the entry sentry in the model, you’ll see the condition expression that needs to be true for the sentry to trigger the next process task.

This is how it works: There isn’t a specification in the CMMN standard for the syntax of an expression, much the same as for BPMN. Did you know that Flowable uses the same expression language and evaluation in both CMMN and BPMN? This makes it easier for you. The expression we’ve used in our example is:

${vars:equals(claimAccepted, true)}

This is going to test if the claimAccepted variable is equal to true, as well as failing if the variable doesn’t exist. If we knew the variable would always be available with a value of true or false, we could have just used ${claimAccepted}.

Creating variables to set conditions

Where was this variable set? How is it working?  We didn’t look at this at the time, but we already selected the Claim accepted milestone in the previous stage that did the work. Here is how to create the variables in detail:

  1. In the Claim accepted milestone attributes you’ll see that the Create milestone variableis set to a value of claimAccepted.
  2. This information gives you an important clue, as it means that whenever the milestone is activated, that variable will be created and set to true.
  3. Please note, there’s a different variable defined for the Claim rejectedThis use of milestones is very useful for indicating that some point in a case or stage has already been met when the case has progressed further.

Entry criteria are an example of a powerful way of starting different processes depending on information gathered so far:

  • a stage can have a set of process tasks
  • these process tasks can have different entry conditions
  • the entry conditions finally define when the respective processes are appropriate to start. This can be either automatically, or offered to the user to start manually.

Did you know that Flowable combines this capability with AI? We’ve used this coupled with Machine Learning as a way of having smart sentries: the entry condition calls out to the “AI” to see if it should trigger in the given circumstances. In this way, some case behavior can be sitting waiting for any case data to change that the AI is watching to trigger on.

Well, that’s what the marketing brochure would say, coupled with a photo of a white humanoid robot! 😉

Option 3: Auto-completing tasks

Besides having tasks activated automatically without an entry sentry or the option to define specified conditions, we have a third way for jumping from one task to another: auto-completion. If you complete the remaining tasks for the case, you’ll see the case itself will become complete. In our example it needed a bit of help in the model for this to happen.

This is what happened: Because the process task has an entry condition, if the reject milestone is met, the condition will initially fail. Option 2 is therefore no longer possible; however, the stage doesn’t know if this variable could be changed to be true at some point in the future, so it sits waiting for that possibility to happen. To stop this potential future holding up the present, we can set the auto-complete attribute on the process task. This means that even if the task is enabled or available, it can be ignored and the stage completed automatically.

Note: you can also mark elements as required in CMMN, which means the parent stage can’t be automatically completed when the element has not terminated or completed. The stage has a black rectangle at the bottom to visually indicate that it will auto-complete.

With the final stage completed, the case itself is still prevented from completing unless we set the overall case plan to auto-complete. This is because the human task and user event listener outside all the stages would hold up completion in the same way as for the last stage.

Even though we’ve completed the case, we’ll come back to look at these two items outside the stages in our next post, introducing repeating tasks.

Until then you can load the example app model into the Flowable Trial Download to test the different scenarios yourself.

Learn more about the advantages of CMMN in complex and dynamic business processes in our CMMN eBook.

By Paul Holmes-Higgin

Go back to top