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 Connectors
  9. System Services, Listeners and Connectors

2. Design

2. Design

Using the Shell Command Invoke Service Connector

Using the Shell Command Invoke Service Connector

You can create an invoke activity that calls a POJO service to execute a shell command script. The invoke activity is based on a shell command system service provided by Process Server. You can, for example, call a script that updates a database or adds a new user to an identity service. To use the shell command system service, you must create and locate your script in a working directory that is specified within the input message for the invoke activity.
The following message shows an example of input for the invoke activity.
<shl:execCommand xmlns:inv = "urn:com:activee:rt:shellcmd:services:invoke" xmlns:shl="urn:com:activee:rt:shellcmd:services:ishellcmdinvoker"> <inv:shellRequest> <inv:command>string</inv:command> <inv:workingDirPath>string</inv:workingDirPath> <inv:charset>utf-8</inv:charset> <inv:mergeErrorAndOutput>true</inv:mergeErrorAndOutput> <inv:stdInput>string</inv:stdInput> </inv:shellRequest> </shl:execCommand>
The elements of the message are described in the following table.
execCommand Input Element
Description
command
(Required) Name of the script to execute. Examples:
cmd.exe /C myScript
concat('shell.bat', $requestVar)
workingPathDir
(Required) Working directory for the execution of the script
charset
Character encoding of the script. The default is UTF-8.
mergeErrorandOutput
True is the default setting. If true, directs errors as well as execution output to the same console.
stdInput
Data for the script