WorkflowJob - executeWorkflowChildJob


WorkflowJob - executeWorkflowChildJob

Description :

This command executes a child job from a parent Workflow Job. The child job is identified by its DBKey.

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.

childJobDbKey

DBKey

A handle to the child job you want to execute.

Example

The following example shows how to execute a Snapshot Job as a child of a Workflow Job.

Script


# Id of Workflow Job Run.

WORKFLOWJOB_RUN_ID="2000000"

# Name of the existing Snapshot Job.

SNAPSHOT_JOB_NAME="snapshotjob1"

# Job group in which the Snapshot Job is stored.

SNAPSHOT_JOB_GROUP="/parent/group1"

# Get the Snapshot Job DBKey using the above information.

SNAPSHOT_JOB_DBKEY=`blcli SnapshotJob getDBKeyByGroupAndName $SNAPSHOT_JOB_GROUP $SNAPSHOT_JOB_NAME`

#Execute the Snapshot job as Child Job of the Workflow

WORKFLOWJOB_RUN_KEY=`blcli WorkflowJob executeWorkflowChildJob $WORKFLOWJOB_RUN_ID $SNAPSHOT_JOB_DBKEY`



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Server Automation Command Line Interface 20.02