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
  • ENV2 (Target reference defined in ShadowTask)
    • Target workstation: /CLOUD
    • Target workflow: /WF1
    • Target task: TASK1 (The actual task to monitor)

Process flow

  1. Submission: Submit the ShadowWF workflow in ENV1.
    • The ShadowTask transitions to the WAIT status.
    • The ShadowWF transitions to the EXEC status.
    • ENV1 sends a binding request to ENV2 using the connection details defined in the referenced Endpoint.
  2. Binding (Success): ENV2 receives the request and performs the validation checks:
    • It searches the model definition and finds the workflow /WF1 and task TASK1.
    • It checks the current plan and finds an existing instance of /WF1 that satisfies the matching criteria.
    • ENV2 sends a success notification back to ENV1.
    • The ShadowTask status in ENV1 changes to BOUND.
  3. Run and completion:
    • When TASK1 in ENV2 starts running, it sends a notification to ENV1. The ShadowTask status updates to reflect the remote status (for example, EXEC).
    • When TASK1 completes successfully, ENV2 sends a final notification. The ShadowTask status in ENV1 changes to SUCC, satisfying the dependency and enabling the rest of ShadowWF to proceed.

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 ShadowTask status 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 ShadowTask fails.
  • Target definition missing: The specific workflow /WF1 or task TASK1 does not exist in the ENV2 database. The ShadowTask fails.