WorkflowJob - executeWorkflowChildJobId
WorkflowJob - executeWorkflowChildJobId
Description :
This command executes a child job from a parent Workflow Job. The child job is identified by its job ID.
To get the workflowJobRunId, first get the run key of the Workflow Job. The JobRun : findAllRunKeysByJobKey command has an example of how to do this. Once you have the run key, you can use the Job Run : jobRunKeyToJobRunId command to get the workflowJobRunId. The command returns the Job Run Key of the executed child job
Return type : com.bladelogic.om.infra.app.service.job.JobRunKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
workflowJobRunId | String | The Workflow Job run ID. |
childJobId | String | Job ID of the child job you want to execute. |
Example
The following example shows how to execute a Snapshot Job as a child of Workflow Job.
Script
# Id of Workflow Job Run.
WORKFLOWJOB_RUN_ID="2000000"
# The ID of the existing Snapshot Job.
SNAPSHOT_JOB_ID="2000001"
#Execute the Snapshot job as Child Job of the Workflow
WORKFLOWJOB_RUN_KEY=`blcli WorkflowJob executeWorkflowChildJobId $WORKFLOWJOB_RUN_ID $SNAPSHOT_JOB_ID`
WORKFLOWJOB_RUN_ID="2000000"
# The ID of the existing Snapshot Job.
SNAPSHOT_JOB_ID="2000001"
#Execute the Snapshot job as Child Job of the Workflow
WORKFLOWJOB_RUN_KEY=`blcli WorkflowJob executeWorkflowChildJobId $WORKFLOWJOB_RUN_ID $SNAPSHOT_JOB_ID`
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*