Skip to content

feat: support full user targeting on workflow USER TASK#171

Open
engalar wants to merge 1 commit intomendixlabs:mainfrom
engalar:fix/issue-169-workflow-target-users
Open

feat: support full user targeting on workflow USER TASK#171
engalar wants to merge 1 commit intomendixlabs:mainfrom
engalar:fix/issue-169-workflow-target-users

Conversation

@engalar
Copy link
Copy Markdown
Contributor

@engalar engalar commented Apr 10, 2026

Fixes #169

Summary

  • Parser now reads both legacy UserSource and current UserTargeting BSON fields, recognizing all five $Type variants (MicroflowUserTargeting, XPathUserTargeting, MicroflowGroupTargeting, XPathGroupTargeting, NoUserTargeting)
  • Added MicroflowGroupSource and XPathGroupSource SDK types with full BSON serialization/deserialization
  • MDL grammar extended with optional USERS/GROUPS modifier: TARGETING [USERS|GROUPS] MICROFLOW/XPATH
  • DESCRIBE output now correctly displays all targeting types including group targeting

Syntax

-- User targeting (existing, backward compatible)
TARGETING MICROFLOW Module.GetUsers
TARGETING XPATH '[System.UserRoles = ''[%UserRole_Manager%]'']'

-- Explicit user targeting (new)
TARGETING USERS MICROFLOW Module.GetUsers
TARGETING USERS XPATH '[...]'

-- Group targeting (new)
TARGETING GROUPS MICROFLOW Module.GetGroups
TARGETING GROUPS XPATH '[GroupType = ''Reviewers'']'

Test plan

  • 6 new parser tests covering all targeting types (user microflow/xpath, group microflow/xpath, no targeting, legacy UserSource)
  • mxcli check validates all syntax variants
  • Full test suite passes
  • Build succeeds

…labs#169)

Parser now reads both legacy UserSource and current UserTargeting BSON
fields, recognizing all five $Type variants: MicroflowUserTargeting,
XPathUserTargeting, MicroflowGroupTargeting, XPathGroupTargeting, and
NoUserTargeting. MDL syntax extended with optional USERS/GROUPS modifier:
TARGETING [USERS|GROUPS] MICROFLOW/XPATH.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support TARGET USERS clause on workflow USER TASK definitions

1 participant