FlowRuntime

6 minute readReference

abortPipelineRun

Aborts a pipeline run.

Arguments

Argument Name Type Description

flowRuntimeId

String

The ID of the flow runtime.

flowRuntimeName

String

The name of the flow runtime.

force

Boolean

If true running tasks are force aborted.

projectName

String

The name of the project.

Usage

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

completeManualTask

Completes the manual task.

Arguments

Argument Name Type Description

flowRuntimeId

String

The ID of the flow runtime. (Required)

stageName

String

The name of the stage. (Required)

taskName

String

The name of the task. (Required)

action

String

The type of action to be taken on the manual process step or manual task or gate task.

actualParameters

Actual parameters passed to an invoked subprocedure.

evidence

String

Evidence provided while taking an action on the manual process step or manual task or gate task.

gateType

String

The type of the gate.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.completeManualTask( flowRuntimeId: 'test-flowRuntimeId', stageName: 'test-stageName', taskName: 'test-taskName' /* optional arguments */)

completeRuntimeWaitDependency

Manually forces the specific wait dependency to complete for the specified source pipeline runtime.

Arguments

Argument Name Type Description

flowRuntimeId

String

The UUID of the invoking flowRuntime.

projectName

String

The name for the project that contains the wait dependency.

pipelineName

String

The name of the pipeline.

stageName

String

The name of the stage.

runtimeWaitDependencyName

String

The name of the runtimeWaitDependency.

dependentFlowRuntimeId

String

The UUID of the dependent flowRuntime.

dependentGateType

String

The type of dependent gate.

dependentPipelineName

String

The name of the dependent pipeline.

dependentProjectName

String

The name of the dependent project.

dependentReleaseName

String

The name of the dependent release.

dependentStageName

String

The name of the dependent stage.

dependentTaskName

String

The name of the dependent task.

gateType

String

The type of gate.

releaseName

String

The name of the release.

taskName

String

The name of the task.

Usage

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

deletePipelineRun

Deletes a pipeline runtime.

Arguments

Argument Name Type Description

projectName

String

The name of the project.

flowRuntimeId

String

The ID of the flow runtime.

flowRuntimeName

String

The name of the flow runtime.

Usage

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

getPipelineRunAuditReport

[PREVIEW] This API is in preview mode, and therefore subject to change. Retrieves a detailed data set for the specified pipeline run to be used in audit reports.

Arguments

Argument Name Type Description

flowRuntimeId

String

The ID of the pipeline or release run to generate the audit report.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getPipelineRunAuditReport()

getPipelineRuntimeDetails

Retrieves pipeline runtime details.

Arguments

Argument Name Type Description

flowRuntimeIds

String array

List of pipeline flowruntime ids of interest.

Usage

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

getPipelineRuntimes

Retrieves pipeline runs.

Arguments

Argument Name Type Description

projectName

String

The name of the project.

releaseName

String

The name of the release.

filters

Filter array

A list of zero or more filter criteria definitions used to define objects to find.

firstResult

Integer

Result pagination: the first row to return.

flowRuntimeId

String

The ID of the flow runtime.

flowRuntimeName

String

The name of the flow runtime.

maxResults

Integer

Result pagination: the number of rows to return.

pipelineName

String

The name of the pipeline.

releaseId

String

The ID of the release.

sortKey

String

How to sort the results.

sortOrder

String

Specifies the order to sort the results.

viewName

String

The name of the view.

Usage

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

getReleaseTimelineDetails

Retrieves planned versus actual time details for a release.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

releaseName

String

The name of the release. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getReleaseTimelineDetails( projectName: 'test-projectName', releaseName: 'test-releaseName')

getRunHierarchy

Retrieves either the definition view or the runtime view for the specified release.

Arguments

Argument Name Type Description

flowRuntimeId

String

The ID of the flow runtime.

filters

Filter array

A list of zero or more filter criteria definitions used to define objects to find.

mode

String

The mode of portfolio view.

pipelineName

String

The name of the pipeline.

projectName

String

The name of the project.

releaseName

String

The name of the release.

Usage

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

getRuntimeWaitDependencies

Retrieves runtime wait dependencies for the specified pipeline runtime or pipeline runtime object.

Arguments

Argument Name Type Description

flowRuntimeId

String

The UUID of the invoking flowRuntime. (Required)

stageName

String

The name of the stage.

gateType

String

The type of gate.

taskName

String

The name of the task.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getRuntimeWaitDependencies( flowRuntimeId: 'test-flowRuntimeId', /* optional arguments */)

pausePipelineRun

Pause the pipeline run.

Arguments

Argument Name Type Description

flowRuntimeId

String

The id of the pipeline run to pause/resume (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.pausePipelineRun( flowRuntimeId: 'test-flowRuntimeId')

restartPipelineRun

Restart a pipeline run.

Arguments

Argument Name Type Description

flowRuntimeId

String

The ID of the flow runtime.

actualParameters

The list of actual parameters.

comment

String

Comment provided while restarting pipeline run which has completed with error.

flowRuntimeName

String

The name of the flow runtime.

gateType

String

The type of the gate.

projectName

String

The name of the project.

stageName

String

The name of a stage from which to restart a pipeline.

taskName

String

The name of a high-level task in the last active stage from which to restart a pipeline.

Usage

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

resumePipelineRun

Resume the pipeline run.

Arguments

Argument Name Type Description

flowRuntimeId

String

The id of the pipeline run to pause/resume (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.resumePipelineRun( flowRuntimeId: 'test-flowRuntimeId')

retryTask

Retries a pipeline task. This only applies to tasks that are waiting for a manual retry. It can be any pipeline task (excluding MANUAL, APPROVAL, GROUP, and DEPLOYER tasks) or an application deployment that is a part of a deployer task. For application deployments, a subapplication (and a subproject by Perforce) should be provided.

Arguments

Argument Name Type Description

flowRuntimeId

String

The ID of the flow runtime. (Required)

stageName

String

The name of the stage. (Required)

taskName

String

The name of the task. (Required)

action

String

Action to execute: rerun (default), skip or fail the task.

comment

String

Comment provided while retry an action on the manual process step or manual task or gate task.

gateType

String

The type of the gate.

subapplication

String

The name of the sub application.

subproject

String

The name of the project that contains the sub application.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.retryTask( flowRuntimeId: 'test-flowRuntimeId', stageName: 'test-stageName', taskName: 'test-taskName' /* optional arguments */)

runFutureTask

run a task out of order - in a stage or gate that hasn’t started yet.

Arguments

Argument Name Type Description

flowRuntimeId

String

The ID of the flow runtime. (Required)

stageName

String

The name of the stage. (Required)

taskName

String

The name of the task. (Required)

gateType

String

The type of the gate.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.runFutureTask( flowRuntimeId: 'test-flowRuntimeId', stageName: 'test-stageName', taskName: 'test-taskName' /* optional arguments */)

runPipeline

Runs the specified pipeline. If the pipeline configures disableMultipleActiveRuns= true, only one active run of this pipeline is allowed at a time and attempts to start more than one results in an exception.

Arguments

Argument Name Type Description

pipelineName

String

The name of the pipeline. (Required)

projectName

String

The name for the project that must be unique among all projects. (Required)

actualParameters

The list of actual parameters.

credentialReferenceParameters

array

List of credential parameters with references to existing credentials as parameter values. If the parameter value is a property reference then the credential would be resolved at runtime.

credentials

Credential array

Credentials to be used in the state.

parsedWebhookData

String

JSON with parsed webhook data to be set on a pipeline/release/procedure run.

priority

String

The priority of jobs launched by the pipeline.

releaseName

String

The name of the release.

scheduleName

String

Name for the schedule; must be unique among all schedules for the project.

stagesToRun

String array

One or more stages to run in a pipeline.

startingStage

String

The name of the starting stage.

startingTask

String

The name of the starting task.

startingTaskStage

String

The name of the stage containing starting task.

webhookData

String

The webhook data to be set on the pipeline/release/procedure run.

webhookHeaders

String

The webhook headers in JSON format to be set on the pipeline/release/procedure run.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.runPipeline( pipelineName: 'test-pipelineName', projectName: 'test-projectName' /* optional arguments */)

setPipelineRunName

Renames a running pipeline.

Arguments

Argument Name Type Description

newName

String

The new name for the flow runtime. (Required)

flowRuntimeId

String

The primary key of the completed flowRuntime.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.setPipelineRunName( newName: 'test-newName' /* optional arguments */)