Start a workflow from a form
x-lt-widget: invokex-lt-invokeinputSchemax-lt-bindGET /api/workflows/invocableA control on a work form starts another workflow with values mapped from the record, under the same per-caller list and input gate.
The situation
A packer working an order needs to reprint its label. The reprint is its own workflow with its own form. The packer should start it from the order’s screen with the order already filled in, and only if they are allowed to run it.
The recipe
"reprint_label": { "type": "string", "readOnly": true, "x-lt-widget": "invoke", "x-lt-invoke": { "workflow": "reprintLabel", "data": { "order": { "id": "{{metadata.orderId}}" }, "copies": 1 }, "metadata": { "escalationId": "{{escalation.id}}" }, "modal": true }, "title": "Reprint label", "x-lt-section": "Tools", "x-lt-showIf": "metadata.orderId"}modal: true opens the workflow’s own invoke form (its inputSchema) in a dialog, prefilled by inverting each field’s x-lt-bind. Without it, the control posts data at once, optionally behind a confirm prompt. Tokens keep their types: a number stays a number, and a missing value omits the key so the workflow’s defaults apply. The run’s outcome arrives on the control over the same live events the Invoke Tool page follows.
The guarantee
The control renders only for workflows the signed-in user may invoke, read from the same per-caller list as the Invoke Tool page, and the server runs the same predicate on the post. The payload meets the workflow’s input_schema gate, with the canonical 422 listing each violation. The field is display-only: it is dropped from the resolver payload and never belongs in required. See Forms.
Related patterns
Forms and configuration
The form is data
A role's form is a versioned JSON Schema; each row pins the edition it renders, so editing the form never breaks work in flight.
Forms and configuration
Versioned lookups
Option lists live once in the knowledge store as immutable editions; rows carry a three-field ref and forms read the edition through it.
Forms and configuration
Conditional fields
A field appears only when a condition holds, live as the person types, and a hidden required field is skipped by validation on both sides.
