liveBook · Manning

Business rule

As explained in Effective Behavior-Driven Development

A business constraint governing payment when a customer collects an order.

A customer choosing to pay when collecting an order sounds straightforward—until the team asks who should be offered that choice. A business rule states a condition that governs the expected behavior. For example: “Don’t offer pay-on-collection to restricted customers.” A user story can identify the desired change, while candidate rules give the team something specific to examine together. section 10.1 section 1.3.1

Keep the condition visible

A useful example focuses on a restricted customer and the expected result: the pay-on-collection option is not offered. Whether the customer is authenticated need not dominate this example if authentication is incidental to the rule. Other questions—such as how a customer becomes restricted—can be explored separately. section 10.1 section 3.6

Rules and examples do different jobs. The rule is a concise statement of the condition; examples show precisely how it applies. Examples alone can leave readers guessing at the intended rule, while a rule without examples can hide ambiguity. Keep both. section 3.5

To explore a payment rule with the team:

  • Write a candidate rule before treating its wording as settled. section 2.5
  • Place concrete examples beneath the rule and record questions that block agreement. section 2.5
  • Give each example a clear focus, even when several rules must hold for its outcome to occur. section 3.6
Listing 10.1 Structure of the blocklisting feature file (scenario steps omitted for brevity)
Feature: Blocklisting

Rule: Don't offer pay-on-collection for restricted customers
  # Two scenarios merged, because authentication is incidental
  Scenario: Restricted customer is not offered pay-on-collection option

Rule: Customer's email OR phone must match those on blocklist
  Scenario Outline: Decide if customer is restricted

Rule: Restrictions are independent of authentication status
  Scenario: Unauthenticated customer is restricted
  Scenario: Authenticated customer is restricted

Rule: Blocklist is manually configurable
  @manual
  Scenario: Upload replacement blocklist

The feature-file outline separates the pay-on-collection restriction from related blocklisting rules, with a scenario under each rule. section 10.1

The goal is a shared decision about behavior, not merely a tidy document. A focused rule makes it easier to discuss the risk of unpaid collection orders and to check whether each example illustrates the intended condition. section 7.7 section 3.6

How Effective Behavior-Driven Development covers it

How deep it goes
Develops rules through candidate wording, focused examples, and workshop questions, without specifying payment-processing internals.
Examples
Uses a restricted-customer pay-on-collection scenario and a feature-file outline separating payment eligibility from blocklisting rules.
What it assumes
Introduces user stories as starting points for conversation and explains rule cards and example cards without requiring prior Example Mapping knowledge.
What you can do after
Practice/perform rule discovery by pairing a concise payment condition with focused examples and recording unresolved questions.
How it connects
Connects business rules to user stories, acceptance criteria, Example Mapping, scenarios, and blocklisting.

Also explained in

Compare how 11 books explain business rule →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Behavior-Driven Development. The section links point to the parts of the book it draws on.