feat: support full user targeting on workflow USER TASK (fixes #169)#251
Merged
feat: support full user targeting on workflow USER TASK (fixes #169)#251
Conversation
Incorporates all corrections from PR #214 (tinaengel-mx): - Fix BSON field name: CustomDocumentType → DocumentType - Clarify Excluded field: user-controllable toggle, not pre-release artifact - Model type field: "" → "Text generation" - Model metadata: decoded from key, not Portal-pushed on Test Key click - KnowledgeBase key: update sample UUID/qualifiedName (LLMKey → KnowledbaseKey) - ConsumedMCPService: add endpoint (String constant ref) and authenticationMicroflow (optional, no params, returns List<HttpHeader>) - Agent: add microflow tool example (toolType: "Microflow", document ref) - Agent: add minSimilarity to KB tool, temperature/topP/toolChoiceToolName fields - UsageType: Conversational → Chat throughout - Block keyword: MCP SERVICE → CONSUMED MCP SERVICE throughout - Go structs: add ToolChoiceToolName, MinSimilarity, Endpoint, AuthenticationMicroflow; remove speculative Microflow field from ToolRef - Catalog: add endpoint_constant, authentication_microflow columns - Open Question #2 marked answered (microflow tool shape confirmed) - Risk table: microflow tool shape row resolved Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- DESCRIBE output now emits explicit TARGETING USERS for user targeting types (symmetry with TARGETING GROUPS) - Add version history comment for UserSource vs UserTargeting field names - Add explicit NoUserSource/NoUserTargeting case in parseUserSource - Swap XPathConstraint/XPath priority to match writer output - Add doctype-test for all targeting variants - Update quick reference with GROUPS modifier Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…6686) autoBindCallMicroflow() generated the default VoidConditionOutcome inside the microflow lookup loop, after the early return for explicit parameter mappings. When MDL included WITH (...) clauses, the function returned before reaching outcome generation, producing CallMicroflowTask activities with empty Outcomes — triggering CE6686 in Studio Pro. Move outcome generation before the parameter check so it runs unconditionally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI Code ReviewCritical IssuesNone found. Moderate Issues
Minor IssuesNone found. What Looks Good
Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TARGETING [USERS|GROUPS] MICROFLOWandTARGETING [USERS|GROUPS] XPATHsyntax touser taskactivities inCREATE WORKFLOWandALTER WORKFLOW SET ACTIVITYMicroflowGroupSourceandXPathGroupSourcetypes alongside the existing user-targeting variantsConflict resolution notes
All conflicts were in ANTLR-generated parser files — resolved by regenerating from the merged
.g4sources viamake grammar. Two additional content conflicts incmd_workflows.goandMDL_QUICK_REFERENCE.mdwere resolved by keeping main's lowercase syntax convention while adopting the PR's[USERS|GROUPS]targeting syntax.Closes #171
Test plan
make build && make test && make lintall passworkflow-user-targeting.mdlexample script inmdl-examples/doctype-tests/executes correctlymx checkin Studio Pro (integration test)🤖 Generated with Claude Code