<imports>

<imports> is the optional container for local modules used by a workflow or reusable definition.

Why use it

Use it to declare dependencies at the document boundary. Static imports let WOML validate and package the complete module graph into the immutable definition used for recovery.

Common use cases

  • Expose a local JavaScript or TypeScript module under services.
  • Import a reusable WOML step.
  • Import a reusable notification provider.

Syntax

WOML
<woml>
  <imports>
    <module name="pricing" from="./modules/pricing.ts" />
  </imports>
  <workflow id="calculate-order">...</workflow>
</woml>

Rules and behavior

  • It is valid directly under <woml>.
  • It contains <module> entries.
  • It appears before the workflow or reusable definition.