Categories
#Business rules

Using data in business rules – guards

Guards

Business rules can guarded by writing an expression

An example guard for an include rule

When guarding a business rule, the expression found in the guard will be evaluated and if true, the business rule will be considered part of the process.

In the above example, if the value of the event NL_Conditions is 1 then the activity Betingelser will be included in the process.

Expressions are formally described here. Right now constraints can be integers, numbers, true or false, null or a string value.

Guards are typically used in DCR Forms as forms have data attributes associated with activities/events.

This process holds an example DCR Form where a decision event holds a guard from the decision to an explanation field. If the decision is Yes (1), the explanation event/field is included in the form:

DCR Form with example guard

Notice the [ and ] around the guard.

When choosing Yes in decision the extra field is included as illustrated below:

Related Release notes

Release 6.9

  • Welcome to generative AI in wizard
  • Welcome to improved Activity Effects
  • Import DCR graphs from BPMN and Excel

Related Videos

No related videos found.

Related Articles

No related articles found.
LinkedIn
Share