Run automation
Runs another automation with these inputs and waits for what it returns.
@lainstack/automation/run · Flow
How to use it
Section titled “How to use it”Use this block to call another automation of the same workspace and wait for its typed result. Only an automation whose published version starts with the called trigger (@lainstack/automation/called-trigger) can be called. The two contract snapshots (inputSchemaSnapshot, outputSchemaSnapshot) must match the input and output schemas on that trigger. Copy them from the called automation. Never invent them. A block added from the “Automations” group of the block library is filled in for you.
- The block leaves on
completedorfailed. Wirefailed. Oncompleted,resultis typed by the called automation’s returns. Onfailed, readerror.code:callee_contract_changed,call_depth_exceeded,call_limit_exceeded,call_file_unreadable,return_unresolved,callee_failed,callee_cancelled,timeout,not_foundortest_run_requires_sample. - Each call runs the live published version of the called automation. If its contract changed in a breaking way, the call fails with
callee_contract_changeduntil the snapshots are updated. - Calls are limited: at most 3 levels deep, no automation may call one already in the call chain, and one run may make at most 100 calls.
- The called run has its own history. It may wait for approvals, so the caller can wait a long time.
timeoutMsis empty by default (no limit). - Cancelling the calling run cancels the called run.
- Files: up to 32 attachments go in. Returned files arrive as
attachments, copied into this run. - A test run does not start the called automation. Pin a sample on this block instead (guide
testing), or the block fails withtest_run_requires_sample.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Called automation inputs (required) | inputSchemaSnapshot |
Value | |
| Called automation returns (required) | outputSchemaSnapshot |
Value | |
| Inputs (required) | inputs |
Record | The values passed to the called automation. |
| Attachments | attachments |
Value | Files passed to the called automation. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| Returned files | attachments |
Value |
| Called run ID | run.id |
Text |
| Error code | error.code |
Text |
| Error message | error.message |
Text |
| Exit | Port | Notes |
|---|---|---|
| Completed | completed |
|
| Failed | failed |
Failure exit. |