feat: add ArgumentEmail and ArgumentGroupName escalation recipient types#1521
Open
dushyant-uipath wants to merge 1 commit intomainfrom
Open
feat: add ArgumentEmail and ArgumentGroupName escalation recipient types#1521dushyant-uipath wants to merge 1 commit intomainfrom
dushyant-uipath wants to merge 1 commit intomainfrom
Conversation
Contributor
|
Please also add tests for the deserialization of the new recipient types. test_agent.py only covers StandardRecipient and AssetRecipient. |
639f866 to
2502656
Compare
| type: Literal[AgentEscalationRecipientType.ARGUMENT_EMAIL,] = Field( | ||
| ..., alias="type" | ||
| ) | ||
| argument_name: str = Field(..., alias="argumentName") |
Contributor
There was a problem hiding this comment.
Maybe argument_path would be a better choice for this parameter, since the argument isn't necessarily top level.
2502656 to
2d202e9
Compare
5 tasks
2d202e9 to
742acee
Compare
742acee to
8c0fc7a
Compare
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
Adds two new recipient types to the escalation data model to support argument-driven assignees — where the assignee is resolved from a named input argument at runtime rather than being fixed at design time.
argumentName)7ArgumentEmailargument_path: str8ArgumentGroupNameargument_path: strBoth extend
BaseEscalationRecipientand are included in theAgentEscalationRecipientdiscriminated union.Note on field naming: the Python field is
argument_path(supports dot-notation for nested fields e.g.user.email). The JSON alias on the wire remainsargumentName— wire format is unchanged.Changed files
src/uipath/agent/models/agent.pyARGUMENT_EMAIL = "ArgumentEmail",ARGUMENT_GROUP_NAME = "ArgumentGroupName"enum values; normalization map entries (int7,8);ArgumentEmailRecipientandArgumentGroupNameRecipientclasses; discriminated union updatedFailure modes & what was tested
What can fail
These model classes have no runtime logic — they are pure data containers. The only failure modes are deserialization:
typenot in the normalization map raises a Pydantic validation error. This is existing behavior, unchanged.argumentNamefield:argument_pathis required with no default — a recipient missing the field raises a Pydantic validation error at parse time, before any tool runs.Both are fail-fast at agent startup, not at task creation time.
What was tested
{ "type": 7, "argumentName": "assigneeEmail" }→ArgumentEmailRecipient(argument_path="assigneeEmail")✓{ "type": 8, "argumentName": "assigneeGroup" }→ArgumentGroupNameRecipient(argument_path="assigneeGroup")✓7/8(normalization map path) ✓"ArgumentEmail"/"ArgumentGroupName"(enum path) ✓ArgumentEmailrecipient created Action Center task with correct assignee ✓Related
Test plan
{ "type": 7, "argumentName": "assigneeEmail" }→ArgumentEmailRecipient(argument_path="assigneeEmail")8→ArgumentGroupNameRecipientTested locally using HackedCoded