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 |
The name for the project that must be unique among all projects. (Required) |
workflowDefinitionName |
String |
The name of the workflow definition. (Required) |
stateDefinitionName |
String |
The name used for the state definition. (Required) |
actualParameters |
ActualParameter array |
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. |
Usage
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createStateDefinition( projectName: 'test-projectName', workflowDefinitionName: 'test-workflowDefinitionName', stateDefinitionName: 'test-stateDefinitionName' /* optional arguments */)
deleteStateDefinition
Deletes a state 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) |
stateDefinitionName |
String |
The name used for the state definition. (Required) |
Usage
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.deleteStateDefinition( projectName: 'test-projectName', workflowDefinitionName: 'test-workflowDefinitionName', stateDefinitionName: 'test-stateDefinitionName')
getStateDefinition
Retrieves a state definition by its 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) |
stateDefinitionName |
String |
The name used for the state definition. (Required) |
Usage
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getStateDefinition( projectName: 'test-projectName', workflowDefinitionName: 'test-workflowDefinitionName', stateDefinitionName: 'test-stateDefinitionName')
getStateDefinitions
Retrieves all state definitions in a 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) |
includeFormalParameters |
Boolean |
True means formal parameters will also be included. |
startableOnly |
Boolean |
True means only state definitions marked as startable will be included. |
modifyStateDefinition
Modifies an existing state 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) |
stateDefinitionName |
String |
The name used for the state definition. (Required) |
actualParameters |
ActualParameter array |
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. |
Usage
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.modifyStateDefinition( projectName: 'test-projectName', workflowDefinitionName: 'test-workflowDefinitionName', stateDefinitionName: 'test-stateDefinitionName' /* optional arguments */)
moveStateDefinition
Moves a state definition within a 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) |
stateDefinitionName |
String |
The name used for the state definition. (Required) |
beforeStateDefinition |
String |
The name of the state definition before which |
Usage
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.moveStateDefinition( projectName: 'test-projectName', workflowDefinitionName: 'test-workflowDefinitionName', stateDefinitionName: 'test-stateDefinitionName' /* optional arguments */)