Skip to content

feat(workflow): add MDL syntax for workflow annotations (sticky notes) #9

@engalar

Description

@engalar

Summary

Workflow annotations (Workflows$Annotation) parse correctly and appear as inline comments in DESCRIBE output, but there is no MDL syntax to create them. Annotations are the sticky-note documentation elements visible in Studio Pro's workflow canvas.

Gap

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

Key Files & Lines

BSON Parser — already implemented, reference only

  • sdk/mpr/parser_workflow.go:211-212"Workflows$Annotation" dispatch to WorkflowAnnotationActivity
  • sdk/mpr/parser_workflow.go:484-489 — annotation text extraction

BSON Writer — where to add serialization

  • sdk/mpr/writer_workflow.go:46-49 — workflow-level annotation (already written); per-activity annotation not yet implemented

Executor — describe output (read path, already works)

  • mdl/executor/cmd_workflows.go:263-264formatBoundaryEvents() for reference pattern
  • mdl/executor/cmd_workflows.go — search for WorkflowAnnotationActivity to see how it renders to -- comment

Grammar — where to add syntax

  • mdl/grammar/MDLParser.g4:2223-2231 — add workflowAnnotationStmt to workflowActivityStmt

AST — where to add the node

  • mdl/ast/ — add WorkflowAnnotationNode

Proposed MDL Syntax

-- Workflow-level annotation (already rendered in DESCRIBE, add CREATE support)
CREATE WORKFLOW MyModule.OrderApproval
  ANNOTATION 'This workflow handles order approvals for amounts > $1000';

-- Inline annotation activity on canvas
ANNOTATION 'See BR-xkqm for approval business rules';

Array Marker

Workflows$Annotation is a PART property (not in Activities array) — no array marker needed.

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