Monitor services in parallel
Run independent endpoint checks at the same time, then publish one health result after every check has settled.
This workflow uses a durable five-minute interval. The <parallel> group gives each endpoint its own step and runs all three checks concurrently. A final step reads those durable outputs and produces a compact report.
The workflow
WOML
<woml>
<workflow
id="service-health"
name="Service health"
description="Check public WOML endpoints and summarize their health."
version="1.0.0"
>
<config concurrency="1" timeout="2m" />
<triggers>
<interval id="poll" every="5m" on-missed="skip" />
</triggers>
<steps>
<parallel id="checks" name="Check endpoints" concurrency="3" on-error="wait-all">
<step id="website" name="Check woml.org" retry="3" retry-backoff="exponential">
<script>
const response = await services.http.request({
url: "https://woml.org",
responseType: "text",
timeout: "10s",
acceptedStatus: { minimum: 100, maximum: 599 }
}, { name: "check-woml-website" });
return { name: "website", status: response.status, healthy: response.ok };
</script>
</step>
<step id="repository" name="Check GitHub repository" retry="3" retry-backoff="exponential">
<script>
const response = await services.http.request({
url: "https://github.com/dali-benothmen/woml",
responseType: "text",
timeout: "10s",
acceptedStatus: { minimum: 100, maximum: 599 }
}, { name: "check-woml-repository" });
return { name: "repository", status: response.status, healthy: response.ok };
</script>
</step>
<step id="package" name="Check npm package" retry="3" retry-backoff="exponential">
<script>
const response = await services.http.request({
url: "https://registry.npmjs.org/woml-cli/latest",
timeout: "10s",
acceptedStatus: { minimum: 100, maximum: 599 }
}, { name: "check-woml-package" });
return { name: "package", status: response.status, healthy: response.ok };
</script>
</step>
</parallel>
<step id="report" name="Build health report">
<script>
const checks = [
context.steps.website,
context.steps.repository,
context.steps.package
];
return {
healthy: checks.every((check) => check.healthy),
checkedAt: context.payload.triggeredAt,
checks
};
</script>
</step>
</steps>
</workflow>
</woml>Run it
Save the file as service-health.woml, validate it, and keep it active for scheduled checks.
Terminal
woml check service-health.woml
woml run service-health.womlThe parallel group has no aggregate output of its own. Each child publishes its result under context.steps, and the downstream report step deliberately defines the final shape.