Skip to content

14.3 Workflow, rules, events

  • MVP: Camunda 7 embeddable in JVM monolith. BPMN models for sanction-to-disbursement saga, application lifecycle, collection cycle, settlement.
  • Scale: Temporal for code-first durable workflows.

See 5.5 Workflow and rules engines for selection rationale.

  • MVP: decision tables in DB + JSON Logic for rule expressions. Sandbox testing via clone DB. Versioned.
  • Scale: Drools when complexity demands.
  • MVP: RabbitMQ.
  • Scale: Kafka with schema registry.
  • Spring Cloud Stream or Spring AMQP for RabbitMQ.
  • Spring Kafka for Kafka.
  • Idempotency patterns: outbox + dedupe.
  • DLQ for permanent failures with inspection UI.
  • Camunda / Temporal for multi-step sagas.
  • Local Java state machines (Spring Statemachine) for in-service flows.
  • Year 1: defer.
  • Year 2+:
    • Feast (or homegrown on warehouse) as feature store.
    • MLflow for experiment + model registry.
    • Training: Python notebooks → MLflow.
    • Serving: Java-side via ONNX runtime or via a Python serving service called from Java.
    • Monitoring: Evidently / Arize / homegrown dashboards.
  • Cross-cutting, low-level shared service.
  • Backends: SMS, WhatsApp, email, push, IVR.
  • Templates centrally managed; multi-language.
  • Spring @Scheduled for in-process.
  • Quartz or K8s CronJob for distributed scheduled.
  • Daily classification, daily NACH, monthly bureau, etc.