Configuring Multiline Script Options

You can use the OS Command adapter to configure multiline scripts for interpreters such as the Bourne Shell or the C Shell.

  1. From the Utilities section of the action bar, click OS Command and drop it on the process diagram.
  2. Click OS Command , and from the context menu, click .
    The OS Command Editor appears.
  3. From the OS Command Editor, click the Basic Options tab.
  4. From the Type list, select Bourne Shell, C Shell, K Shell, Bash, or Windows Batch.
  5. In the Command Arguments text box, type any interpreter arguments.

    These arguments precede the script file in the argument list for the interpreter.

    Note: Any additional arguments to Windows cmd.exe must come before the required ā€˜/Cā€™ option.

  6. To add an existing parameter, click .

    Automation Process Composer adds the parameter name to the Edit Scripts field at the current cursor position.

  7. To add a new parameter, click .
    The Create New Parameter panel appears.

    For more information about working with parameters, see Defining and Mapping Parameters.

    You can use any file substitution in the script. However, if you reference a shell script variable named "workid" as {workid}, an error can occur because "{workid}" would be substituted before the script is run.

  8. In the Command Arguments field, enter any interpreter arguments.

    These arguments precede the script file in the argument list for the interpreter.

    Note: Any additional arguments to Windows cmd.exe must come before the required ā€˜/Cā€™ option.

  9. In the Script Arguments field, enter any script arguments.
  10. In the Line Ending list, select the line ending that you want to use when the script is written to a disk file.

    Note: This option is required if you are running a Automation Process Composer simulation process on Windows.

    OptionDescription
    Default Leave the line endings as they were found in the input file. Automation Process Composer does not attempt to change the line endings. If the file has to be copied for some reason, local line endings are used.

    The Default option is recommended.

    Local Write the file with the local line endings for the computer on which the simulation process is running. This is the location of Automation Process Composer and the 3DOrchestrate station. This means CR-LF on Windows and LF on UNIX. The file will always be copied in text mode and the line endings updated, even if the line endings already appear to be correct.
    UNIX Always separate lines with LF, even if the simulation process is running on Windows.
    Windows Always separate lines with CR-LF, even if the simulation process is running on UNIX.
  11. In the Editor text box, edit the script.

    All the commands that you can type at the command line for the given interpreter are valid. The script you type is passed to the interpreter as-is, after expanding any parameter substitutions. You can remove all contents of the text box at any time by clicking Clear Script.

  12. Click Ok to save your changes and to close the OS Command Editor.