Skip to content

feat(workflow): preserve Multi-User Task distinction in MDL and BSON writer #8

Description

@engalar

Summary

Workflows$MultiUserTaskActivity is recognized by the BSON parser but silently mapped to SingleUserTaskActivity. The writer always generates SingleUserTaskActivity, losing the business distinction between single-user and multi-user task assignment.

Gap

Layer Status
BSON Parser ⚠️ Recognized but merged into UserTask
BSON Writer ❌ Always emits SingleUserTaskActivity
MDL Grammar ❌ No MULTI USER TASK syntax
MDL Executor ❌ No handler

Key Files & Lines

BSON Parser — where the type is silently collapsed

  • sdk/mpr/parser_workflow.go:192"Workflows$MultiUserTaskActivity" mapped to parseUserTask(r), losing the type distinction

BSON Writer — where single-user type is always emitted

  • sdk/mpr/writer_workflow.go — search for Workflows$SingleUserTaskActivity; no branch for multi-user

SDK Type — where to add the struct

  • sdk/ or generated/ — add MultiUserTaskActivity struct (or add IsMultiUser bool flag to existing UserTask)

Grammar — where to add syntax

  • mdl/grammar/MDLParser.g4:2223-2231 — add workflowMultiUserTaskStmt to workflowActivityStmt
  • mdl/grammar/MDLParser.g4:2234 — reference existing workflowUserTaskStmt for keyword diff

Executor — where to add dispatch

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

Proposed MDL Syntax

MULTI USER TASK 'ReviewOrders' 'Review Orders'
  PAGE MyModule.ReviewPage
  TARGETING MICROFLOW MyModule.GetReviewers
  OUTCOMES 'Approve' -> { } 'Reject' -> { };

Notes

Mendix distinguishes Single vs Multi-User Tasks in Studio Pro — Multi-User Tasks allow multiple assignees and require all (or a configurable number) to complete before proceeding.

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