> #### 6.7.1 Remote Command Java Action

> This Java Action is used to execute a remote command from Interstage BPM like those executed from a Windows Command Line.

> First, you must start a remote command server on your remote machine. A utility class is provided to start the remote command server on the remote machine upon which you want to run these commands. This command server is added listening to a port.

> The remote command server is run as a java application called JACommandServer on the remote system upon which you wish to run commands remotely.

> usage: java com.fujitsu.iflow.utilities.JACommandServer port, <commaSeparatedAddressees>

> A batch file called StartJACommandServer.bat can be found in the Interstage BPM bin directory. Running this batch file as specified starts the Server needed by the Remote Command JavaAction. Follow the set up directions in the batch file before starting the Server with the directions below.

> The following Remote Command Server (run from a Windows or UNIX Command prompt) will run on Machine localhost and listen to port 5037:

> C:\fujitsu\InterstageBPM\bin>StartJACommandServer.bat 5037 localhost

> To define a Remote Command Java Action (following the example):

> 1. Assign a command prompt type command as the value of a UDA associated with the process definition upon which you are adding this JavaAction. A UDA called RemoteCommand is used in the example. For example, the following command starts the Winzip utilities:

> cmd /c "C:\\Program Files\\WinZip\\WINZIP32.EXE"

> 2. Follow the instructions in the Assigning Java Actions section to open the Action List and select Remote Command from Integration Actions in the Action List dialog box as shown in the example.

> The Remote Command dialog box appears.

> 3. Enter a name for your Remote Command action in the Action Name field. Note that the name RunRemoteCommand is displayed as the Action Name in Figure 43.

> 4. Select the UDA that contains the remote command. RemoteCommand is used in the example.

> 5. Enter a host name (localhost is used in the example), Port Number (5037 if you are following the example) and the UDA to collect the response if there is any. In this example, leave the default text DO NOT WAIT FOR RETURN in the Response UDA field.

> Figure 86: The Remote Command Action dialog box

> 6. Click the OK button.

> 7. Click OK to close the properties dialog box.

> Your Remote Command Java Action is now assigned to the process definition. You can attach actions in any one of the Action type frames. Your remote command will execute when this JavaAction runs.

Business Process Manager Help-Fujitsu Computer Systems Corporation Interstage Website Voice: (888) 248-9273 Interstage BPM Information