Skip to content

[ENGCE-57552] feat(uipath-maestro-flow): array filter + mandatory-filter guidance#587

Closed
baishalighosh wants to merge 3 commits intomainfrom
engce-57552-array-filter
Closed

[ENGCE-57552] feat(uipath-maestro-flow): array filter + mandatory-filter guidance#587
baishalighosh wants to merge 3 commits intomainfrom
engce-57552-array-filter

Conversation

@baishalighosh
Copy link
Copy Markdown
Contributor

@baishalighosh baishalighosh commented May 5, 2026

Jira: ENGCE-57552[Skills][CLI] Add support for array filter in trigger
RCA: ENGCE-57498 — Gmail Email Received trigger returns 400 on Debug (Confluence)

Summary

Aligns the uipath-maestro-flow > connector-trigger skill with the matching CLI fix in uipcli #1823 so agents stop authoring freeform filter leaves for connector-mandated event parameters (the original ENGCE-57498 / Gmail folder filter footgun).

Before
No mandatory filters
image

Eval coverage

  • New tests/tasks/uipath-maestro-flow/connector_trigger/trigger_with_array_filter.yaml — Gmail INBOX scenario with a freeform "subject contains invoice" leaf. Asserts:
    • eventParameters.folder === "INBOX" (mandatory source lives here, not in filter).
    • filter tree exists for the user's subject leaf, no top-level filterExpression.
    • Freeform tree does NOT contain a folder / ParentFolders leaf id (regression guard for the original 400).
  • Renames the existing connector_trigger eval suite from tests/tasks/uipath-maestro-flow/nodes/connector_trigger/ to the flatter tests/tasks/uipath-maestro-flow/connector_trigger/ so both filter tests live alongside each other.

Architecture context

When the maestro-flow skill configures a Gmail trigger, the CLI call is:

uip maestro flow node configure <flow> <nodeId> --detail '{
  "connectionId": "...", "folderKey": "...", "eventMode": "polling",
  "eventParameters": { "folder": "INBOX" },
  "filter": { ... }
}'

In Studio Web, ConnectorTriggerViewModel.update() calls _setMandatoryFilterExpression() on every input-field property change and persists the result on TriggerActivityConfiguration.mandatoryFilterExpression. The translator at connector-translator-utils.ts:152 (post SW PR #18040) reads triggerConfig.combinedFilterExpression — a getter that AND-joins user filterExpression + persisted mandatoryFilterExpression. The CLI's uipcli #1823 ports this contract end-to-end (defects 1-3 fixed; defect 4 — wiring mandatory-filter-builder.ts into flow-tool and case-tool to actually compute and persist the value — is the follow-up).

This skill PR ensures agents stop emitting the wrong shape (mandatory field as a freeform leaf) ahead of the CLI defect-4 fix landing, and gains the array-filter coverage the original RCA called out.

Depends on

  • uipcli #1823 — CLI defects 1-3 + defect-4 prep. Merge this skills PR only after uipcli #1823 lands and a release is published, otherwise the skill will instruct agents to use a CLI behavior their installed version does not yet support.

Test plan

  • tests/tasks/uipath-maestro-flow/connector_trigger/trigger_with_filter.yaml — existing Outlook subject+from filter eval still passes against the renamed path
  • tests/tasks/uipath-maestro-flow/connector_trigger/trigger_with_array_filter.yaml — new Gmail INBOX + subject filter eval passes locally
  • Spot-check the updated impl.md renders cleanly in the skill viewer

References

  • StudioWeb PR #18007 — array projection (defect 1)
  • StudioWeb PR #18040 — scalar quoting + sanitized-id lookup + translator wiring (defects 2-3, SW-28437, SW-28497)
  • PO.Frontend PR #5206 — Maestro side of defect 4

… guidance [ENGCE-57552]

Aligns the connector-trigger skill with the matching CLI fix
(uipcli #1823 for ENGCE-57552 / RCA ENGCE-57498) so agents stop authoring
freeform leaves for connector-mandated event parameters.

- Removes the stale "Array-field filters are not yet supported" row from the
  "What NOT to generate" table — array-shaped fields now emit projection JMES
  ((tags[?@=='urgent']), (ParentFolders[?ID=='INBOX'])) via the CLI.
- Adds an "Array-shaped fields" subsection under Filter Trees explaining
  filter-projection emission for [*] schema names.
- Adds a "Mandatory filters (auto-emitted)" subsection clarifying that
  connector-mandated event parameters (Gmail folder, Slack channelId) are
  set via eventParameters; the CLI runs them through the same mandatory-filter
  pipeline SW uses and persists the result on
  essentialConfiguration.mandatoryFilterExpression. Adds a corresponding
  "What NOT to generate" row warning against duplicating mandatory clauses
  in the freeform tree.
- Adds skill-flow-trigger-with-array-filter eval — Gmail INBOX scenario
  with a freeform "subject contains invoice" leaf. Asserts mandatory folder
  lives on eventParameters, freeform tree excludes folder/ParentFolders ids,
  no top-level filterExpression. Regression guard for the original 400.
- Renames the existing connector_trigger eval suite from
  tests/tasks/uipath-maestro-flow/nodes/connector_trigger/ to the flatter
  tests/tasks/uipath-maestro-flow/connector_trigger/ alongside the new test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

PR Review: ENGCE-57552 array filter + mandatory-filter guidance

  • Read review criteria and project conventions
  • Read full diff and existing PR comments
  • Read each changed file in full context
  • Verify relative links resolve
  • Check for cross-skill references, secrets, CODEOWNERS
  • Verify test task structure and tags
  • Post review

View job run

…-flow [ENGCE-57552]

Trigger filter-tree authoring (steps 1-7), the mandatory-filter contract,
and array-shaped field handling are IS-generic — they describe the
structured filter shape the IS SDK accepts, not anything maestro-flow
specific. Move them to uipath-platform > integration-service > triggers.md
so other skills (case-tool, agentic-process, …) can reference the same
canonical guidance.

- platform/integration-service/triggers.md gains a new "Building Filter
  Trees from filterFields" section covering the 7-step procedure (sourcing
  fields from triggers describe instead of maestro-flow's flow registry
  get), the mandatory-filter pipeline contract (eventParameters → CLI →
  essentialConfiguration.mandatoryFilterExpression), and array-shaped
  field projection emission.
- maestro-flow connector-trigger/impl.md keeps the flow-shape-specific
  Tree shape, Operators, Examples, and "What NOT to generate" subsections
  but redirects the procedural How-to + array + mandatory subsections to
  the platform reference, with a maestro-flow-specific note about sourcing
  filterFields from flow registry get.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rm [ENGCE-57552]

Step 1 (loading filterFields.fields) is surface-specific — maestro-flow
uses `flow registry get`, other consumers (case-tool, future skills) use
their own command. Mentioning both in the platform doc was confusing
agents reading it standalone. Move the source step back into the
maestro-flow skill where it belongs; the platform doc now starts at
"pick a matching name" and notes that filterFields must already be
loaded by the consuming skill.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant