KBEC-00349 - How to get the valid options for a given data type

Summary:

This article discusses how to get the valid options for a given data type.

Solution:

When you want to use ElectricFlow/ElectricCommander API or DSL by referring to the online help for specific API call, you may find for some arguments the document provide data type but you don't know what are valid options. For example, starting from ElectricFlow 6.4, we introduce enhanced error handling option in pipeline Stage task, Gate approvals and Deployer which is specified via "errorHandling" argument with data type of "FlowStateErrorHandling". You may wonder what are the valid options for that "FlowStateErrorHandling" when you hit the online document below.

 

http://docs.electric-cloud.com/eflow_doc/6_4/API/HTML/content/apipipelines.htm#createTask

Usually you can get such valid options via "ectool <API name> --help". For example in this case, you can find it below.

>ectool createTask --help
>Usage: createTask <projectName> <taskName>
[--actualParameter <var1>=<val1> [<var2>=<val2> ...]]
[--advancedMode <0|1|true|false>]
[--afterTask <afterTask>]
[--approvers approver1 approver2 ...]
[--beforeTask <beforeTask>]
[--description <description>]
[--enabled <0|1|true|false>]
[--environmentName <environmentName>]
[--environmentProjectName <environmentProjectName>]
[--environmentTemplateName <environmentTemplateName>]
[--environmentTemplateProjectName <environmentTemplateProjectName>]
[--errorHandling <continueOnError|stopOnError>]
[--gateType <POST|PRE>]
[--instruction <instruction>]
[--keepOnError <0|1|true|false>]
[--notificationTemplate <notificationTemplate>]
[--pipelineName <pipelineName>]
[--skippable <0|1|true|false>]
[--snapshotName <snapshotName>]
[--stageName <stageName>]
[--startTime <startTime>]
[--subapplication <subapplication>]
[--subpluginKey <subpluginKey>]
[--subprocedure <subprocedure>]
[--subprocess <subprocess>]
[--subproject <subproject>]
[--subworkflowDefinition <subworkflowDefinition>]
[--subworkflowStartingState <subworkflowStartingState>]
[--taskProcessType <APPLICATION|OTHER>]
[--taskType <APPROVAL|DEPLOYER|MANUAL|PLUGIN|PROCEDURE|PROCESS|UTILITY|WORKFLOW>]
[--tierResourceCount <envTemplateTierName>=<resourceCount> [<envTemplateTierName>=<resourceCount> ...]]
[--workspaceName <workspaceName>]

Then you can see the valid options for "FlowStateErrorHandling" are continueOnError and "stopOnError" via below line.

--errorHandling <continueOnError|stopOnError>

Applies to:

  • Production version: All
  • OS: All
Have more questions? Submit a request

Comments

Powered by Zendesk