ablative docs
↑↓ move↵ openesc close
Stack Notebook ablative.com.au

Workflow packages

Understand workflow.toml, archive contents, content-hash versions and immutable module names.

Open .md

Gleam descriptor

[[workflow]]
entry_module = "hello_gleam"
entry_function = "run"
timeout_seconds = 3600
input_schema = "schemas/input.json"
output_schema = "schemas/output.json"
activities = []
output = "hello_gleam.aion"
package.include_source
Optional, default true. Include the root project's first-party Gleam source. It does not change the compiled code hash.
workflow.entry_module
Required safe module name; also the workflow type. Unique within the descriptor.
workflow.entry_function
Required exported entry function. State run explicitly; it is a convention, not a default.
workflow.timeout_seconds
Optional positive whole seconds. Omit to declare no workflow deadline.
workflow.input_schema
Required project-relative JSON Schema file.
workflow.output_schema
Required project-relative JSON Schema file.
workflow.activities
Required list of nonempty unique activity type names. Use an explicit empty list for no activities.
workflow.output
Optional project-relative archive path. Default entry_module.aion. Output paths must not collide.
workflow.additional_workflows
Optional same-archive entries. Each requires workflow_type, entry_module, entry_function, positive timeout_seconds, input_schema and output_schema. Optional internal defaults false. Authored additional entries require a timeout; generated AWL sidecars can declare none.

Descriptor paths stay inside the project root. An explicit command-line output override belongs to the caller and can point elsewhere. Unknown descriptor keys are refused.

Archive contents

Packaging discovers the root project’s production dependency closure in the compiled Erlang tree. Development-only packages are excluded. The archive carries the manifest, compiled modules and contract schemas.

First-party source is included by default. The descriptor can disable source inclusion. AWL archives include their source and imported schemas as source record, allowing documentation to be rendered without the original checkout.

Version identity

The package content hash identifies the compiled module bytes in stable order. Source inclusion and a changed manifest do not by themselves change that code hash. Do not treat the hash as a signature over every archive byte.

The server names an immutable module using its logical name and content hash. Each entry module and hash identifies one workflow version. Different workflows built from the same module set can share a hash and still have distinct entry names.

Routing and old runs

New starts use the routed version. Existing runs keep their pinned package. Persisted archives and route records let a server restore the relevant versions after restart.

Read deployment operations before routing back or unloading a version.