top of page

What is a Policy?

Event Storming is a workshop-based technique used primarily in Domain-Driven Design (DDD) to explore complex business processes and systems by identifying domain events, commands, and aggregates. It involves collaboration between domain experts and developers to build a shared understanding of the system.


In Event Storming, Policies represent the business rules or logic that guide actions and decisions within a system. They are a crucial concept for driving how the system behaves under certain conditions. Here’s how Policies fit into the Event Storming model:


1. Policy Definition


   - What is it?


     A Policy is a rule or condition that defines what should happen in response to certain events or situations. It usually acts as a bridge between one or more events and commands or actions.

   

   - Example:


     A policy might say, "When a customer places an order, check their credit limit." The event here is "Order Placed," and the policy defines the action "Check Credit" before proceeding.


2. Trigger and Decision-Making


   - Triggering Events:


     Policies are triggered by one or more events that occur in the system, such as user actions or system changes.

   

   - Decision Logic:


     Policies often involve decision-making. For example, based on the result of checking the customer's credit, the system might either proceed to confirm the order or cancel it. This is the policy logic that ensures the business rules are enforced.


3. Flow in Event Storming

   - Event → Policy → Command:


     In the typical Event Storming flow:


     1. Event: Something happens in the system (e.g., "Order Placed").


     2. Policy: The system or domain experts determine if and what kind of business rules apply (e.g., "Check Credit Limit").


     3. Command: The system issues commands (e.g., "Approve Order" or "Reject Order").


   - Example in Event Storming:


     - Event: "Customer Makes a Purchase."


     - Policy: "If the total amount exceeds $1,000, require managerial approval."


     - Command: "Send Approval Request."


4. Types of Policies


   - Reactive Policies: These react to events that have already happened. For example, "When an order is placed, check inventory levels."


   - Proactive Policies: These enforce conditions before an event is allowed. For example, "Only allow a transaction if the customer is verified."


5. Location in Event Storming


   - In a typical Event Storming session, Policies are represented by a yellow sticky note. They are placed between events (orange notes) and commands (blue notes), showing how business logic drives system behavior.


6. Why Policies are Important in Event Storming


   - Enforces Business Rules: Policies ensure that key business logic and constraints are explicitly captured.


   - Creates a Bridge Between Events and Commands: It provides the reasoning for why certain commands are issued after events occur.


   - Captures Domain Expertise: Policies are a way to codify the knowledge that domain experts bring into the Event Storming process.


Conclusion:


In Event Storming, Policies are essential for defining and enforcing the business logic that governs how events translate into actions within the system. They allow teams to capture decision-making rules and conditions, ensuring that systems behave in ways that align with business needs.

bottom of page