WorkflowDefinition

2 minute readReference

createWorkflowDefinition

Creates a new workflow definition for a project.

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)

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

workflowNameTemplate

String

The template used to name instances of this workflow definition.

Usage

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

deleteWorkflowDefinition

Deletes a workflow definition, including all state and transition definitions.

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)

Usage

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

getWorkflowDefinition

Find a workflow definition by 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)

Usage

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

getWorkflowDefinitions

Retrieve all workflow definitions 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.getWorkflowDefinitions( projectName: 'test-projectName')

modifyWorkflowDefinition

Modifies an existing workflow definition.

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)

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

newName

String

New name for an existing object that is being renamed.

workflowNameTemplate

String

The template used to name instances of this workflow definition.

Usage

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