Event-driven Workflows

Execute workflows that adapt in real time based on changing facts and conditions across your system. No rigid step sequencing required.

Overview

Traditional workflow engines force you into rigid sequences: step 1 → step 2 → step 3. When conditions change mid-workflow, you're stuck. Slung replaces this linear thinking with relationship-based execution. Rules fire based on facts, not predetermined steps. Your workflow adapts automatically when underlying conditions change.

The Challenge

Building flexible workflows with step-based engines means hardcoding branching logic, handling state machine explosion, and rebuilding workflows for every variation. When business rules change or external systems emit unexpected events, your workflow doesn't adapt—it fails or requires manual intervention.

How Slung Helps

Define workflows as sets of rules that trigger based on facts rather than step sequences. When a fact changes—a user reaches a threshold, a payment succeeds, an approval is granted—affected rules automatically re-evaluate. Your workflow adapts instantly without redefining branches or triggering new executions manually.

Key Benefits

Fact-based Execution

Workflows trigger based on real-time facts, not predetermined steps. Rules fire when conditions are met.

Adaptive Logic

When facts change, affected rules automatically re-evaluate. No manual branching or state machine updates needed.

No State Explosion

Describe rules and relationships instead of building massive state machines with hundreds of edge cases.

Real-time Reactions

External events trigger immediate rule evaluation and propagation across dependent systems.

Example: Order Processing

Instead of a rigid workflow: "Payment → Fulfillment → Notification", Slung lets you define facts and rules:

• When an order is received, check inventory and payment status

• If inventory is low, flag for expedited processing

• If payment fails, emit a retry signal

• If inventory check is pending, hold fulfillment

• Only fulfill when both inventory and payment facts are resolved

• Notify customer based on final fulfillment status

When any fact changes—payment succeeds, inventory updates, customer status changes—the system automatically re-evaluates affected rules. No hardcoded branching needed.

Get Started

Explore the documentation to learn how to build event-driven workflows, or check out other use cases.