Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Executes user-provided Windows commands and/or existing bat scripts on a Windows server/machine. The plugin provides the ability for the user to define additional inputs that will be available to the bat scripts when executing. In addition, the plugin provides the ability for the user to define any number of outputs from the execution of the bat script that can be utilized in subsequent steps in the workflow.

All workflow execution properties are also available to the shell script, but any print of secure properties using echo command will result in ***** being printed in FlexDeploy logs. This prevents secure property values like PASSWORD from being visible to any FlexDeploy user.

Inputs

Input Name

Input Code

Required

Description

Code Snippet

FDWSHELL_INP_CODE_SNIPPET

Yes

The commands and/or bat scripts that are to be executed in a Windows environment.

Restrict Environment

FDWSHELL_INP_RESTRICT_ENVIRONMENT

No

Provide comma-separated instance codes to restrict environment variables in shell to specified instance codes. If no value is provided all properties are available to shell environment.

No Secure Variables

FDWSHELL_INP_NO_SECURE_VARIABLES

No

Check if you do not want to pass secure/encrypted properties in shell environment.

Anchor
_GoBack
_GoBack

Lock Name

FDSHELL_INP_LOCK

No

If a value is given, only a single simultaneous execution with the given name is allowed per endpoint.

Outputs

Output Name

Required

Description

User Defined

No

See Special Considerations below.

...

This operation delegates endpoint execution to the workflow developer. The workflow editor will default to "Any", which will execute on any one of the selected endpoints, which will be randomly picked from selected endpoints or a specific endpoint where previous step may have executed. Changing this value to "All" to will result in execution on all selected endpoints.

Special Considerations

Using Properties

The Windows shell plugin can use regular Windows shell variable syntax with properties.

...

OR, you can use groovy to insert them, but this is usually a little more difficult, but it can work nicely. Using 3 quote marks lets you use multi-line strings in Groovy.

...

Using workflow variables

The Windows shell plugin can use regular Windows shell variable syntax with properties, if you set them up as custom inputs.

...

OTHERWISE, you can use groovy to insert them, but this is usually a little more difficult, but it can work nicely. Using 3 quote marks lets you use multi-line strings in Groovy.

...

User Defined Outputs – An output must be defined in the workflow editor to be accessible. Within your script, use the following built-in function to set the output with the appropriate value and have it returned to the workflow process. Any number of outputs can be used.

...

Code Block
languagepowershell
call :setOutput {output name} {output value} 

#Examples
call :setOutput STATUS %{STATUS_VARIABLE}%STATUS_VARIABLE%
call :setOutput RESULT "aa bb cc"
call :setOutput UPDATECOUNT 1