How to Use an External Interpreter

In order to use external interpreters in the Automation EngineDiese Komponente steuert ein Automation Engine-System. Besteht aus verschiedenen Serverprozessen., you have to configure the relevant system variables and use the script element appropriate. The following document describes this using the example of the Perl programming language.

Define an External Interpreter

An external interpreter can be defined in the following variables in client 0000:

These interpreters are available to all clients.

The image below shows the UC_EXT_INTERPRETERS_WINDOWS and _UNIX system variables respectively (in the front UC_EXT_INTERPRETERS_UNIX, VariableSpeichert oder ermittelt Werte dynamisch zur Laufzeit. Auch ein eigener Objekttyp in der Automation Engine. tab):

 

Invoke an External Interpreter

The following example invokes a piece of Perl script using the PERL interpreter (use in the Process tab of a JobVerarbeitung auf einem Zielsystem. Auch ein eigener Objekttyp in der Automation Engine. object):

:BEGIN_EXT_INT PERL

 

  printf("*** Hello World from Perl! *** \n");

  @files = qx|dir c:\\*.txt |;

  print @files;

 

:END_EXT_INT PERL

The above script results in a call like the following:

perl {Path to agent directory}\Resources\{client number}\{runid}\{runid}_0001.pl

where the Perl file {runid}_0001.pl contains the content of the script block.

If multiple :BEGIN_EXT_INT blocks are used, the number counter will differentiate the generated files.

Comments

Automic script variables can be mixed with native script.

Return a Variable

Define the external interpreter scripts in the system variables REGISTER_VARIABLE.WINDOWS and REGISTER_VARIABLE.UNIX (Job Includes) respectively.

Inside a :BEGIN_EXT_INT and :END_EXT_INT block, the script statement :REGISTER_VARIABLE will report a string value back to an Automic variable in AE.
Then, any script following the block can use that variable.

Example

:REGISTER_VARIABLE "Perl", "Hello World from Perl!"

This does work, if you define the external interpreter and the variable in the Process tab of a Job object.

However, should you use a script attached as binary to a Storage object, a variable configured using :REGISTER_VARIABLE would not be usable by the AE system, as the script binary will be transferred to the agent directly.

See also: