createStateDefinition

Back to index

Summary

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.
projectName
Stringrequired
The name for the project that must be unique among all projects.
workflowDefinitionName
Stringrequired
The name of the workflow definition.
stateDefinitionName
Stringrequired
The name used for the state definition.
actualParameter
Arrayoptional
The actual parameters to the state definition's process.
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
startable
Booleanoptional
True if the workflow can begin in this state.
subprocedure
Stringoptional
The name of the subprocedure.
subproject
Stringoptional
The name of the project that contains the subprocedure.
substartingState
Stringoptional
The name of the starting state to use in the subworkflowDefinition.
subworkflowDefinition
Stringoptional
The name of the subworkflowDefinition.

Usage

Perl

$cmdr->createStateDefinition( "test-projectName", # projectName "test-workflowDefinitionName", # workflowDefinitionName "test-stateDefinitionName" # stateDefinitionName # optionals );

ectool

ectool createStateDefinition \ "test-projectName" `# projectName` \ "test-workflowDefinitionName" `# workflowDefinitionName` \ "test-stateDefinitionName" `# stateDefinitionName` \ # optionals

Examples

Perl

$cmdr->createStateDefinition("Default", "BTD", "build", {startable => 1, subproject => "product", subprocedure => "Master", description => "Production"});

ectool

ectool createStateDefinition "Default" "BTD" "build" --startable 1 --subproject "product" --subprocedure "Master" --description "Production"