Workflow definition

6 minute readReference

createStateDefinition

Creates a new state definition for a workflow definition. Optionally, a state may launch either a procedure or a sub-workflow as its process when the state is entered.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

actualParameters

Map

The actual parameters to the state definition’s process.

description

String

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

startable

Boolean

True if the workflow can begin in this state.

subprocedure

String

The name of the sub procedure.

subproject

String

The name of the project that contains the sub procedure.

substartingState

String

The name of the starting state to use in the subworkflowDefinition.

subworkflowDefinition

String

The name of the subworkflowDefinition.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName

Usage

ec-perl

$cmdr->createStateDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, {<optionals>});

ectool

ectool createStateDefinition projectName, workflowDefinitionName, stateDefinitionName, [optionals]

createTransitionDefinition

Creates a new transition definition for workflow definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

transitionDefinitionName

String

(Required) The name used for the transition.

targetState

String

(Required) Target state for the transition definition.

actualParameters

Map

The actual parameters to the transition’s target state.

condition

String

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.

description

String

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

trigger

TransitionTrigger

Specifies the type of trigger for this transaction.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName, targetState

Usage

ec-perl

$cmdr->createTransitionDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, <transitionDefinitionName>, <targetState>, {<optionals>});

ectool

ectool createTransitionDefinition projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName, targetState, [optionals]

createWorkflowDefinition

Creates a new workflow definition for a project.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

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.

Positional arguments

projectName, workflowDefinitionName

Usage

ec-perl

$cmdr->createWorkflowDefinition(<projectName>, <workflowDefinitionName>, {<optionals>});

ectool

ectool createWorkflowDefinition projectName, workflowDefinitionName, [optionals]

deleteStateDefinition

Deletes a state definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName

Usage

ec-perl

$cmdr->deleteStateDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>);

ectool

ectool deleteStateDefinition projectName, workflowDefinitionName, stateDefinitionName

deleteTransitionDefinition

Deletes a transition definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

transitionDefinitionName

String

(Required) The name used for the transition.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName

Usage

ec-perl

$cmdr->deleteTransitionDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, <transitionDefinitionName>);

ectool

ectool deleteTransitionDefinition projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName

deleteWorkflowDefinition

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

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

Positional arguments

projectName, workflowDefinitionName

Usage

ec-perl

$cmdr->deleteWorkflowDefinition(<projectName>, <workflowDefinitionName>);

ectool

ectool deleteWorkflowDefinition projectName, workflowDefinitionName

getStateDefinition

Retrieves a state definition by its name.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName

Usage

ec-perl

$cmdr->getStateDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>);

ectool

ectool getStateDefinition projectName, workflowDefinitionName, stateDefinitionName

getStateDefinitions

Retrieves all state definitions in a workflow definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

includeFormalParameters

Boolean

True means formal parameters will also be included.

startableOnly

Boolean

True means only state definitions marked as startable will be included.

Positional arguments

projectName, workflowDefinitionName

Usage

ec-perl

$cmdr->getStateDefinitions(<projectName>, <workflowDefinitionName>, {<optionals>});

ectool

ectool getStateDefinitions projectName, workflowDefinitionName, [optionals]

getTransitionDefinition

Finds a transition definition by its name.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

transitionDefinitionName

String

(Required) The name used for the transition.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName

Usage

ec-perl

$cmdr->getTransitionDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, <transitionDefinitionName>);

ectool

ectool getTransitionDefinition projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName

getTransitionDefinitions

Retrieves all transition definitions in a workflow definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

targetState

String

Limits results to transition definitions that have the specified state definition as a target.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName

Usage

ec-perl

$cmdr->getTransitionDefinitions(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, {<optionals>});

ectool

ectool getTransitionDefinitions projectName, workflowDefinitionName, stateDefinitionName, [optionals]

getWorkflowDefinition

Retrieves a workflow definition by its name.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

Positional arguments

projectName, workflowDefinitionName

Usage

ec-perl

$cmdr->getWorkflowDefinition(<projectName>, <workflowDefinitionName>);

ectool

ectool getWorkflowDefinition projectName, workflowDefinitionName

getWorkflowDefinitions

Retrieves all workflow definitions in a project.

Arguments

Argument Name Type Description

projectName

String

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

Positional arguments

projectName

Usage

ec-perl

$cmdr->getWorkflowDefinitions(<projectName>);

ectool

ectool getWorkflowDefinitions projectName

modifyStateDefinition

Modifies an existing state definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

actualParameters

Map

The actual parameters to the state definition’s process.

clearActualParameters

Boolean

True if the state definition should remove all actual parameters to the process.

description

String

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

newName

String

The new name for an existing object that is being renamed.

startable

Boolean

True if the workflow can begin in this state.

subprocedure

String

The name of the sub procedure.

subproject

String

The name of the project that contains the sub procedure.

substartingState

String

The name of the starting state to use in the subworkflowDefinition.

subworkflowDefinition

String

The name of the subworkflowDefinition.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName

Usage

ec-perl

$cmdr->modifyStateDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, {<optionals>});

ectool

ectool modifyStateDefinition projectName, workflowDefinitionName, stateDefinitionName, [optionals]

modifyTransitionDefinition

Modifies an existing transition definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

transitionDefinitionName

String

(Required) The name used for the transition.

actualParameters

Map

The actual parameters to the transition’s target state.

clearActualParameters

Boolean

True if the transition should remove all actual parameters to the target state.

condition

String

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.

description

String

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

newName

String

The new name for an existing object that is being renamed.

targetState

String

Target state for the transition definition.

trigger

TransitionTrigger

Specifies the type of trigger for this transaction.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName

Usage

ec-perl

$cmdr->modifyTransitionDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, <transitionDefinitionName>, {<optionals>});

ectool

ectool modifyTransitionDefinition projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName, [optionals]

modifyWorkflowDefinition

Modifies an existing workflow definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

description

String

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

newName

String

The new name for an existing object that is being renamed.

workflowNameTemplate

String

The template used to name instances of this workflow definition.

Positional arguments

projectName, workflowDefinitionName

Usage

ec-perl

$cmdr->modifyWorkflowDefinition(<projectName>, <workflowDefinitionName>, {<optionals>});

ectool

ectool modifyWorkflowDefinition projectName, workflowDefinitionName, [optionals]

moveStateDefinition

Moves a state definition within a workflow definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

beforeStateDefinition

String

The name of the state definition before which stateDefinitionName should appear. Blank to move the state definition to the last position.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName

Usage

ec-perl

$cmdr->moveStateDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, {<optionals>});

ectool

ectool moveStateDefinition projectName, workflowDefinitionName, stateDefinitionName, [optionals]

moveTransitionDefinition

Moves a transition definition within a workflow definition.

Arguments

Argument Name Type Description

projectName

String

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

workflowDefinitionName

String

(Required) The name of the workflow definition.

stateDefinitionName

String

(Required) The name used for the state definition.

transitionDefinitionName

String

(Required) The name used for the transition.

beforeTransitionDefinition

String

The name of the transition before which transitionDefinitionName should appear. Blank to move the transition to the last position.

Positional arguments

projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName

Usage

ec-perl

$cmdr->moveTransitionDefinition(<projectName>, <workflowDefinitionName>, <stateDefinitionName>, <transitionDefinitionName>, {<optionals>});

ectool

ectool moveTransitionDefinition projectName, workflowDefinitionName, stateDefinitionName, transitionDefinitionName, [optionals]