feat: add asset recipient support for escalations#387
Merged
cotovanu-cristian merged 5 commits intomainfrom Jan 6, 2026
Merged
feat: add asset recipient support for escalations#387cotovanu-cristian merged 5 commits intomainfrom
cotovanu-cristian merged 5 commits intomainfrom
Conversation
Comment on lines
+36
to
+45
| if ( | ||
| recipient.type == AgentEscalationRecipientType.ASSET_USER_EMAIL | ||
| or recipient.type == AgentEscalationRecipientType.ASSET_GROUP_NAME | ||
| ): | ||
| return resolve_asset(recipient.asset_name, recipient.folder_path) | ||
|
|
||
| if hasattr(recipient, "value"): | ||
| return recipient.value | ||
|
|
||
| return None |
Collaborator
There was a problem hiding this comment.
let's use type narrowing here as AgentEscalationRecipient is a discriminated union and can be used specifically for such scenarios.
Suggested change
| if ( | |
| recipient.type == AgentEscalationRecipientType.ASSET_USER_EMAIL | |
| or recipient.type == AgentEscalationRecipientType.ASSET_GROUP_NAME | |
| ): | |
| return resolve_asset(recipient.asset_name, recipient.folder_path) | |
| if hasattr(recipient, "value"): | |
| return recipient.value | |
| return None | |
| if isinstance(recipient, AssetRecipient): | |
| return resolve_asset(recipient.asset_name, recipient.folder_path) | |
| if isinstance(recipient, StandardRecipient): | |
| return recipient.value | |
| return None |
f504536 to
30441b7
Compare
cotovanu-cristian
approved these changes
Jan 5, 2026
| """Retrieve asset value.""" | ||
| try: | ||
| client = UiPath() | ||
| result = client.assets.retrieve(name=asset_name, folder_path=folder_path) |
Collaborator
There was a problem hiding this comment.
I see the assets client also has an retrieve_async which we should use: https://github.com/UiPath/uipath-python/blob/main/src/uipath/platform/orchestrator/_assets_service.py#L84
cotovanu-cristian
approved these changes
Jan 5, 2026
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.
Description
Add support for Asset Recipient in Escalations
Testing
Locally and added unit tests