Falaah Falaah AI

Business Rules

Save validation rules and decision tables once under Automation > Business Rules, try them on sample data, and reuse them by name in any workflow. Covers formats, ranges, comparing two fields, warn versus block, and how a decision table picks its outputs.

A rule set is a named list of rules your workflows share. Write it once under Automation > Business Rules, test it on sample data, and every workflow step that uses it checks records the same way. Change the rule set and every workflow that uses it follows the change on its next run.

There are two kinds:

Kind What it answers Used by
Validation rules Is this record acceptable? a Validate step or an Evaluate rule set step
Decision table Which values should this record get? a Decision table step or an Evaluate rule set step

When you’d use this

  • Every invoice workflow should refuse a missing vendor or a negative amount, and you want one place to change that.
  • Approval tiers (“over 10,000 goes to the CFO”) are used by several workflows and change once a year.
  • You want to try a rule on a realistic record before it touches real work.

Creating a rule set

  1. Open Automation > Business Rules and click New rule set.
  2. Give it a Name (names are unique in your organization) and, if you like, a description.
  3. Pick the Kind. The kind is fixed once the set is saved.
  4. Add rules (for validation) or rows (for a decision table), as below.
  5. Leave Status on Active so workflows can pick it. A set that is turned off stays saved but is not offered to new steps.
  6. Click Save. Save stays disabled until the set has a name and at least one rule.

Validation rules

Each rule is field · check · value, a severity, and the message shown when it fails. Type the field as it appears on the record, for example amount or vendor.name for a nested field.

Check Passes when the field
equals / does not equal matches (or does not match) the value
is more than / is at least / is less than / is at most compares that way with the value
contains contains the text
is one of / is not one of is (or is not) in a list you type, separated by commas
is between is between a lowest and a highest value, both included. Leave one side empty for “at least” or “at most”
is empty / is filled in has no value / has a value
has at least N / has at most N characters is that long, counted in characters
has the format is a valid email address, phone number, web address (http or https), postal code, digits only, or letters and digits only

Comparing two fields. For equals, does not equal, and the more-than / less-than checks, set Compare with to Another field and type the other field’s name. For example, paid_amount is at most the field invoice_amount, or end_date is more than the field start_date. Changing the check resets the comparison to a value.

Warn or block

Severity What happens when the rule fails
Block The record fails validation. The Validate step takes its failure path and the run records the message.
Warn only The record still passes. The message is recorded as a warning on the run so someone can look at it, and the workflow carries on.

Use Warn only for things that are unusual but allowed, such as a payment slightly above the invoice; use Block for things that must never go through.

Decision tables

A decision table is a list of rows. Each row has conditions (field · check · value, all of which must hold) and the outputs it sets, such as tier = high or approver = cfo. A row with no conditions always matches, which makes a useful last “otherwise” row.

The hit policy decides what happens when several rows match:

Hit policy Result
Use the first matching row Rows are read top to bottom, and the first match sets the outputs. Put the most specific rows first.
Use every matching row Every matching row counts, and each output becomes the list of values from the rows that matched.

When no row matches, a Decision table step sets its own default outputs if it has some; otherwise it takes its no-match path, so the workflow can route the record somewhere else.

Testing before you save

Under Test with sample data, type field names and values as a record would carry them (amount = -5, or vendor.name = Acme), then click Run test. Numbers and true / false are read as numbers and yes/no.

  • For validation rules the result is Passes or Fails, followed by the message of every rule that failed or warned.
  • For a decision table the result names the rows that matched (Matched row 1) or says No row matched, followed by the outputs the record would get.

A test writes nothing and starts no workflow. It uses the same evaluator a workflow step runs, so what passes here passes in a run.

Using a rule set in a workflow

In the workflow builder, open a Validate, Decision table or Evaluate rule set step and choose the set in its Rule set picker. The picker lists active sets by name: a Validate step offers only validation rules, a Decision table step only decision tables, and an Evaluate rule set step either kind. If the step points at a set that was deleted or turned off, the picker says Missing or turned off rule set instead of quietly dropping it, so you can choose another before publishing.

A Decision table step can also carry its own rows, edited in the same row editor, when the table is used by only one workflow.

Editing and deleting

Click Edit on a rule set to change it. An edit applies immediately to every workflow that uses the set, including runs already in progress, the next time they reach a step that reads it; it does not go through workflow publishing or four-eyes review. Every create, edit and delete is recorded in the workspace audit log (Workflows) with who made it and which fields changed. Members who can view workflows but not edit them see View instead.

Delete asks for confirmation first. A set that an active or published workflow still uses cannot be deleted: the error names those workflows, so remove the set from their steps and publish them first. Deleting needs permission to manage workflows.

When it goes wrong

What you see What it means
“A rule set named … already exists” when saving Names are unique. Pick another name or edit the existing set.
Save refused naming a rule The rule is incomplete, for example is between with neither side filled in, or has the format with no format.
“… is used by …” when deleting An active or published workflow still uses the set. Remove it from the named workflows and publish them, then delete.
“That rule set no longer exists.” The link points at a set that was deleted.
“Rule sets could not be loaded” The list failed to load. Click Retry.

Next step