FlowOn Language (FoL)
All FlowOn artifacts are expressed in FlowOn Language (FoL)—a declarative, JSON-based domain-specific language designed to capture business requirements in an executable format.
Design Principles
| Principle | Description |
|---|---|
| Declarative | Describe what, not how |
| Intuitive | Natural to business concepts |
| Portable | JSON format, version-controllable |
| Executable | Directly runnable without compilation |
| Expressive | Rich enough for complex problems |
| Extensible | New constructs can be added |
Language Coverage
FoL can express:
- Calculations: Formulas, expressions, transformations
- Decisions: Rules, conditions, branching logic
- Validations: Constraints, checks, error messages
- Processes: Workflows, stages, transitions
- Integrations: API calls, data mappings
- Events: Triggers, handlers, subscriptions
Toward Turing Completeness
Our objective is to make FoL Turing complete—capable of expressing any computation. Current capabilities include:
- ✅ Variables and assignments
- ✅ Conditional logic (if/then/else)
- ✅ Loops and iterations
- ✅ Functions and composition
- ✅ Recursion (via flows)
- ✅ State management
Examples
Formula
{
"name": "CalculateOrderTotal",
"type": "Formula",
"inputs": [
{ "name": "Subtotal", "type": "Decimal" },
{ "name": "TaxRate", "type": "Decimal" },
{ "name": "DiscountAmount", "type": "Decimal" }
],
"output": { "type": "Decimal" },
"expression": "Subtract(Add(Subtotal, Multiply(Subtotal, TaxRate)), DiscountAmount)"
}
Decision Table
{
"name": "DiscountRates",
"type": "DecisionTable",
"hitPolicy": "First",
"conditions": [
{ "name": "Quantity", "type": "Integer" },
{ "name": "CustomerTier", "type": "String" }
],
"actions": [
{ "name": "DiscountPercent", "type": "Decimal" }
],
"rules": [
{ "conditions": [">= 100", "Gold"], "actions": ["0.20"] },
{ "conditions": [">= 100", "Silver"], "actions": ["0.15"] },
{ "conditions": [">= 50", "Gold"], "actions": ["0.10"] },
{ "conditions": ["*", "*"], "actions": ["0.00"] }
]
}
Validation
{
"name": "ValidateEmail",
"type": "Validation",
"condition": "MatchPattern(Email, '^[a-z]+@[a-z]+\\.[a-z]+$')",
"errorMessage": "Invalid email format",
"severity": "Error"
}
Logic Flow
{
"name": "ProcessOrder",
"type": "LogicFlow",
"steps": [
{
"name": "ValidateOrder",
"type": "RunValidationSet",
"validationSet": "OrderValidations"
},
{
"name": "CalculateTotal",
"type": "RunLogicBlock",
"logicBlock": "CalculateOrderTotal",
"outputVariable": "Total"
},
{
"name": "CheckApproval",
"type": "Condition",
"condition": "IsGreaterThan(Total, 10000)",
"trueSteps": ["RequireApproval"],
"falseSteps": ["AutoApprove"]
}
]
}
Requirements-as-Code in Action
┌─────────────────────────────────────────────────────────────────────┐
│ FLOWON ARTIFACTS = REQUIREMENTS │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ TRADITIONAL FLOWON │
│ ─────────── ────── │
│ │
│ "The system shall calculate ┌─────────────────────────┐ │
│ the order total as the sum │ Formula: OrderTotal │ │
│ of line item amounts plus │ │ │
│ shipping minus any discount" │ Sum(LineItems.Amount) │ │
│ │ + ShippingCost │ │
│ ↓ │ - DiscountAmount │ │
│ │ │ │
│ Developer interprets... │ ← THIS IS THE │ │
│ Developer writes C#... │ REQUIREMENT AND THE │ │
│ Tester writes tests... │ IMPLEMENTATION │ │
│ Documentation outdated... └─────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘