Skip to main content
OnCommand Workflow Automation 5.1

General PowerShell and Perl conventions for WFA


You must understand certain PowerShell and Perl conventions that are used in WFA to create scripts that are consistent with existing scripts.

  • Use variables that help to clarify what you want the script to do.

  • Write readable code that can be understood without comments.

  • Keep the scripts and commands as simple as possible.

  • For PowerShell scripts:

    • Use cmdlets whenever possible.

    • Invoke .NET code when there is no cmdlet available.

  • For Perl scripts:

    • Always end “die” statements with newline characters.

      In the absence of a newline character, the script line number is printed, which is not useful for debugging Perl commands executed by WFA.

    • In the “GetOpt” module, make the string arguments to a command mandatory.