Cross dependencies scenario
A practical example of how a shadow task binds to a remote task across two environments to synchronize workflow runs.
In this scenario, you have two environments: ENV1 (the HCL Universal Orchestrator source environment) and ENV2 (the remote target environment). You want a workflow in ENV1 to wait for the successful completion of a specific task in ENV2 before proceeding.
Definitions
To establish this dependency, define a shadow task in your environment (ENV1) that points to the actual task in the remote environment (ENV2).
- ENV1 (Source)
- Workflow name:
ShadowWF - Task name:
ShadowTask(The shadow task defined here) - Workstation:
CLOUD
- Workflow name:
- ENV2 (Target reference defined in ShadowTask)
- Target workstation:
/CLOUD - Target workflow:
/WF1 - Target task:
TASK1(The actual task to monitor)
- Target workstation:
Process flow
- Submission: Submit the
ShadowWFworkflow in ENV1.- The
ShadowTasktransitions to the WAIT status. - The
ShadowWFtransitions to the EXEC status. - ENV1 sends a binding request to ENV2 using the connection details defined in the referenced Endpoint.
- The
- Binding (Success): ENV2 receives the request and performs the validation checks:
- It searches the model definition and finds the workflow
/WF1and taskTASK1. - It checks the current plan and finds an existing instance of
/WF1that satisfies the matching criteria. - ENV2 sends a success notification back to ENV1.
- The
ShadowTaskstatus in ENV1 changes to BOUND.
- It searches the model definition and finds the workflow
- Run and completion:
- When
TASK1in ENV2 starts running, it sends a notification to ENV1. TheShadowTaskstatus updates to reflect the remote status (for example, EXEC). - When
TASK1completes successfully, ENV2 sends a final notification. TheShadowTaskstatus in ENV1 changes to SUCC, satisfying the dependency and enabling the rest ofShadowWFto proceed.
- When
Potential error outcomes
During the binding phase in ENV2, the following error scenarios can occur if the targets are not aligned:
- Criteria mismatch: The target definition is found, but the specific
instance in the plan does not satisfy the matching criteria. ENV2 sends a
failure notification, and the
ShadowTaskstatus fails. - Instance not found: The target definition is found, but no instance
exists in the plan.
- If the dependency is set to Mandatory, the bind request waits for the instance to appear in the plan.
- If the dependency is optional, or if the instance is not found within
the timeout period, the
ShadowTaskfails.
- Target definition missing: The specific workflow
/WF1or taskTASK1does not exist in the ENV2 database. TheShadowTaskfails.