Title: [DX] GAP-09: HITL samples only cover simple string-output patterns, missing structured data and resume workflow · Issue #1499 · UiPath/uipath-python · GitHub
Open Graph Title: [DX] GAP-09: HITL samples only cover simple string-output patterns, missing structured data and resume workflow · Issue #1499 · UiPath/uipath-python
X Title: [DX] GAP-09: HITL samples only cover simple string-output patterns, missing structured data and resume workflow · Issue #1499 · UiPath/uipath-python
Description: Summary The existing HITL sample (ticket-classification) shows a minimal pattern (action_data["Answer"]) that doesn't cover the common real-world cases: structured input data to the task form, outcome capture as explicit output fields, t...
Open Graph Description: Summary The existing HITL sample (ticket-classification) shows a minimal pattern (action_data["Answer"]) that doesn't cover the common real-world cases: structured input data to the task form, outc...
X Description: Summary The existing HITL sample (ticket-classification) shows a minimal pattern (action_data["Answer"]) that doesn't cover the common real-world cases: structured input data to the t...
Opengraph URL: https://github.com/UiPath/uipath-python/issues/1499
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[DX] GAP-09: HITL samples only cover simple string-output patterns, missing structured data and resume workflow","articleBody":"## Summary\n\nThe existing HITL sample (`ticket-classification`) shows a minimal pattern (`action_data[\"Answer\"]`) that doesn't cover the common real-world cases: structured input data to the task form, outcome capture as explicit output fields, the `--state-file` requirement for local resume, and sharing inner agent data with HITL nodes.\n\n## What the Current Sample Shows\n\nThe `ticket-classification` sample:\n- Passes a single string output field (`\"Answer\"`)\n- Does not show how to pass structured input data to the form\n- Does not explain that outcomes must be captured as explicit output fields (not from `task.action`)\n- Does not mention `--state-file` requirement for cross-process resume\n\n## What's Missing\n\nA complete HITL sample should show:\n\n### 1. Structured data into CreateTask with correct PascalCase keys\n```python\ntask = uipath.tasks.create(\n title=\"Review Invoice INV-001\",\n app_name=\"InvoiceReviewForm\",\n app_folder_path=\"Shared/Solution Invoice App\",\n data={\n \"InvoiceId\": \"INV-001\", # PascalCase matches app schema\n \"VendorName\": \"Acme Corp\",\n \"TotalAmount\": 15000.00,\n \"VendorRiskLevel\": \"High\",\n }\n)\n```\n\n### 2. Outcome captured as explicit Boolean output field\nSince `task.action` is not returned by `interrupt()` (see related issue #1495), outcomes must be captured as an explicit output field:\n```python\n# In the app: Approve button sets IsApproved=True, Reject button sets IsApproved=False\napproved = action_data.get(\"IsApproved\", False)\n```\n\n### 3. The --state-file workflow for local resume testing\n```bash\n# Run with state file\nuv run uipath run agent.py '{\"invoices\": [...]}' --state-file ./agent-state.db\n# After human completes task\nuv run uipath run agent.py --resume --state-file ./agent-state.db\n```\n\n### 4. The tool_results pattern for sharing inner ReAct agent data with HITL nodes\nWhen a ReAct sub-agent collects data, its messages don't propagate to the outer graph state. The sample should show how to explicitly surface tool results:\n```python\n# In run_agent(): return both decision and tool results\nreturn decision, tool_results_dict\n\n# Store in graph state\nstate[\"tool_results\"] = tool_results\n\n# In human_approval node: read from state[\"tool_results\"], not state[\"messages\"]\n```\n\n## Impact\n\n- Severity: **Medium** (documentation/samples gap)\n- Every developer building a real-world HITL workflow hits these gaps in sequence\n- The missing patterns are non-obvious; each requires significant debugging to discover","author":{"url":"https://github.com/AlexBizon","@type":"Person","name":"AlexBizon"},"datePublished":"2026-03-26T15:22:57Z","url":"https://github.com/UiPath/uipath-python/issues/1499"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c4b5a0f9-1c11-b942-f467-fd6ac5c09ea7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB36:152BAF:1E3A98:28C869:6AFF6283 |
| html-safe-nonce | b170df4b170777a84483d757df808687a87cb84fd8f37a681ca235d56ede26de |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjM2OjE1MkJBRjoxRTNBOTg6MjhDODY5OjZBRkY2MjgzIiwidmlzaXRvcl9pZCI6IjgyMjYwOTcxODk2MTc2MjM2ODMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5a9627e63e7c38779d18e59d826f225381d0bcfafa6eb19909afb4b6d9e25e0b |
| hovercard-subject-tag | issue:4144975066 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/UiPath/uipath-python/1499/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a10de84b62f08bae16abcda0ca88ceadedbc7a18085b31c56989aeb9a9b0a36b/UiPath/uipath-python/issues/1499 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a10de84b62f08bae16abcda0ca88ceadedbc7a18085b31c56989aeb9a9b0a36b/UiPath/uipath-python/issues/1499 |
| og:image:alt | Summary The existing HITL sample (ticket-classification) shows a minimal pattern (action_data["Answer"]) that doesn't cover the common real-world cases: structured input data to the task form, outc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexBizon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b58589a1c4eda1e3c8904144a412b88ca4455f63ca2ad3629f2e9f3c3a1d12 |
| turbo-cache-control | no-preview |
| go-import | github.com/UiPath/uipath-python git https://github.com/UiPath/uipath-python.git |
| octolytics-dimension-user_id | 375663 |
| octolytics-dimension-user_login | UiPath |
| octolytics-dimension-repository_id | 925171912 |
| octolytics-dimension-repository_nwo | UiPath/uipath-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 925171912 |
| octolytics-dimension-repository_network_root_nwo | UiPath/uipath-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8968d6d6acc65d74e4df332d23932dd3fd0502a4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width