WorkflowJob - assignInputParameters


WorkflowJob - assignInputParameters

Description :

This command assigns values to a Workflow Job's input parameters. This command returns a list of the input parameters and their values.

Set nameAndValueParams to a comma separated list of parameters and values, using the format parameter=value. To assign parameters that contain a file or directory path use the syntax shown in the following examples.

Example 1: To represent C:/myfile, use C/myfile

Example 2: To represent C:/mydir/myfile, use C/mydir/myfile

To assign multiple values to a list field parameter, use a semi-colon ";" to separate the values in the list. Example: list_parameter1="value1;value2;value3"

Return type : List

Command Input :

Variable Name

Variable Type

Description

jobKey

DBKey

The DBKey of the Workflow Job.

nameAndValueParams

StringList

List of the Workflow Job parameters and values.

Example

The following example demonstrates how to assign input parameter values to a Workflow Job.

Script

# Name of the existing Workflow Job.

WORKFLOWJOB_NAME="workflowjob1"

# Job group in which the Workflow Job is stored.

WORKFLOWJOB_GROUP="/parent/group1"

# Get the Workflow Job DBKey using the above information.

WORKFLOWJOB_DBKEY=`blcli WorkflowJob getDBKeyByGroupAndName $WORKFLOWJOB_GROUP $WORKFLOWJOB_NAME`

#Assign the Workflow Job parameter values. Note that parameter3 is a multi-value parameter.

PARAMETERS_LIST="parameter1=value1,parameter2=value2,parameter3=value3;value4;value5"

#Assign parameters command

PARAMETERS_LIST=`blcli WorkflowJob assignInputParameters $WORKFLOWJOB_DBKEY $PARAMETERS_LIST`

 

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

TrueSight Server Automation Command Line Interface 21.02