Skip to content

Conversation

@dianagrecu-uipath
Copy link
Contributor

@dianagrecu-uipath dianagrecu-uipath commented Jan 27, 2026

Resolve task_title for action center task

Comment on lines 114 to 117
else:
raise NotImplementedError(
f"TaskTitle type '{type(channel.task_title).__name__}' not implemented"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this throw when neither str nor tokens task_title is present? The previous code falls back to "Escalation Task" when task_title is none

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the before validator for task title in uipath-python, if "taskTitleV2" or "taskTitle" fields are missing, then I am defaulting to "Escaltion task" -> so task_title should always be either of type textbuilder or string.

)
tool.metadata["taskTitle"] = build_string_from_tokens(
channel.task_title.tokens, sanitize_dict_for_serialization(dict(state))
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we should set the taskTitle metadata (str) in both cases (textBuilder and str). That way in extract_task_title we can just read the taskTitle string from the metadata, without instance checking.

Could also be a function if too large:

Suggested change
)
if tool.metadata is None:
raise ...
tool.metadata["taskTitle"] = build_task_title(channel.task_title)


# Recipient requires runtime resolution, store in metadata after resolving
if tool.metadata is not None:
tool.metadata["recipient"] = recipient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do task_title = tool.metadata["task_title"] in this if.


result = interrupt(
CreateEscalation(
title=task_title,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and title=task_title or "Escalation Task" here

raise RuntimeError(
"Tool metadata is required for TEXT_BUILDER task titles"
)
tool.metadata["taskTitle"] = build_string_from_tokens(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other metadata keys are snake_case, let's use task_title for consistency

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.

2 participants