The FinWatch Watch Script DSL: A Comprehensive Reference
Welcome to the definitive guide for the FinWatch Watch Script (.ws) Domain Specific Language. This document is the single source of truth for any developer writing fraud detection rules. It provides an exhaustive, deeply technical exploration of every component of the language, grounded entirely in the actual implementation of the FinWatch parser and interpreter.
The Future is a Fluent Conversation About Risk
The philosophy behind the Watch Script DSL is “Rules as Code.” Fraud logic shouldn’t live in a black box. It should be versioned in Git, reviewed in Pull Requests, and deployed with the same rigor as your application’s source code. This language is designed to be expressive enough for complex fraud patterns, yet readable enough for compliance and risk analysts to audit.
The Old Way: A System Held Together by Regex and Hope
Traditional rule engines force you to think in isolated, stateless events. This leads to critical limitations:- They Lack Context: A simple rule can’t easily answer questions like, “How many times has this user tried to do this in the last hour?” or “Is this transaction unusual for this specific user?”
- They Are Brittle: A rule like
description regex "(?i)crypto"is easily bypassed. What if the user writesc-r-y-p-t-o? Or uses a different term? You’re stuck in a never-ending game of cat-and-mouse, adding ever-more-complex regex patterns that are a nightmare to maintain. - They Are Slow to Change: Because the logic is often buried in application code or managed through clunky UIs, deploying a new rule is a slow, developer-dependent process. By the time the rule is live, the fraudsters have moved on.
.png?fit=max&auto=format&n=0JF6z69u57hmqsWm&q=85&s=531373acedba0eb783b669f6d558dfd8)