BPM Rule Demo

Where the demo lives — the workflow-demo plugin used throughout this page ships with the enterprise application composition, not in the community repository. Every concept, API and command shown here works the same against the community edition's SmartEngine BPM; only the demo source files are not in this repo.

The complete write-up is in Chinese for now: BPM Rule 示例. This page keeps the English route accurate and links to the runnable source-backed scenario.

workflow-demo ships two BPM rules:

RuleTypePurposeSource
wd_leave_validationVALIDATIONBlocks annual leave with insufficient balance and sick leave over 2 days without attachmentplugins/workflow-demo/rules/wd_leave_validation.drl
wd_leave_routingCONDITIONRoutes leave under 3 days to wd_manager, otherwise to wd_hrplugins/workflow-demo/rules/wd_leave_routing.drl

The rules are declared in plugins/workflow-demo/config/rules.json. The routing rule is called by the svc_rule_route node in wd_leave_approval; the validation rule runs before the process starts.

Useful API surfaces:

  • POST /api/bpm/rules/validate
  • POST /api/bpm/rules/{pid}/evaluate
  • GET /api/bpm/rules?type=CONDITION

For the runnable flow, seed data with:

node docs/screenshot-seeds/seed_workflow_demo.mjs --base-url=http://127.0.0.1:5173 --min-requests=12

Next: BPM End-to-End Walkthrough, BPM SLA Demo.