A Business Rule Task is used to synchronously execute one or more rules. It is also possible to call Java code or providing a work item for an external worker to complete asynchronously or invoking a logic which is implemented in form of webservices.
You can use the ASEE Flow DMN engine integration to evaluate a DMN decision. You have
to specify the decision key to evaluate as the camunda:decisionRef attribute. Additionally,
the camunda:decisionRefBinding specifies which version of the decision should be evaluated.
Valid values are:
deployment, which evaluates the decision version which was deployed with the process
version,
latest which will always evaluate the latest decision version,
version which allows you to specify a specific version to execute with the camunda:decisionRefVersion attribute, and
versionTag which allows you to specify a specific version tag to execute with the camunda:decisionRefVersionTag attribute.
The attributes camunda:decisionRef, camunda:decisionRefVersion, and camunda:decisionRefVersionTag can be specified as
an expression which will be evaluated on execution of the task.
The output of the decision, also called decision result, is not saved as process variable automatically. It has to pass into a process variable by using a predefined or a custom mapping of the decision result.In case of a predefined mapping, the camunda:mapDecisionResult attribute references the mapper to use. The result of the mapping is saved in the variable which is specified by the camunda:resultVariable attribute. If no predefined mapper is set then the resultList mapper is used by default.
Name of the Result VariableThe result variable should not have the name decisionResult, as the decision result itself is saved in a variable with this name. Otherwise, an exception is thrown while saving the result variable.
By default, the tenant id of the calling process definition is used to evaluate the decision definition.
That is, if the calling process definition has no tenant id, then the Business Rule Task evaluates a decision definition using the provided key, binding and without a tenant id (tenant id = null).
If the calling process definition has a tenant id, a decision definition with the provided key and the same tenant id is evaluated.Note that the tenant id of the calling process instance is not taken into account in the default behavior.
In some situations it may be useful to override this default behavior and specify the tenant id explicitly.The camunda:decisionRefTenantId attribute allows to explicitly specify a tenant id:
Alternatively, a Business Rule Task can be implemented using Java Delegation just as a Service Task. For more
information on this please see the Service Tasks documentation.
In addition to the above, a Business Rule Task can be implemented via the External Task mechanism where an external system polls the process engine for work to do. See the section on Service Tasks for more information about how to configure an external task.