Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

Run a Shell Command

Run a Shell Command

You can use the Run a Shell Command action in a
Service
step to automate the call to a shell command as part of your application integration. For example, you might add this action in a subprocess to move files on the agent or to read the file contents of a particular directory by running cp or cat shell commands.
When you use this action in a process, be sure to select a Secure Agent where you want to run the shell command in the
Server Configuration
System Services
list in
Application Integration Console
. However, you can access a shell command from a process running on the Cloud Server by calling the shell command in a subprocess that contains this
Service
step. Running system commands with this step is not recommended.

Enabling the Shell Command Service

Before you can execute a process that includes this action, enable the shell service in the
Application Integration Console
with the following steps:
  1. In
    Application Integration Console
    , choose
    Server Configuration
    .
  2. Choose the agent where you want to run the shell service from the
    Server Configuration
    list.
  3. On the
    System Services
    tab, choose
    Shell Service
    .
  4. Click
    Save
    .

Input and Output Fields

When you include a
Service
step for Run a Shell Command, you can use the following options:
Name
Type
Description
Input Fields
Command
Text
Required. The command name to be executed, which is specific to the operating system (Windows or Linux).
Character Set
Text
The character set of the command to be run.
Default, if not provided: UTF-8.
Merge Output
Checkbox
When checked, the contents of the output are merged with the error string, if any.
By default, this is enabled.
Input
Text
File name with path to use for the input, if any.
Working Directory
Text
Required. Path of the directory where the command executes
Output Fields
Error String
Text
String of error returned, if any.
Response Code
Text
0 (success) or 1 (failure).
Output String
Text
String of output returned, if any
The following image shows the properties required to run a Shell command:

0 COMMENTS

We’d like to hear from you!