-
Notifications
You must be signed in to change notification settings - Fork 31
feat(escalation): two-phase escalation with inline task creation #528
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
ba6872f to
483b432
Compare
| ) | ||
| async def escalate(): | ||
| client = UiPath() | ||
| task = await client.tasks.create_async( |
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.
Langgraph re-executes the interrupted node on resumption (please make sure the task isn't created twice)
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.
good point! I've added @task decorator to make sure task isn't created twice. Verified using logs in hacked-coded process in OR.
valentinabojan
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.
We need to make sure the task is not created again when the node is re-executed after resume.
21800ea to
693eb98
Compare
Create task via client.tasks.create_async before calling interrupt(WaitEscalation), replacing the previous single-phase CreateEscalation approach. Also returns task_url in the escalation result. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents duplicate task creation on graph resume by caching the create_async result in the checkpointer via LangGraph's @task decorator. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
693eb98 to
9325f6d
Compare
***Accidentally Closed the PR opened by @saksharthakkar during a wrong rebase. Opened a new PR with the same changes ***
client.tasks.create_async, theninterrupt(WaitEscalation)(replaces single-phaseCreateEscalation)task_urlin escalation result alongside existingtask_idandassigned_toUiPathclient andtasks.create_asynccallTest plan
TestEscalationToolCreatesTaskBeforeInterrupttests verify two-phase flowScreen.Recording.2026-02-05.at.9.11.01.PM.mov