forked from mendixlabs/mxcli
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
CALL MICROFLOW and CALL WORKFLOW activities support parameter mappings in BSON (the executor auto-binds $WorkflowContext for call-workflow), but MDL has no syntax for users to specify explicit parameter values. This limits the expressiveness of workflow scripts.
Gap
| Layer | Status |
|---|---|
| BSON Parser | ✅ Fully implemented |
| BSON Writer | ✅ Implemented (auto-bind only) |
| MDL Grammar | ❌ No WITH / PARAMETERS clause |
| MDL Executor | ❌ No explicit parameter handler |
Key Files & Lines
BSON Writer — where auto-binding happens (extend to accept explicit mappings)
sdk/mpr/writer_workflow.go:412-426—ParameterMappingsforCallMicroflowTask; array markerint32(2)sdk/mpr/writer_workflow.go:464-478—ParameterMappingsforCallWorkflowActivity; array markerint32(2)
BSON Parser — already implemented, reference only
sdk/mpr/parser_workflow.go:354-355—parseBoundaryEventscall site (adjacent to where parameter mappings are parsed)
Grammar — where to add syntax
mdl/grammar/MDLParser.g4:2247-2254—workflowCallMicroflowStmtandworkflowCallWorkflowStmt; add optionalWITH (param = expr, ...)clause
Executor — where to wire up
mdl/executor/cmd_workflows_write.go:159-194—buildWorkflowActivities()
AST — where to add fields
mdl/ast/— extendWorkflowCallMicroflowNodeandWorkflowCallWorkflowNodewithParameters []WorkflowParamMapping
Proposed MDL Syntax
CALL MICROFLOW MyModule.CalculateDiscount
WITH (OrderAmount = '$WorkflowContext/TotalAmount', CustomerId = '$WorkflowContext/CustomerId')
OUTCOMES 'Approved' -> { } 'Rejected' -> { };
CALL WORKFLOW MyModule.SubApprovalWorkflow
WITH (Context = '$WorkflowContext');Notes
$WorkflowContextauto-binding forCALL WORKFLOWcan remain the default when noWITHclause is given- Parameter types must match the microflow/workflow parameter types (expression vs object reference)
- Array marker for
ParameterMappingsis alwaysint32(2)— seewriter_workflow.go:413
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels