One of the smartest and unique features of Flowable is the ability to debug and create test cases for the execution of CMMN and BPMN automation models. Both BPMN and CMMN are open standards, so using Flowable Inspect is a very powerful way to learn how these standard models will actually run. More importantly, it’s the fastest way to develop and test models for real projects of any complexity!
This article is going to introduce a few of its capabilities using the trial version of Flowable and its loan app example. To use Flowable Inspect, you need to select it from the Flowable Work user menu.
This will open a panel at the bottom of the Flowable Work view for all the inspection and test interaction. Notice the buttons on the right that can be used to maximize, minimize or close the panel.
We’re now ready to do some debugging. If you don’t already have the example loan app deployed, that’s the first step to get through as shown in the trial tutorial. With the loan app deployed, you’ll be able to select New from the main Flowable menu and click to create new work. The standard Create dialog will have an additional option if the Flowable Inspect panel is open. Click this and select Run in test mode.
The Current Test tab will show three main blocks of information about the case or process we’ve just started.
The first block is a list of the active or completed steps of the overall execution of the loan app models. There are filter buttons that can be used to show only steps in a particular state (active, completed and so on). For active steps there will be action buttons to step >| or jump >>|. At this point, we’re paused just before the Loan case CMMN model is executed. The second block of information is a list of actions associated with the current selected step, with the option to edit and even add evaluation tests to the list. The third block is a visual representation of the execution state of the CMMN or BPMN model in question.
Let’s start the execution by clicking the >| step button. This steps into the CMMN model and waits at the start of the first stage, shown as a green outlined step (the other stages are available but not active, so shown with a yellow outline).
We can also see the indicator of where we are in the visual representation of the model. Click the step >| button on the Applying for loan step to start the execution of that stage. Also try clicking the different step filters to see how you can find what you’re looking for when there’s lots of completed or available steps.
We now have an active stage and have two elements that can be started. Click the step >| button for the Application process step.
The process task will become active and its step now has a down arrow to allow us to navigate into its execution. Click that to explore more.
The view will change to show the steps, actions and visual representation of the BPMN model. The current step will be the process start event. Click its step >| button and we’ll step to the end of the start event. Click the step >| button again to progress to the start of the user task.
Notice that the user task and form are displayed in the top part of the Flowable Work view – clicking around the Flowable Work views will also update the Flowable Inspect panel. The form can be filled in and the user task completed, but before hitting the Complete button, let’s explore one of the other Flowable Inspect tabs. Select the Forms tab to see a number of options for digging deeper into the form’s execution.
Fill some values into the form and scroll down to the bottom of the Payload tab to see the data reflected there. Other tabs allow you to tweak the form configuration and other dynamic interactions.
Go back to the Current Test tab and maximize the visualization of the model, which will hide the Flowable Work view and show Flowable Inspect in full page.
We want to avoid stepping through absolutely everything, so let’s add a breakpoint after the Review application user task. Right-click on the user task in the model to do this, which will add a breakpoint indicator.
Go back to the split view using the buttons on the right hand of the header. Let’s explore one of the other Flowable Inspect views – click the Inspect tab. This view is always available and provides detailed information and actions that can be taken.
The first block shows an execution tree of the overall case or process that was originally started. You can click around the tree, expanding and collapsing parts of it if it’s large and complex, also clicking on its entries to navigate to them to inspect their state (useful for checking completed steps). The second block shows the values and actions for different aspects of the execution. The default is a list of all variables with their values. Click on the edit button for the requestedLoan variable.
Edit the value and close the dialog for it to be changed. This can be useful when an earlier step in the execution has given a wrong value, but you want to continue debugging without starting all over. There’s lots of other details that can be displayed and acted on. Click the Variables dropdown to get a feel for what’s there – read the Flowable Inspect User Guide to learn more about the power of these facets.
Go back to the Current Test tab for us to continue the execution. You’ll remember we were paused at the end of the first user task.
This time, we’re going to run the execution until the next breakpoint. Click the fast-forward button >>| to jump to the breakpoint we added earlier, then view the Inspect tab to see what’s changed.
We can see the state of the process is now paused at the end of the second user task, also the process variable values that have been set in the steps we skipped over, such as guidance and defaultPath.
We’ll end this article here for now. You can continue stepping through yourself – the quickest way is to click the >>| button to go to the next breakpoint (which will mean the end as there’s no further breakpoints defined).
To see more about the possibilities of using Flowable Inspect to debug as well as to create runnable test cases with assertion tests, take a look at the Flowable Inspect User Guide.
Our long-serving automation editing application, Flowable Design, was built using the AngularJS UI framework. Time to react. Well, to React.Read more
In this post, we'll look at what it takes to run Flowable on GraalVM using the latest Spring Native release.Read more
In this post, I’m going to show you how to run Microsoft’s RPA product from Flowable. The full and complete way of doing this is by using Microsoft Power Automate Cloud to remotely drive Microsoft …Read more