Workflow Management

4 minute readReference

completeWorkflow

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

You must specify projectName and workflowName.

Arguments Descriptions

projectName

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

Argument type: String

workflowName

The name of the workflow.

Argument type: String

Positional arguments

projectName, workflowName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->completeWorkflow (<projectName>, <workflowName>);

Example

$cmdr->completeWorkflow ("Default", "workflow_26_201010121647");

ectool

syntax: ectool completeWorkflow <projectName> <workflowName>

Example

ectool completeWorkflow Default workflow_26_201010121647

deleteWorkflow

Deletes a workflow, including all states and transitions.

You must specify a projectName and a workflowName.

Arguments Descriptions

projectName

The name of the project containing the workflow to delete.

Argument type: String

workflowName

The name of the workflow.

Argument type: String

deleteProcesses

(Optional) < Boolean flag— 0|1|true|false >

If the value is 1 or true, the processes associated with the workflow will also be deleted.

Argument type: Boolean

Positional arguments

projectName, workflowName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->deleteWorkflow (<projectName>, <workflowName>, {<optionals>});

Example

$cmdr->deleteWorkflow ("Default", "workflow_26_201010121647", {deleteProcesses => true});

ectool

syntax: ectool deleteWorkflow <projectName> <workflowName> [optionals]

Example

ectool deleteWorkflow "Default" "workflow_26_201010121647" --deleteProcesses true

getState

Finds a state by its name.

You must specify projectName, workflowName, and stateName.

Arguments Descriptions

projectName

Name for the project; must be unique among all projects.

Argument type: String

workflowName

Name of the workflow.

Argument type: String

stateName

Name of the state.

Argument type: String

Positional arguments

projectName, workflowName, stateName

Response

One state element.

ec-perl

syntax: $cmdr->getState (<projectName>, <workflowName>, <stateName>);

Example

$cmdr->getState ("Default", "workflow_26_201010121647", "build");

ectool

syntax: ectool getState <projectName> <workflowName> <stateName>

Example

ectool getState "Default" "workflow_26_201010121647" "build"

getStates

Retrieves all states in a workflow.

You must specify projectName and workflowName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

workflowName

Name of the workflow.

Argument type: String

Positional arguments

projectName, workflowName

Response

One or more state elements.

ec-perl

syntax: $cmdr->getStates (projectName>, <workflowName>);

Example

$cmdr->getStates ("Default", "workflow_26_201010121647");

ectool

syntax: ectool getStates <projectName> <workflowName>

Example

ectool getStates "Default" "workflow_26_201010121647"

getTransition

Finds a transition by its name.

You must specify projectName, workflowName, stateName, and transitionName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

workflowName

Name of the workflow.

Argument type: String

stateName

Name of the new state.

Argument type: String

transitionName

Name of the transition instance.

Argument type: String

Positional arguments

projectName, workflowName, stateName, transitionName

Response

One transition element.

ec-perl

syntax: $cmdr->getTransition (projectName>, <workflowName>, <stateName>, <transitionName>);

Example

$cmdr->getTransition ("Default", "workflow_26_201010121647", "build", "build2test");

ectool

syntax: ectool getTransition <projectName> <workflowName> <stateName> <transitionName>

Example

ectool getTransition "Default" "workflow_26_201010121647" "build" "build2test"

getTransitions

Retrieves all transitions in a workflow.

You must specify projectName, workflowName, and stateName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

workflowName

The name of the workflow.

Argument type: String

stateName

The name of the new state.

Argument type: String

targetState

(Optional) The name of the target state that limits results to transitions that have the specified state as a target.

Argument type: String

Positional arguments

projectName, workflowName, stateName

Response

One or more transition elements.

ec-perl

syntax: $cmdr->getTransitions (<projectName>, <workflowName>, <stateName>, {<optionals>});

Example

$cmdr->getTransitions ("Default", "workflow_26_201010121647", "build");

ectool

syntax: ectool getTransitions <projectName> <workflowName> <stateName> [optionals]

Example

ectool getTransitions "Default" "workflow_26_201010121647" "build"

getWorkflow

Finds a workflow by its name.

You must specify a projectName and workflowName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

workflowName

Name of the workflow.

Argument type: String

Positional arguments

projectName, workflowName

Response

One workflow element.

ec-perl

syntax: $cmdr->getWorkflow (<projectName>, <workflowName>);

Example

$cmdr->getWorkflow ("Default", "BTD");

ectool

syntax: ectool getWorkflow <projectName> <workflowName>

Example

ectool getWorkflow "Default" "BTD"

getWorkflows

Retrieves all workflow instances in a project.

You must specify a projectName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

Positional arguments

projectName

Response

Zero or more workflow elements.

ec-perl

syntax: $cmdr->getWorkflows (<projectName>);

Example

$cmdr->getWorkflows ("Default");

ectool

syntax: ectool getWorkflows <projectName>

Example

ectool getWorkflows "Default"

runWorkflow

Runs the specified workflow definition and returns the workflow name.

You must specify the projectName and workflowDefinitionName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

workflowDefinitionName

Name of the workflow definition.

Argument type: String

actualParameter

(Optional) Specifies the values to pass as parameters to the workflow starting state. Each parameter value is specified with an actualParameterName and a value. The actualParameterName must match the name of a formal parameter on the starting state.

Argument type: Map

credentials

(Optional) Credentials to use with the workflow state.

Argument type: Collection

priority

(Optional) Priority of the jobs launched by the workflow.

Argument type: JobPriority

scheduleName

(Optional) Name for the schedule for environment reservations that must be unique among all schedules for the project.

Argument Type: String

startingState

(Optional) The initial state of the workflow.

Argument type: String

Positional arguments

projectName, workflowDefinitionName

Response

Returns the workflow name.

ec-perl

syntax: $cmdr->runWorkflow (<projectName>, <workflowDefinitionName>, {<optionals>});

Example

$cmdr->runWorkflow ("Default", "BTD", {startingState => "Build"});

ectool

syntax: ectool runWorkflow <projectName> <workflowDefinitionName> [optionals]

Example

ectool runWorkflow "Default" "BTD" --startingState "Build"

transitionWorkflow

Manually transition from the active workflow state.

You must specify projectName, workflowName, stateName, and transitionName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

workflowName

The name of the workflow to transition.

Argument type: String

stateName

The name of the new state.

Argument type: String

transitionName

The name of the transition.

Argument type: String

actualParameters

(Optional) Specifies the values to pass as parameters to the transition’s target state. Each parameter value is specified with an actualParameterName and a value. The actualParameterName must match the name of a formal parameter on the target state.

Argument type: Map

credentials

(Optional) Credentials to use with the workflow state.

Argument type: Collection

Positional arguments

projectName, workflowName, stateName, transitionName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->transitionWorkflow (<projectName>, <workflowName>, <stateName, <transitionName>,{<optionals>});

Example

$cmdr->transitionWorkflow ("Default", "workflow_26_201010121647", "build", "build2test");

ectool

syntax: ectool transitionWorkflow <projectName> <workflowName> <stateName> <transitionName> [optionals]

Example

ectool transitionWorkflow "Default" "workflow_26_201010121647" "build" "build2test"