feat: forward the configured entry point from a process tool [PC-4935] - #1042
feat: forward the configured entry point from a process tool [PC-4935]#1042UiPathPetruPopa wants to merge 4 commits into
Conversation
Reads entry_point_path off the tool's stored properties and passes it to invoke_async, so a process tool runs the entry point the user selected rather than whichever one the release happens to default to. Also surfaced in tool metadata, following the shape #1038 established for folder_key. The read is a getattr rather than plain attribute access, because the attribute is genuinely optional at runtime. BaseResourceProperties sets extra="allow", so against a uipath release predating the declared field the value exists only when the stored JSON carried it, and plain access raises AttributeError for every tool that has no selection -- which today is all of them. Dependency floors deliberately NOT raised in this commit. uipath 2.14.6 and uipath-platform 0.2.20 carry the parameter but are not on PyPI yet, so raising the floors now makes the project unresolvable. They must be raised before this merges: without the raise, an older uipath absorbs entry_point_path into invoke_async's **kwargs and drops it before the payload, so the selection is silently ignored and the job still reports success. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI runs mypy as part of lint; I had only run ruff locally. tool.metadata is typed dict[str, Any] | None, so indexing it needs the same `is not None` assertion every other metadata test in this file already makes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment-only. Keeps why getattr is used rather than attribute access; drops the restatement of what None means, which the surrounding code already shows. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| # getattr, not attribute access: BaseResourceProperties sets extra="allow", so against a uipath | ||
| # release predating the declared field the value is present only if the stored JSON carried it. | ||
| entry_point_path = getattr(resource.properties, "entry_point_path", None) |
There was a problem hiding this comment.
issue: You don't need conditional access here, just bump uipath-python once it's merged and access the field normally. It is already typed as Optional.
There was a problem hiding this comment.
Agreed, but it has to wait: this repo is on uipath 2.14.1, which has no entry_point_path on the process properties, so dropping the getattr raises AttributeError today. Will bump the floor and access it normally once #1866 (uipath-python) is merged and published — leaving this open until then.
There was a problem hiding this comment.
🟡 Changes recommended
The code depends on SDK support for entry_point_path, but the dependency floors are not raised in this PR, so merging as-is risks the configured entry point being silently ignored on older supported versions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the process tool factory to propagate a user-selected process entry point into the UiPath StartJobs call and exposes that value in tool metadata, so process tools run the configured entry point rather than the release default.
Changes:
- Read
entry_point_pathfrom stored tool properties (viagetattr) and forward it intoclient.processes.invoke_async(...). - Add
entry_point_pathto toolmetadatafor observability/telemetry. - Extend and update process/flow/function tool tests to assert the new kwarg is forwarded (including
Nonedefaults) and metadata includes the configured entry point.
File summaries
| File | Description |
|---|---|
| src/uipath_langchain/agent/tools/process_tool.py | Forwards entry_point_path to invoke_async and includes it in tool metadata. |
| tests/agent/tools/test_process_tool.py | Adds/updates assertions to cover entry_point_path forwarding and metadata exposure. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| attachments=attachments, | ||
| parent_span_id=parent_span_id, | ||
| parent_operation_id=parent_operation_id, | ||
| run_as_me=True if run_as_me else None, | ||
| entry_point_path=entry_point_path, |
There was a problem hiding this comment.
Correct, and it is the same blocker as the thread above: the floors cannot be raised to a version that does not exist yet. #1866 in uipath-python adds the field; once it merges and publishes, the floors go up in the same change that drops the defensive getattr. Leaving this open until then.
# Conflicts: # src/uipath_langchain/agent/tools/process_tool.py
|



What changed?
Reads
entry_point_pathoff the tool's stored properties and passes it toinvoke_async, so a process tool runs the entry point the user selected rather than whichever one the release happens to default to. Also surfaced in tool metadata, following the shape#1038established forfolder_key.Nothing sets the property yet — the picker that does is gated behind its own flag in the Agents repo and lands last.
Why the read is a
getattrThe attribute is genuinely optional at runtime.
BaseResourcePropertiessetsextra="allow", so against auipathrelease predating the declared field the value exists only when the stored JSON carried it — and plain attribute access raisesAttributeErrorfor every tool with no selection, which today is all of them.Noneis also the meaningful value: it is how Orchestrator is told to use the release's configured entry point.The dependency floors are deliberately NOT raised in this PR.
uipath 2.14.6anduipath-platform 0.2.20carry the new parameter but are not on PyPI yet (UiPath/uipath-python#1866), so raising the floors now makes the project unresolvable — I tried, anduvrefuses.They must be raised before this merges. Without the raise, an older
uipathabsorbsentry_point_pathintoinvoke_async's**kwargsand drops it before the payload is built — so the selection is silently ignored and the job still reports success. That is the exact silent-success failure this whole change exists to eliminate.Required edit once #1866 publishes:
…plus
uv lockto match.How has this been tested?
tests/agent/tools/test_process_tool.pypass. Two added: the stored path reachesinvoke_async, and it appears in tool metadata.entry_point_path=forward fails four tests, including the three pre-existing exact-args assertions. The forwarding is guarded, not merely executed.entry_point_path=None— direct evidence the default path is unchanged for process, flow and function tools alike.ruff checkandruff format --checkclean.Are there any breaking changes?
Order
Last of the three runtime PRs.
uipath+uipath-platform(#1866) publish → floors raised here → this merges → only then is the picker UI safe to ship, since that is what makes the field user-reachable.🤖 Generated with Claude Code