forked from mendixlabs/mxcli
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
The BSON parser recognizes Workflows$SystemTask (the legacy activity type name for CallMicroflowTask) for backward compatibility with older Mendix projects. However, there is no BSON writer path for it — the executor always generates Workflows$CallMicroflowTask. If a workflow is read from an old project (containing SystemTask), modified, and written back, the activity type is silently upgraded. This may cause confusion when diffing or version-controlling MPR files.
Gap
| Layer | Status |
|---|---|
| BSON Parser | ✅ Recognizes Workflows$SystemTask |
| BSON Writer | ❌ Always emits Workflows$CallMicroflowTask |
| MDL Grammar | ❌ No explicit SYSTEM TASK syntax (by design) |
| Round-trip fidelity |
Key Files & Lines
BSON Parser — where the type is recognized
sdk/mpr/parser_workflow.go:219—"Workflows$SystemTask"mapped toparseSystemTask(r)sdk/mpr/parser_workflow.go:313-315—parseSystemTask()returns*workflows.SystemTask
SDK Type — where SystemTask is defined
- Search
sdk/forSystemTaskstruct — check if it has a flag to preserve original type name
BSON Writer — where to add the legacy path
sdk/mpr/writer_workflow.go— search forCallMicroflowTaskserialization; add a branch when original type isSystemTask
Options
- Preserve on round-trip (recommended for backward compat): track the original
$Typein the struct and emit it unchanged on write - Always upgrade (current behavior): accept the silent upgrade — simpler, but changes the BSON on every round-trip
- Document as intentional: add a comment in
parseSystemTaskexplaining this is a deliberate upgrade
Notes
Workflows$SystemTaskwas the type name used in Mendix < 10.x before it was renamed toCallMicroflowTask- Projects opened and re-saved in Studio Pro perform the same upgrade, so option 2 may be acceptable
- This issue has low priority unless users report unexpected diffs in version-controlled MPR v2 projects
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels