Skip to content

feat(workflow): add MDL syntax for boundary events #7

@engalar

Description

@engalar

Summary

Boundary events (timer-based interrupting/non-interrupting) are fully supported in BSON parsing and writing, but there is no MDL syntax to declare them. Users must create boundary events in Studio Pro and cannot manage them via MDL scripts.

Gap

Layer Status
BSON Parser ✅ Fully implemented
BSON Writer ✅ Fully implemented
MDL Grammar ❌ No syntax
MDL Executor ❌ No handler

Key Files & Lines

Grammar — where to add the rule

  • mdl/grammar/MDLParser.g4:2223-2231workflowActivityStmt alternatives; add workflowBoundaryEventStmt
  • mdl/grammar/MDLParser.g4:2234-2245workflowUserTaskStmt; add optional BOUNDARY EVENT clause

AST — where to add the node

  • mdl/ast/ — add WorkflowBoundaryEventNode struct

Visitor — where to build the AST node

  • mdl/visitor/ — implement ExitWorkflowBoundaryEventStmt

Executor — where to wire up BSON generation

  • mdl/executor/cmd_workflows_write.go:159-194buildWorkflowActivities() dispatch

BSON Writer — already implemented, reference only

  • sdk/mpr/writer_workflow.go:153-196serializeBoundaryEvents()
  • sdk/mpr/writer_workflow.go:272-276 — boundary events written per activity

BSON Parser — already implemented, reference only

  • sdk/mpr/parser_workflow.go:599-644parseBoundaryEvents()
  • sdk/mpr/parser_workflow.go:307-308, 354-355, 378-379, 459-460 — per-activity parse calls

Proposed MDL Syntax

USER TASK 'ApproveOrder' 'Approve Order'
  PAGE MyModule.ApprovePage
  TARGETING MICROFLOW MyModule.GetAssignee
  OUTCOMES 'Approve' -> { } 'Reject' -> { }
  BOUNDARY EVENT TIMER INTERRUPTING '${PT1H}';

Array Marker

BoundaryEvents always uses int32(2) — see writer_workflow.go:155.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions