-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add wait_for_triggers option to poll instead of suspend #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cristipufu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. Please explain what you re trying to achieve
|
If you want polling, just wrap the runtime with a Debug Runtime instantiated with a polling interval gt 0 |
6bdc01f to
70476f8
Compare
What I am trying to achieve here is experiment the option of running the |
70476f8 to
dcc49ef
Compare
Add a new execution option `wait_for_triggers` that allows the runtime to poll triggers until completion instead of suspending and returning. This keeps the process running and automatically resumes execution when triggers complete. Key behavior: When wait_for_triggers=True, triggers are created (to start the work like invoking processes, creating tasks) but NOT persisted to storage. The runtime polls inline and resumes without involving the persistence layer. Changes: - Add `wait_for_triggers` and `trigger_poll_interval` options to UiPathExecuteOptions - Create shared TriggerPoller utility for reusable polling logic - Update UiPathResumableRuntime to loop and poll when wait_for_triggers=True - Add skip_storage parameter to _handle_suspension() to avoid persistence - Refactor UiPathDebugRuntime to use the shared TriggerPoller Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
dcc49ef to
b25b6f3
Compare
…rchestrator
Add CLI flags to enable polling mode for triggers instead of suspending:
- `--wait-for-triggers`: Poll triggers until completion instead of suspending
- `--trigger-poll-interval`: Configurable poll interval (default: 5.0s)
This enables running agents locally with tool calls (InvokeProcess, CreateTask, etc.)
without requiring serverless/orchestrator infrastructure.
Usage:
uipath run my_agent.main '{"query": "hello"}' --wait-for-triggers
uipath run my_agent.main '{"query": "hello"}' --wait-for-triggers --trigger-poll-interval 10.0
Depends on: UiPath/uipath-runtime-python#74
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The whole point of triggers is persistance. If you don't persist the triggers, you don't need suspend/resume semantics. Just poll for results in the tool itself |
Summary
wait_for_triggersandtrigger_poll_intervaloptions toUiPathExecuteOptionswait_for_triggers=True, the runtime polls triggers until completion instead of suspendingTriggerPollerutility for reusable polling logicUiPathDebugRuntimeto use the sharedTriggerPollerUsage
Test plan
🤖 Generated with Claude Code
Development Package