Workflow

2 minute readReference

completeWorkflow

Marks a workflow as completed. When completed, transitions are no longer evaluated.

Arguments

Argument Name Type Description

projectName

String

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

workflowName

String

The name of the workflow. (Required)

Usage

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

deleteWorkflow

Deletes a workflow, including all states and transitions.

Arguments

Argument Name Type Description

projectName

String

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

workflowName

String

The name of the workflow. (Required)

deleteProcesses

Boolean

True to delete processes associated with the workflow.

Usage

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

getWorkflow

Finds a workflow by its name.

Arguments

Argument Name Type Description

projectName

String

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

workflowName

String

The name of the workflow. (Required)

Usage

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

getWorkflows

Retrieves all workflow instances in a project.

Arguments

Argument Name Type Description

projectName

String

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

Usage

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

runWorkflow

Runs the specified workflow definition and returns the workflow name.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

The name of the workflow definition. (Required)

actualParameters

The list of actual parameters.

credentials

Credential array

Credentials to be used in the state.

priority

String

The priority of jobs launched by the workflow.

scheduleName

String

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

startingState

String

The name of the starting state.

Usage

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

transitionWorkflow

Manually transitions from the active workflow state.

Arguments

Argument Name Type Description

projectName

String

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

workflowName

String

The name of the workflow. (Required)

stateName

String

The name used for the new state. (Required)

transitionName

String

The name used for the transition instance. (Required)

actualParameters

The list of actual parameters.

credentials

Credential array

Credentials to be used in the state.

Usage

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