Skip to content

Composing Jobs

Jobs can call reusable endpoint jobs and wait for endpoint sets as part of their normal task tree. Use this model for ordered maintenance stages, controlled rollout batches, Hyper-V host-and-guest updates, and workflows that combine infrastructure coordination with endpoint work.

Choose the parent and child jobs

The child is an endpoint job containing the reusable endpoint workflow, such as a standard Windows update, Linux update, or application maintenance sequence.

The parent can be:

  • an endpoint job when the workflow begins from one endpoint, such as a Hyper-V host
  • an infrastructure job when the workflow coordinates groups or expression-selected endpoints without having a current endpoint

An infrastructure job that contains only coordination tasks can run without reserving a Runner. A Runner is required when the same job also reaches a Runner-backed task.

Run endpoint job

Add Run endpoint job and select the endpoint job to call. One child job run is created for the complete resolved endpoint set. The parent task remains active until the child run reaches a terminal result.

Choose a target source:

  • Current endpoint targets the endpoint running the parent task. This option is available in endpoint jobs.
  • Endpoint groups combines one or more groups and removes duplicate endpoints.
  • Expression resolves an endpoint UUID, endpoint object, or an array containing either form.

Membership is captured when the task starts. Later group changes do not change that running child job.

Configure:

  • Child concurrency to limit active child targets from 1 to 100, or leave it empty to use the child job's setting
  • If no endpoints match to fail the task or succeed without creating a child run
  • the normal task error behavior to stop the parent, continue while retaining failure, or continue with a warning

The user who started the parent must be allowed to run the selected child job and its capabilities against every resolved endpoint.

Wait for endpoint set state

Add Wait for endpoint set state when a later task must wait until every selected endpoint reaches the selected relay-connected or relay-disconnected state. It supports the same target sources and empty-set behavior as Run endpoint job.

The wait uses a fixed membership snapshot. Endpoints added to a selected group after the task starts are not added to the active wait. Endpoints removed from a group remain part of that wait.

The wait finishes when every endpoint in the snapshot reaches the selected relay state, or fails when its task timeout expires.

Child job variables

A child job resolves its own persistent variables from the selected endpoints and its job-level overrides. Composition tasks do not map values from the parent, and prompt-enabled fields are not interactive in a composed launch. A variable with no persistent value resolves to null, which the child job can handle in its task conditions.

Hyper-V host and guest maintenance

Each guest endpoint must have a current hardware inventory containing a valid SMBIOS/DMI system UUID before it can be identified. Run Collect hardware inventory on each guest endpoint at least once. Hardware inventory and Hyper-V inventory can be collected in either order, but both must be available before using guest identification in a composition task.

On a Hyper-V host endpoint, this expression contains all uniquely identified guest endpoint IDs from the latest inventory:

text
{{ endpoint.hyperv_guest_endpoint_ids }}

A host-first maintenance job can use this sequence:

  1. run the host update tasks on the current endpoint
  2. collect current Hyper-V VM inventory
  3. optionally wait for the identified guests to be connected
  4. run the reusable guest update job against {{ endpoint.hyperv_guest_endpoint_ids }}

Ambiguous and unidentified VMs are excluded from the expression. Review the host's VMs tab when an expected guest is missing.

Group rollout example

An infrastructure coordination job can express three rollout rings directly:

  1. Run endpoint job against the first-ring endpoint groups with concurrency 1
  2. Wait for endpoint set state when the second ring must be connected before work starts
  3. Run endpoint job against the second-ring groups with the desired concurrency
  4. Run endpoint job against the remaining groups

Each stage can reference a different child job, so online and offline Windows update workflows or Linux maintenance workflows can share one ordered parent.

Run history and cancellation

The parent step links to the exact child run it created. The child run links back to its parent, and both remain visible in job-run reporting.

Aborting a parent run requests cancellation of an active child run. If a service restart interrupts cancellation or reconciliation, Ordyn resumes from the stored parent-child relationship.

Job definitions cannot reference themselves directly or indirectly. Nested job calls are limited to eight levels.