Summary
Creates a new actual parameter for a step that calls a nested procedure. The parameter is passed to the nested procedure when the step runs. At runtime, the actual parameter name must match the name of a formal parameter in the nested procedure.You can use actual parameters in three types of API calls:
-
Calling
runProcedure
to start a new job. -
Setting up a schedule.
-
Creating or modifying a subprocedure step.
For example, when you call runProcedure
using ectool, set the actual parameters to the procedure on the command line using the optional argument --actualParameter
, followed by a list of name/value pairs. The following is an example of calling a procedure named MainBuild
:
`ectool runProcedure "project A" --procedureName "MainBuild" --actualParameter Branch=main Type=Debug`
To make this call using the Perl API, define a list. Each element of the list is an anonymous hash reference that specifies one of the actual parameters. Now you can pass a reference to the list as the value of the actualParameter
argument.
Here is the same example called via the Perl API:
# Run the procedure $xPath = $cmdr->runProcedure("project A", {procedureName => "MainBuild", actualParameter => [ {actualParameterName => 'Branch', value => 'main'}, actualParameterName => 'Type', value => 'Debug'}, ]});
Specifying most arguments to the createStep
API in Perl is fairly intuitive; like any other API, you specify key-value pairs in a hash argument for all optional parameters. However, specifying actual parameters is more involved because actual parameters are not arbitrary key-values characterizing the step. Instead, they are key-values characterizing actual parameters to the step. Refer to the following createStep
request in XML:
<createStep> <projectName>MyProject</projectName> <procedureName>MyProcedure</procedureName> <stepName>Step1</stepName> <actualParameter> <actualParameterName>parm1</actualParameterName> <value>myval</value> </actualParameter> <actualParameter> <actualParameterName>parm2</actualParameterName> <value>val2</value> </actualParameter> </createStep>
Each actual parameter key-value is under an <actualParameter>
element. Code this in the optional arguments hash in the Perl API like this:
{ ..., => ..., actualParameter => [{actualParameterName => 'parm1', value => 'myval'}, {actualParameterName => 'parm2', value => 'val2'}], ... => ...}
The value of the actualParameter
key in the optional arguments hash is a list of hashes, each representing one actual parameter. If the sub-procedure call takes only one actual parameter, the value of the actualParameter
key can be specified as just the hash representing the one parameter:
actualParameter => {actualParameterName => 'parm1', value => 'myval'}
projectNameStringrequiredThe name for the project that must be unique among all projects. procedureNameStringrequiredThe name of the procedure. stepNameStringrequiredThe name of the step. actualParameterNameStringrequiredThe name of the parameter to create/modify/delete. applicationNameStringoptionalThe name of the application, if the actual parameter is on an application process step. archiveConnectorNameStringoptionalThe name of the archive connector. catalogItemNameStringoptionalThe name of the catalog item. catalogItemRunIdStringoptionalThe ID of the catalog item run, if the actual parameter is on a catalog item run. catalogNameStringoptionalThe name of the catalog. componentNameStringoptionalThe name of the component, if the actual parameter is on a component process step. dashboardNameStringoptionalThe name of the dashboard. flowNameStringoptionalThe name of the flow to which the flow state belongs to. flowStateNameStringoptionalThe name of the flow state, if the formal parameter is on a flow state. pipelineNameStringoptionalThe name of the pipeline. processNameStringoptionalThe name of the process, if the actual parameter is on a process step. processStepNameStringoptionalThe name of the process step, if the actual parameter is on a process step. releaseNameStringoptionalThe name of the release, if the actual parameter is on a release. scheduleNameStringoptionalThe name of the schedule. stateDefinitionNameStringoptionalThe name of the state definition. tierMapNameStringoptionalThe name of the tier map. transitionDefinitionNameStringoptionalThe name of the state definition. triggerNameStringoptionalThe name of the trigger. valueStringoptionalThe value of the actual parameter, if creating or modifying. widgetNameStringoptionalThe name of the widget. workflowDefinitionNameStringoptionalThe name of the workflow definition. |
Usage
Perl
$cmdr->createActualParameter( "test-projectName", # projectName "test-procedureName", # procedureName "test-stepName", # stepName "test-actualParameterName" # actualParameterName # optionals );
ectool
ectool createActualParameter \ "test-projectName" `# projectName` \ "test-procedureName" `# procedureName` \ "test-stepName" `# stepName` \ "test-actualParameterName" `# actualParameterName` \ # optionals