Skip to content

Support TARGET USERS clause on workflow USER TASK definitions #169

@engalar

Description

@engalar

Problem

When creating workflows via MDL, there is no way to configure the "Target users using" property on USER TASK definitions. This means workflow user tasks cannot be claimed by anyone at runtime — the WorkflowUserTask_TargetUsers association remains empty.

Currently, the only workaround is to open Studio Pro and manually set the "Target users using" property on each user task after creating the workflow via mxcli.

Current behavior

DESCRIBE WORKFLOW output shows no target user configuration on user tasks:

USER TASK ReviewTask 'Review Request'
    PAGE MyModule.TaskPage
    DESCRIPTION 'Please review and decide'
    OUTCOMES
      'Approve' { ... }
      'Reject' { ... };

Attempting to add TARGET USERS fails with a parse error ('Target' is a reserved keyword).

Expected behavior

Support a TARGET USERS clause on USER TASK definitions, for example:

USER TASK ReviewTask 'Review Request'
    PAGE MyModule.TaskPage
    DESCRIPTION 'Please review and decide'
    TARGET USERS XPATH '[System.UserRoles = ''[%UserRole_Manager%]'']'
    OUTCOMES
      'Approve' { ... }
      'Reject' { ... };

Or with a microflow:

    TARGET USERS MICROFLOW MyModule.GetTargetUsers

Additional context

  • GRANT EXECUTE ON WORKFLOW is supported and works — this sets workflow-level access rules
  • But user task-level targeting is separate and equally important for tasks to be actionable
  • Without this, every workflow created via mxcli requires a Studio Pro visit to configure task assignment
  • Mendix 11.x workflow model supports XPath and microflow-based user targeting on user tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions