Skip to main content

Client segmentation by financial service providers

Legal norms as computer code

Jurisdiction

Switzerland (Federal)

Primary Rules

Art. 4-5 and Art. 7-20 Federal Act on Financial Services (FinSA, SR 950.1); Art. 4-5 and Art. 22 Ordinance on Financial Services (FinSO, SR 950.11)

Target Audience

Smaller financial service providers

Project Hash ID

#I434

Project Category Name

Dike

Modern regulatory frameworks like FinSA contain two fundamentally distinct types of legal content: procedural obligations that sequence actions across actors and time, and substantive rules that define the conditions under which those actions apply or are modified. Translating these into operational practice has historically depended on legal interpretation, internal guidelines, and manual compliance checks, introducing latency, inconsistency and audit risk. "Rules as Code" addresses this by expressing legal norms directly in formal, machine-readable languages, enabling automated reasoning over statutory text rather than merely documenting it.

While BPMN is highly effective for mapping the procedural journey of a law, showing the sequence of events and "who does what", it often struggles with the dense, conditional logic found in substantive legal rules. Without a secondary standard, a messy "spaghetti" of branching gateways for every tiny legal condition results, rendering diagrams unreadable. To maintain clarity, DMN (Decision Model and Notation) is used to offload complex "if-then" criteria into a structured table, keeping the BPMN diagram clean and focused only on the workflow steps. The conditions and outputs in each table cell are written in FEEL (Friendly Enough Expression Language). FEEL is side-effect free, deterministic and strongly typed, properties that make it well suited for encoding legal rules, since it guarantees that the same input fact pattern always produces the same prescribed output. Together, these standards transform static legislation and regulation into an executable blueprint that regulated parties can use to ensure both procedural compliance and accurate substantive outcomes.

DNS integrates elegantly with a BPMN process. The evaluation of a legal condition is handed over to a DMN decision table and which returns an output, such as a client segment, an applicable conduct rule set or a waiver flag, directly into the process flow. This architecture has a significant secondary benefit: the DMN table becomes a standalone, independently testable artefact. Regulators, auditors, or counterparties can verify the decision logic against the statutory text without needing to trace through an entire process diagram. As regulatory change occurs, such as a FinSO amendment adjusting an asset threshold, only the affected DMN rule row requires updating, leaving the surrounding BPMN process intact. The result is a compliance infrastructure that is modular, auditable and amenable to version control in exactly the same way as software code.

Work Steps

Assemble decision table

Review the relevant laws and regulations and assemble a complete and internally consistent decision table in tabular form, ensuring that no two rules can fire simultaneously under the Unique Hit policy.

Define XML structure

Set the Namespace URI, OMG 1.3 schema namespace, hit policy and name convention.

Encode inputs

Encode the input columns, each requiring a unique id attribute, a human-readable label, an input expression and input values.

Encode outputs

Encode the output columns, each requiring a unique id attribute, an name, a label and a typeRef.

Encode rules

Each rule requires an input entry per input column, an output entry per output column, a numeric FEEL expression and string values.

Validate XML

Before deployment, validate against two criteria: Schema validity by parsing the XML against the OMG DMN 1.3 XSD schema to catch structural errors. FEEL expression validity by loading the file into a DMN engine to verify that all FEEL expressions parse without errors and that no overlap or gap warnings are raised under the Unique Hit policy.

Sample testing

Run the decision table against test cases to confirm correct firing.

Integrate with BPMN

Reference the DMN decision from a business rule task in the onboarding BPMN process.