You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return value of the interrupt is the task output. If the task did not produce any output, the return value will be the task status, e.g., `{"status": "completed"}`.
31
+
The return value of the interrupt is the task output — only the data fields written back by the app, not the full task object. If the task did not produce any output, the return value will be the task status, e.g., `{"status": "completed"}`.
32
+
33
+
The human's decision (which Approve/Reject button was clicked, stored in `task.action`) is **not** included in the return value. To branch on the outcome, either add an explicit output field to the app schema (e.g. a boolean `IsApproved` wired to the buttons), or use [`CreateEscalation`](#3-createescalation) instead, which returns the full task object.
32
34
///
33
35
34
36
For a practical implementation of the `CreateTask` model, refer to the [ticket-classification sample](https://github.com/UiPath/uipath-langchain-python/tree/main/samples/ticket-classification). This sample demonstrates how to create an action with dynamic input.
@@ -51,15 +53,65 @@ from uipath.platform.common import WaitTask
The return value of the interrupt is the task output. If the task did not produce any output, the return value will be the task status, e.g., `{"status": "completed"}`.
56
+
Like `CreateTask`, the return value is the task output only. Use [`WaitEscalation`](#4-waitescalation) if you need the full task object back, including the selected action.
57
+
///
58
+
59
+
---
60
+
61
+
### 3. CreateEscalation
62
+
63
+
The `CreateEscalation` model creates an Action Center action the same way `CreateTask` does, but when the agent resumes it receives the **full `Task` object** instead of just `task.data`. Use this when the agent needs to branch on the human's decision (the button the reviewer clicked, stored in `task.action`) rather than only on the data fields written back by the app.
64
+
65
+
Accepts the same attributes as [`CreateTask`](#1-createtask).
66
+
67
+
#### Example:
68
+
69
+
```python
70
+
from uipath.platform.common import CreateEscalation
71
+
72
+
task = interrupt(
73
+
CreateEscalation(
74
+
app_name="ApprovalApp",
75
+
app_folder_path="MyFolderPath",
76
+
title="Approve expense",
77
+
data={"amount": 1200},
78
+
assignee="reviewer@example.com",
79
+
)
80
+
)
81
+
82
+
if task.action =="Approve":
83
+
...
84
+
else:
85
+
...
86
+
```
87
+
/// info
88
+
The return value is the full `Task` object (including `task.action`, `task.data`, `task.status`, etc.). If the task is deleted while the agent is suspended, the task object is still returned rather than raising, so the agent can handle the deletion gracefully.
55
89
///
56
90
57
91
---
58
92
93
+
### 4. WaitEscalation
94
+
95
+
`WaitEscalation` is the escalation counterpart of [`WaitTask`](#2-waittask): wait on an already-created task and receive the full `Task` object on resume.
96
+
97
+
#### Attributes:
98
+
99
+
-**action** (Task): The instance of the task to wait for.
100
+
-**app_folder_path** (Optional[str]): The folder path of the app.
> 💡The UiPath-LangChain SDK also supports **Robot/Agent-in-the-loop** scenarios. In this context, the execution of one agent
60
112
> can be suspended until another robot or agent finishes its execution.
61
113
62
-
### 3. InvokeProcess
114
+
### 5. InvokeProcess
63
115
64
116
The `InvokeProcess` model is utilized to invoke a process within the UiPath cloud platform.
65
117
This process can be of various types, including API workflows, Agents or RPA automation.
@@ -90,7 +142,7 @@ For a practical implementation of the `InvokeProcess` model, refer to the [multi
90
142
91
143
---
92
144
93
-
### 4. WaitJob
145
+
### 6. WaitJob
94
146
95
147
The `WaitJob` model is used to wait for a job completion. Unlike `InvokeProcess`, which automatically creates a job, this model is intended for scenarios where
0 commit comments