Workflow commands

completeWorkflow

Mark a workflow as completed, after which transitions will no longer be 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.apis.model.*


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.apis.model.*


ElectricFlow ef = new ElectricFlow()

def result = ef.deleteWorkflow(
                projectName: 'test-projectName',
                workflowName: 'test-workflowName'
                /* optional arguments */)

getWorkflow

Find a workflow by 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.apis.model.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getWorkflow(
                projectName: 'test-projectName',
                workflowName: 'test-workflowName')

getWorkflows

Retrieve all workflows 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.apis.model.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getWorkflows(
                projectName: 'test-projectName')

runWorkflow

Run the specified workflow definition, return 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.apis.model.*


ElectricFlow ef = new ElectricFlow()

def result = ef.runWorkflow(
                projectName: 'test-projectName',
                workflowDefinitionName: 'test-workflowDefinitionName'
                /* optional arguments */)

transitionWorkflow

Manually transition from the active state of a workflow.

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.apis.model.*


ElectricFlow ef = new ElectricFlow()

def result = ef.transitionWorkflow(
                projectName: 'test-projectName',
                workflowName: 'test-workflowName',
                stateName: 'test-stateName',
                transitionName: 'test-transitionName'
                /* optional arguments */)