ActiveVOS Designer User’s Guide

Shell Command Invoke Service

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 ActiveVOS. 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

workingPathDir

(Required) Working directory for the execution of the script

charset

Character encoding of the document. 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

To create a BPEL process that invokes a shell command:

  1. In the Project Explorer, create a new Orchestration project.
  2. Select File>New>BPEL Process.
  3. Name the process and click Finish.
  4. In the Participants view, create a new Partner Service Provider.
  5. Select System Services from the Interfaces tree.
  6. Select Shell Command Execute.
  7. From the Partner Service Provider that you created, drag the execCommand operation to the canvas to create an invoke activity.
  8. Fill in the input data, with the selections described above.