Creating a new CMMN Case Definition

In this section you learn how to create your first CMMN 1.1 case. Start up the Camunda Modeler now.

Create a New CMMN 1.1 Diagram

Select File / New File / CMMN Diagram in the top-level menu of the Camunda Modeler

The Camunda Modeler creates a new CMMN diagram containing a case plan model, the essential part of any CMMN case definition. A plain task is created inside the case plan model.

Define the Case ID

Since we are modeling an executable case, we should give it an Id. The Id is used by the process engine as identifier for the case. It is best practice to set it to a human-readable name. Click on the case plan model, then open the properties panel if it’s not open already. Type loan_application into the Case Id input field.

Optionally you can rename the case plan model. Change the name of the case plan model into Loan Application using the Name field in the properties panel. You should see that the new name is also visible in the diagram in the top latch of the case plan model.

Add Human Tasks

As the first part of the case, the loan application should be reviewed for any formal errors. We therefore need a human task in our case. First click on the plain task, then on the wrench icon next to it. Select Human Task to change the type of the task.

Double click on the human task to edit its name. Type Check Application and hit enter.

Additionally, the customer’s creditworthiness has to be assessed. Add a second task to the canvas from the palette at the left hand side. Morph it to a human task like the Check Application task. Double click on it and name it Provide Customer Rating.

Human Tasks

To learn more about human tasks, consider checking the Human Task section of our CMMN implementation guide.

Manual Activation Rule

The next step is to define that the human tasks don’t need manual activation. First click on the Check Application task, then on the wrench again and on the manual activation rule button .

The manual activation rule is now active. You can see that a marker has been placed on the human task. Now is a good time to disable manual activation and to enable automatic activation. Go to the properties panel at the right hand side and click on the Rules tab at the top of the panel. Then define the condition ${false} in the Manual Activation Rule input field.

Repeat these steps for the Provide Customer Rating task to activate and configure the activation rule as well.

Manual Activation Rule

To learn more about the manual activation rule, consider checking the Manual Activation Rule section of our CMMN implementation guide.

User Assignment

We want both tasks to be assigned to the user demo, so that they later appear in the My Tasks section of the Camunda Tasklist. To assign the user demo to a task, click on it and type demo into the Assignee input field in the properties panel.

User Assignment

To learn more about user assignment, check the User Assignment section on the human task page of our CMMN implementation guide.

Note that there is no direct relation between the two plan items. There is no sequence flow connecting the two tasks as in BPMN. In CMMN, this expresses that the tasks can be executed concurrently.

Save the CMMN 1.1 Diagram

When you are done, save your changes by clicking File > Save File As... In the dialog that pops up, navigate to the loan application project directory (by default this is in your Eclipse workspace path). In the project directory, place the model in the src/main/resources folder.

Return to Eclipse. Right-click the project folder and click Refresh. This synchronizes the new CMMN file with Eclipse.

Catch up: Get the Sources of Step-3.

Download as .zip or checkout the corresponding tag with Git.

You can checkout the current state from the GitHub repository.

If you have not cloned the repository yet, please execute the following command:

git clone https://github.com/camunda/camunda-get-started-cmmn.git

To checkout the current state of the process application please execute the following command:

git checkout -f Step-3
Or download as archive from here.

On this Page: