Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 3 of 6

Decisions and business rules

11 min

Listen to this lesson

0:00 / 7:08

A decision in BPA separates business rules from process flow. Instead of nesting conditions in the process, the process asks a decision a question, here "does this credit request need finance approval, and who approves it?", and branches on the answer. The rules sit in tables the business can read, so Dan can review and change the credit routing without reading a process diagram.

Decision tables and text rules

A decision has input and output parameters, typed with data types, and one or more rules. SAP's tutorial describes two rule types: a decision table, a tabular rule with condition columns and result columns, and a text rule, a set of if-then expressions. For routing questions with several inputs, decision tables are easier to review, because every combination is a visible row.

Fleet sizeRequested limit (USD)Finance approvalApprover group
any0 to 25,000Nonone
under 50 vehiclesover 25,000 to 100,000YesCMC_FIN_CREDIT
50 vehicles or moreover 25,000 to 100,000Nonone
anyover 100,000YesCMC_FIN_CREDIT_SENIOR

Contoso's credit routing decision table (illustrative thresholds, owned by Dan). Read each row as one rule.

Look at the table the way a tester does. Are the ranges complete, with no gaps and no overlaps? What happens at exactly 25,000 and exactly 100,000? Is "50 vehicles or more" inclusive? A decision table is a specification you can test row by row, but only if the boundaries are explicit. Check how your decision handles multiple matching rows (the hit policy, where your tenant offers one) and what it returns when no row matches.

The same credit table drawn as a decision tree: four leaves, four rows, and every boundary is a test case.
The Sign-Off Table · thesignofftable.com/academy/sap-btp-205
The decision's contract: a CreditRequest goes in, a CreditRouting comes out. Testers test against this contract, not against the table layout.
The Sign-Off Table · thesignofftable.com/academy/sap-btp-205

Building the decision, step by step

  1. In the project, create a decision named Credit Routing.
  2. Create the data types CreditRequest (fleet size, requested limit, currency) and CreditRouting (finance approval yes/no, approver group).
  3. Add an input parameter of type CreditRequest and an output parameter of type CreditRouting.
  4. Add a rule of type decision table; add condition columns for fleet size and requested limit and result columns for the two outputs.
  5. Enter the four rows. Write ranges with explicit operators (for example greater than 25000 and less than or equal to 100000).
  6. Test the decision with sample inputs, using the decision editor's test function where your tenant provides it, before using it in the process.
  7. In the process, add the decision step, map its input from the form fields, and use its outputs in the condition and as the recipient group of Dan's approval.

Boundary values: the test table

TestFleet sizeLimitExpected result
B12025,000No finance approval
B22025,001CMC_FIN_CREDIT
B35060,000No finance approval
B44960,000CMC_FIN_CREDIT
B5120100,000No finance approval
B6120100,001CMC_FIN_CREDIT_SENIOR
B700No finance approval (check: is fleet size 0 allowed?)

Boundary tests Priya derives from the decision table. Each row of the decision has at least one test on each side of each boundary.

A rule change follows the same lifecycle as code: change, test, release, deploy. A decision is never edited directly in production.
The Sign-Off Table · thesignofftable.com/academy/sap-btp-205

Decisions in the process context

The process passes inputs to the decision and receives outputs, which it then uses in a condition and as the recipient group for Dan's task. Two mapping errors are common. First, the decision input is bound to the wrong field, for example the fleet sales comment instead of the requested limit; the decision runs but evaluates nonsense. Second, the output group is not mapped to the approval recipients, so the task goes to a default group. Test the decision alone first, then test it inside the process with the same boundary inputs: if the standalone and in-process results differ, the mapping is wrong, not the rule.

Who owns the rules

Decisions make rules visible, and visible rules need an owner. Dan owns Credit Routing: he approves every change to thresholds and groups. Kenji's team owns the data types and the mapping into the process. A rule change is a change request like any other: changed in the DEV tenant, tested with the boundary table, released as a new project version and promoted. "We'll just edit it in production" is how decisions drift from policy.

What goes wrong in testing

  • Gaps between ranges. A limit of exactly 25,000.50 falls between "up to 25,000" and "over 25,001": no row matches.
  • Overlaps. Two rows match the same input, and the result depends on rule order or hit policy.
  • No-match behavior untested. The decision returns an empty result and the process routes to "no approval".
  • Currency assumed. A limit entered in MXN by the Monterrey team compared as USD. Contoso's form fixes the currency to USD for 1710.

What would you do?

Testing finds that a request for exactly 25,000.50 USD skips finance approval. The decision table has "0 to 25,000" and "25,001 to 100,000" rows. What should Priya log and ask for?

Key points
  • Decisions keep business rules out of process flow, in tables the business can read.
  • Decision tables need complete, non-overlapping ranges and a defined no-match result.
  • Derive boundary tests from every row, on both sides of every boundary.
  • Rule changes follow change, test, release and deploy; never edit in production.

Check your understanding · not graded

Lesson check

  1. 1. Which two rule types does SAP's tutorial describe for decisions?

  2. 2. What makes a decision table testable?

  3. 3. A request of 25,000.50 matches no row. What is the root cause?

  4. 4. Who approves changes to Credit Routing thresholds?

  5. 5. How is a rule change promoted to production?