Difference between revisions of "Call Native Program"
|Line 1:||Line 1:|
== Call Native Program Node ==
== Call Native Program Node ==
Latest revision as of 09:24, 21 August 2015
Call Native Program Node
The purpose of this Node is to call an executable program and return the output to Presence. Some examples of possible uses for this include:
- Check if Windows services are running.
- Run a bespoke encryption tool
- Perform a directory listing
The external application can be on the local machine or a remote machine running the Presence Program Call Server. The program being called can pass information back to Presence via the programs output string (anything written to the system print stream), Presence can also capture anything written to the System error stream. The contents of these Streams can be written to Presence Variables.
To create a Call Native Program Task element drop the Call Program Node onto the Task. The following dialog will be displayed.
Enter the program name and parameters into the list to the right. For example, to run the 'dir' program on Windows NT, enter the following
- "cmd.exe" - Press the Add Button
- "/C" - Press the Add Button
- "dir" - Press the Add Button
You could also do it as one string, but it is noted by Sun that the correct method of passing execution parameters is an a array of values, and this saves you having to worry about problems caused by spaces in arguments etc.
Arguments may contain Presence Variables or Columns, Press CTRL + Space to show a list of values on the Presence Context.
To reorder elements in the list, click the Move up and Move down Buttons. To remove an argument, click the Delete Button.
Make Duplicate Programs Calls for Multiple Rows Checkbox - If checked and there is more than one Row on the Presence Content (if a column is referenced) then the call will be iterated for each row.
Forcibly Terminate Program if it does not return after Checkbox - Check this box if you want the program call to Timeout after a specified number of Seconds, enter the number of Seconds in the field provided.
Wait for Program to return before Continuing the Task Checkbox - Check this if you want to Task to 'block' until the program call is complete. Checking this will enable the Program System stream data to be captured for processing by the rest of the Task.
Store Program Responses and Error Messages Checkbox - Check this if you want to contents of the jobs output streams to be held as Presence Variables. Use the fields below to store these values.
Working Directory to Run in - Specify the directory that the Program would assume to be it's home directory, any relative file operations would assume this value as the parent directory.
Run Program Remotely Checkbox - If you have Programs that you wish to run on a remote system, you would need to install the Presence Program Call Slave (found as part of the installation set). The Program Call slave would need to be running on the remote machine. Presence communicates with the Programs call Slave thru Sockets, see the configuration document for a list of sockets used by Presence (you will need to open these sockets so Presence can access them for internal communications).
When checked you need to supply the host name or IP address of the machine that is running the Remote Program Call Slave in the field provided.
Store program Call Syntax as Encrypted data Checkbox - If selected Presence will encrypt all traffic between the server(s) and the Program Call Slaves at the price of a slight performance hit. It's worth noting that some platforms have their own cryptography program providers that could be problematic. Presence uses 192 bit encryption.
Over-ride System Environment Variables Checkbox - Checking this will enable you to assign temporary environment variables to the Program that is to be called, for instance you could change the System Path by adding the following value to the list provided:
PATH = MY New Path
Use the Test Button to confirm that the Presence Server can run the program, Click finish to add the program call to the Task.
Task Elements : Action Task Elements : Call Native Program
|Send Email | Send SMS | Send Fax | Broadcast Messages|
|Read Text File | Read Binary File | Write Text File | Write Binary File | Parse File Action|
|Rename File | Copy File | Delete File | Parse File Action|
|Generate Bar Code | Read Bar Code|
|Dynamic Task Call | Call Native Program | FTP Upload | Scorecard Collector | Create Graph | AS400 Action|
|Socket Client Action | Socket Server Action|
|JMS Producer | JMS Consumer|