Skip to main content

Editing Decision Tables

The decision table editor is a grid of When columns (inputs), Then columns (outputs) and rules. You need permission to update decision tables to save edits.

The editor has four tabs: Rules, Versions, Releases and Metrics. Editing happens on Rules, which is the default tab and the one that opens when you switch tables. A dot on the Rules tab marks unsaved edits. See Publishing and releasing for the other tabs. The header toolbar below is available on Rules only.

Header toolbar​

The toolbar has these controls, in order.

ControlWhat it does
Name, version and status tagsShows "Version N", the status (Draft, Pending Approval, Published, Rejected or Discarded), "Live in Development: Version N" when a version is live there, and "Next: Version N at time" when one is scheduled.
Undo / RedoSteps back or forward through edits. Keys: Ctrl/Cmd+Z and Ctrl/Cmd+Y. Both are disabled when there is nothing to undo or redo.
CancelReloads the loaded version and discards your edits, including a changed name. There is no confirmation.
SaveSaves the table. See below.
GuideOpens the authoring guide drawer.
ValidateChecks the table. See Validating decision tables.
TestOpens the Test tab in the dock. See Testing decision tables.

Save is highlighted only when you have unsaved edits. It is disabled when you lack permission to update decision tables (tooltip "You don't have the access to update decision table"), there are no edits, the name is empty or a duplicate, or the table is loading or failed to load.

Save first runs local checks. Errors block the save and appear as toasts, one per message. Warnings also appear as toasts. On success the toast reads "Saved successfully!". If the table did not load, it reads "The decision table is not loaded, so it cannot be saved. Reload it and try again."

Test stays available with unsaved edits. It opens with a hint to save first, and tests run the saved version. To switch versions, select Open on a row in the Versions tab. To publish, use Versions too. Publish is disabled until your edits are saved.

More actions​

On narrow windows, controls move into the More actions menu.

Window widthMoves into the menu
Below 1100pxGuide, Validate, Cancel
Below 560pxTest (shown as "Test (save first)")

Undo, Redo and Save always stay in the toolbar.

Leave with unsaved edits​

If you close the tab or press the browser back button with unsaved edits, Studio prompts you first.

Set the hit policy​

The hit policy decides what happens when several rules match.

  1. In the Hit Policy column group, open the hit policy dropdown.
  2. Select a policy.

Select the help button (What is a hit policy?) to see a tooltip that lists all nine policies.

PolicyHint in the dropdown
AnyMatching rules must agree
UniqueOnly one rule may match
FirstThe first matching rule wins
CollectEvery match is returned
Collect (Sum)Matches are added up
Collect (Min)The smallest match is returned
Collect (Max)The largest match is returned
Collect (Count)Matches are counted
Rule orderEvery match is returned, in rule order

Collect (Sum), Collect (Min), Collect (Max) and Collect (Count) are disabled when the Then columns do not fit. The option is labeled "(Requires one output)" or "(Requires one numeric output)".

Work with columns​

Add a column​

  1. Select + on the When or Then group header (Add When column or Add Then column).
  2. Edit the column in the popover that opens.

A new column is named Input_N or Output_N and has the type String.

Edit a column​

Select the column name to open the popover Edit column NAME.

FieldNotes
Column namePlaceholder "Column name (for example, startDate)".
Column TypeString, Boolean, Number, Integer, Date, Time or Date Time.
Default ValueOptional.
Label / descriptionOptional text.

Select Submit to apply, or Cancel.

Input (When) names must start with a letter or underscore, then contain letters, digits or underscores. Otherwise Studio shows "Input names must start with a letter or underscore and contain letters, numbers or underscores." A FEEL keyword is rejected: "Choose an input name that is not a FEEL keyword." Column names must be unique.

If a type change does not fit the existing values, Studio asks Change the column type? with the text "This clears the column's values in every rule." Select Change Type to confirm or Keep Type to cancel.

Column header controls​

Icons appear when you hover over or focus a header. They are hidden when the table is read-only.

ControlWhat it does
Info icon (Details for NAME)Tooltip with Name, Type, Default Value and Description. A blank value shows "N/A".
Pin column / Unpin columnPinned columns move to the left.
More options > Edit ColumnOpens the column popover.
More options > Duplicate ColumnCopies the column and its values. The name gets an _N suffix. The copy is not pinned.
More options > Remove ColumnRemoves the column.

A table needs at least one input and one output column. Removing the last one shows "There should be at least one Input column" (or "Output column").

Drag column headers to reorder them.

Work with rules​

ControlWhat it does
Add RuleAdds a rule at the bottom. Disabled when read-only.
Enable rule N switchWhen off, the rule is greyed out, skipped when the table runs and excluded from the Unique and Any checks.
Drag handleDrag to reorder rules.
More options for rule N > DuplicateInserts a copy below.
More options for rule N > Clear RuleClears the cell values. The rule is switched back on.
More options for rule N > Delete RuleDeletes the rule. There is no confirmation.

The footer counter reads "N rules" or "1 rule", plus ", N off" when rules are switched off.

Edit cells​

Input cells have an operator select (Select type). Its options depend on the column type.

Column typeOptions
Number, IntegerAny, isEqual, Does not equal, Greater than, Less than, >=, <=, Between
Date, TimeAny, Before, After, Between
Date TimeAny, Before, After
BooleanA True/False select
StringA text field (placeholder "Enter string value")

Before and After are strict. After excludes the date itself. Date values accept YYYY-MM-DD or YYYY/MM/DD.

To write an expression:

  1. Select the pencil button in the cell. The Edit COLUMN popover opens.
  2. Turn on the FEEL Expression switch.
  3. Enter the expression in Set Value.

The switch tooltip reads: FEEL mode applies to every alternative in this cell. Use complete expressions, for example contains(?, "gold"), and quote literal text.

The editor autocompletes functions and shows parameter hints and inline syntax issues. For syntax, see the expression reference.

Annotations and rule details​

The Annotations column group holds a note for each rule. Enter text in the Enter annotation field.

Select the info button (Rule N details) to open Rule details. It shows:

  • The title "Rule N of M".
  • An Off tag with "Skipped when the table runs." for a disabled rule.
  • The conditions under If (or If all of these) and the results under Then. A rule with no conditions shows "Always applies."
  • Previous rule, Next rule and Close rule details buttons.

Press Esc to close it. Focus returns to the cell. When no rule is focused, a hint reads "Click any cell to read its rule here."

Find in rules​

Enter text in Find in rules below the grid. Matching rows and cells are highlighted and other rows dim.

KeyAction
EnterNext match
Shift+EnterPrevious match
EscClear the search

The status text reads "No matches", "N matches" or "k of N, Rule r, Column".

Read-only states and banners​

The editor is read-only while loading and when the version is Pending Approval, Rejected or Discarded. Published versions are not locked.

BannerWhen
This table is currently under review. Withdraw it in Versions to edit it. Includes Go to Versions.Pending Approval
This draft was discarded. It is kept for history, cannot be edited and never runs.Discarded
Rejected by reviewer: comment. Includes Go to Versions, where you select Edit and resubmit.Rejected
Function suggestions are unavailable. You can continue editing and validate the decision before saving.Suggestions failed to load. Select Reload suggestions.
The decision table could not be loaded. … Editing is disabled so the stored table is not overwritten.Load error. Select Retry.

If the table is missing, Studio shows "This decision table was not found in the current workspace. It may have been deleted or renamed."

Dialogs when you save​

Draft Version Already Exists​

This opens when you save edits to a version that is not the draft, and a draft already exists: "A draft version (vN) already exists. Choose how to proceed:"

OptionResult
CancelCloses the dialog. Nothing is saved.
Discard draft and save as newDiscards the existing draft (kept in history as Discarded) and saves your edits as a new draft.
Overwrite draftReplaces the existing draft with your edits.

If the first step works but the save fails, Studio keeps your edits in the editor. The message reads "Draft vN was discarded, but your edits could not be saved as a new draft. They are still in the editor; save again to create the draft."

Decision table changed by someone else​

This opens when the version changed after you opened it. Your edits were not saved.

OptionResult
Keep my editsKeeps your edits in the editor.
Reload latestLoads the latest version and discards your unsaved edits.

Next steps​