createJobStep

On this page
Back to index

Summary

Create a job step in an existing job.
actionLabelText
Stringoptional
The JSON derived action label text.
actualParameters
Array<ActualParameter>optional
Actual parameters passed to an invoked subprocedure.
alwaysRun
Booleanoptional
True means this step will run even if preceding steps fail in a way that aborts the job.
assignees
Array<Unknown>optional
A list of assignees who receive the notification.
broadcast
Booleanoptional
True means replicate this step to execute (in parallel) on each of the specified resources (that is, for a pool, run the step on each of the resources in the pool).
command
Stringoptional
Script to execute the functions of this step; passed to the step's shell for execution.
comment
Stringoptional
Script to execute the functions of this step; passed to the step's shell for execution.
condition
Stringoptional
A fixed text or text embedding property references that is evaluated into a logical TRUE or FALSE. An empty string, a 0 or false is interpreted as FALSE. Any other result string is interpreted as TRUE.
credentialName
Stringoptional
The name of the credential to be used for impersonation.
credentials
Array<Credential>optional
The list of runtime credentials attached to the job step.
emailConfigName
Stringoptional
The name of email configuration.
errorHandling
Stringoptional
Specifies error handling for this step.
Possible values: "continueOnError", "retryOnError", "stopOnError"
exclusive
Booleanoptional
True means the resource acquired for this step will be retained for the exclusive use of this job. This means 2 things: first, no other job will be able to use that resource, regardless of its step limit, until this job completes; second, future steps for this job will use the resource in preference to other resources, if this resource meets the needs of the steps and its step limit is not exceeded.
exclusiveMode
Stringoptional
Determines the mode to use when the step acquires a resource. If set to none, then the default behavior for the step applies. If set to job, then the resource will be retained for the exclusive use of this job. If set to step, then the resource will be retained for the exclusive use of this step and procedure it may call. If set to call, then the resource will be retained for the exclusive use of all steps within the current procedure call.
Possible values: "none", "job", "step", "call"
external
Booleanoptional
True if the step is externally managed (no state machine).
instruction
Stringoptional
Instruction associated with the manual step.
jobStepId
Stringoptional
The primary key of the job step.
jobStepName
Stringoptional
The name for the new step. If omitted, a default name will be generated.
logFileName
Stringoptional
Name of the log file for a step; specified relative to the root directory in the job's workspace.
notificationEnabled
Booleanoptional
True means this email notification is enabled, false otherwise.
notificationTemplate
Stringoptional
Email notification template for manual step.
parallel
Booleanoptional
True means this step and all adjacent steps with the flag set will run in parallel.
parentPath
Stringoptional
Path to the parent job step. If a parent step is not specified, the current job step is used.
postProcessor
Stringoptional
This command runs in parallel with the main command for the step; it analyzes the log for the step and collects diagnostic information.
precondition
Stringoptional
A fixed text or text embedding property references that is evaluated into a logical TRUE or FALSE. An empty string, a 0 or false is interpreted as FALSE. Any other result string is interpreted as TRUE.
procedureName
Stringoptional
The name of the procedure that should own the job step. If not specified, myStep.procedure is used.
projectName
Stringoptional
The name of the project for procedureName.
releaseExclusive
Booleanoptional
True means the resource acquired for this step will be no longer be retained for the exclusive use of this job when this step completes.
releaseMode
Stringoptional
Determines the mode to use when the step releases its resource. If set to none, the default behavior applies. If set to release, then the resource will be available for use by any job. If set to releaseToJob, then the resource will be available for use by any step in this job.
Possible values: "none", "release", "releaseToJob"
resourceName
Stringoptional
Name for the resource; must be unique among all resources.
shell
Stringoptional
Name of the shell program that will execute the command and postprocessor for the step.
status
Stringoptional
The starting status for the step.
Possible values: "success", "warning", "error", "skipped", "notRun"
stepName
Stringoptional
The name of the procedure step that should own the job step. If not specified, myStep is used.
subprocedure
Stringoptional
Name of a procedure to invoke during this step.
subproject
Stringoptional
Name of the project containing the procedure to invoke during this step.
timeLimit
Stringoptional
Maximum amount of time the step can execute; abort if it exceeds this time.
timeLimitUnits
Stringoptional
Units for step time limit: seconds, minutes, or hours.
Possible values: "hours", "minutes", "seconds"
workingDirectory
Stringoptional
Working directory in which to execute the command for this step. A relative name is interpreted relative to the root directory for the job's workspace.
workspaceName
Stringoptional
The name of the workspace.

Usage

Groovy

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createJobStep( /* optional arguments */ )