镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[DX] GAP-02: data field names in CreateTask not validated against app schema (case mismatch creates blank task) #1495

Open

Description

@AlexBizon

Summary

When calling sdk.tasks.create() with a data dict, field names are not validated against the Action Center app schema. A case mismatch (snake_case vs PascalCase) silently creates a task with all fields blank — no warning, no error.

Root Cause

The SDK already fetches the app schema when app_name is provided (to create the task correctly). At that point it has enough information to validate data keys against the schema's input field names. However, no such validation is performed.

The Action Center app schema uses PascalCase field names (e.g. InvoiceId, VendorRiskLevel, TotalAmount). Agent code naturally uses snake_case (e.g. invoice_id, vendor_risk_level, total_amount). The task is created successfully — HTTP 201 — but all fields appear blank when the reviewer opens the task form.

Observed Behaviour

task = uipath.tasks.create(
    title="Review Invoice",
    app_name="InvoiceReviewForm",
    data={
        "invoice_id": "INV-001",        # should be "InvoiceId"
        "vendor_risk_level": "High",    # should be "VendorRiskLevel"
    }
)

The task is created. The reviewer sees a blank form. No error is raised or logged.

Workaround

Manually align data keys to the schema by reading the deployed app's schema JSON from the Orchestrator UI or API. Use PascalCase keys that exactly match the app's field names.

Suggested Fix

When app_name is provided and the schema is fetched, validate data keys against the schema's input field names and emit a warning (or raise ValueError) on mismatch:

Warning: CreateTask data key 'invoice_id' not found in app schema. Did you mean 'InvoiceId'?

A fuzzy match (case-insensitive comparison) would catch the most common failure mode.

Impact

  • Severity: High
  • Silent data loss — reviewers see blank forms with no indication of what went wrong
  • Very easy to hit since Python conventions (snake_case) conflict with app schema conventions (PascalCase)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions