<module>
<module> binds a static local source file to a name that the current WOML document can use.
Why use it
Use it when logic or durable workflow behavior should be reused without hiding dependencies or installing runtime packages.
Common use cases
- Call named exports from a local
.jsor.tsfile. - Invoke a reusable WOML step as a custom tag.
- Use an imported custom notification provider inside
<notify>.
Syntax
WOML
<imports>
<module name="pricing" from="./modules/pricing.ts" />
<module name="calculate-tax" from="./calculate-tax.woml" />
</imports>Rules and behavior
nameis required and becomes the service alias or reusable custom tag.fromis a required static relative path to.js,.ts, or reusable.womlsource.- JavaScript and TypeScript modules use named ESM exports. Default exports, CommonJS, dynamic imports, and npm imports are unsupported.