Camunda 7.6.0-alpha2 is here and it is packed with new features. The highlights are:
- Support for Decision Requirements Graphs
- New Task Dashboard in Cockpit
- Mapping Input/Output Parameters of a Call Activity using Java Code
- 38 Bug Fixes
The complete release notes are available in Jira.
Support for Decision Requirements Graphs
In the current release, we add support for Decision Requirements Graphs (aka DRG) to model dependencies between decision tables.
Assuming you have a decision table to decide which dish should be served to our guests for dinner. The dish depends on the season and the amount of guests. Using a DRG, you can model that both inputs are the results of two required decision tables which resolve the season and the amount of guests. The following image shows the decision tables.
All decision tables are inside one DMN resource. The decision table (i.e., the decision which contains the table) references the required decision tables by the
requiredDecision elements in the XML.
<?xml version="1.0" encoding="UTF-8"?> <definitions id="dish" name="Desired Dish" namespace="https://camunda.org/schema/1.0/dmn" xmlns="https://www.omg.org/spec/DMN/20151101/dmn11.xsd" > <decision id="dish-decision" name="Dish Decision"> <informationRequirement> <requiredDecision href="#season" /> </informationRequirement> <informationRequirement> <requiredDecision href="#guestCount" /> </informationRequirement> <decisionTable id="dishDecisionTable"> <!-- ... --> </decisionTable> </decision> <decision id="season" name="Season decision"> <decisionTable id="seasonDecisionTable"> <!-- ... --> </decisionTable> </decision> <decision id="guestCount" name="Guest Count"> <decisionTable id="guestCountDecisionTable"> <!-- ... --> </decisionTable> </decision> </definitions>
A DRG can be deployed, parsed and evaluated in the same way as a DMN resource with a single decision table. When the DMN engine evaluates a decision which has required decisions, then it first evaluates the required decision and then maps the output values to the input expressions of the decision table.
You can evaluate the Dish Decision using the following Code:
DmnDecision decision = dmnEngine.parseDecision("dish-decision", inputStream); VariableMap variables = Variables .putValue("temperature", 8) .putValue("dayType", "Weekday"); DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables); String dish = result.getSingleResult().getSingleEntry();
Note that you can’t model DRGs in the Camunda Modeler, yet. We will add support in future releases.
New Tasks Dashboard in Cockpit
We added a new dashboard to Cockpit which shows the amount of open tasks grouped by type and group name.
Mapping Input/Output Parameters of a Call Activity using Java Code
When you use a call activity in a process then you may want to pass variables to or from the calling process. Instead of specifying the mapping in the XML, you can now map the variables using Java code. The class must implement the
DelegateVariableMapping interface and is referenced by name in the Camunda extension property
variableMappingClass of the call activity.
<callActivity id="callSubProcess" calledElement="subProcess" camunda:variableMappingClass="org.camunda.bpm.example.DelegatedVarMapping"/>
You can also reference the delegate via expression, using the Camunda extension property
variableMappingDelegateExpression. See the user guide for additional information.
Please try out the awesome new features of this release and provide feedback by commenting on this post or reaching out to us in the forum.