The CallAPIA programming interface that processes a script in the Automation Engine system. It can be called directly from within the program itself or from a different program. is available on various platforms and can be used for many purposes. Read more about its usage and the most important settings below.
CallAPI installation and INI files are described in the Administration Guide.
There are two ways to use the CallAPI. AE Script is limited to 32000 characters for both ways.
The first possible way you can use the CallAPI is to call it from your own programs. These programs can be written in the following programming languages:
Examples for this way of using the CallAPI are supplied for all supported platforms.
No programming knowledge is required in order to use the CallAPI in the second way. A utility is provided for each supported platform. The utility can be called from jobs, procedures, executable files or directly from the command line. Different methods are available for use, depending on the operating system.
Write the scriptA particular Automation Engine object type. in a text file and assign this file when calling the utility. The following syntax applies for all platforms:
CallAPI file SCRIPT=script file [LOGON=clientA closed environment within an Automation Engine system where you can create and run objects. A client name consists of a 4-digit number that must be indicated when a user logs on to the Automation Engine system. Users and their rights are also defined in clients. A particular Automation Engine object type., userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management., [departmentDepartment name to which the Automation Engine user belongs. [, passwordA secret combination of characters for a Automation Engine user.]]] [INI=INI file]
Parameter |
Description |
---|---|
SCRIPT= |
Path and name of the script file Login data can be omitted if it has already been specified in the INI file. |
Optional: |
|
LOGON= |
Login data |
INI= |
Path and name of the INI file This parameter is required if the INI file has been renamed or moved to another directory. |
Example of calling the CallAPI in Windows:
UCXBXXXC SCRIPT=C:\AUTOMIC\CALLAPI\script.txt LOGON=98, SMITH, AE INI=C:\AUTOMIC\CALLAPI\WINDOWS\ucxbxxxc.ini
The utility supplies several return codes that can be used to monitor script activation:
Return code |
Description |
---|---|
0 |
AE Script was activated without error. |
4 |
AE Script was activated, but then terminated with the script statement :STOP MSG, 50, "Any text." |
8 |
Error when activating script or the AE Script was terminated with the script statement :STOP MSG, 51 - 59, "Any text." or :STOP, NOMSG |
12 |
Error when logging on to the Automation EngineThis component drives an Automation Engine system and consists of different types of server processes.. |
16 |
Fatal error: The script file could not be opened or read. |
Note that the start parameters for the RFC Server for SAP are different. There is only one parameter, -I, that specifies the path to the INI file.
Note: Return code 8 is displayed if the activation of AE Script has been canceled because of an error and cannot be continued. This can happen if a script element is not spelled correctly, or if an incorrect number of functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… parameters is specified. There are also errors that cause an output in the Message WindowA window that appears on the user interface and contains information, warning, and error messages. of the UserInterfaceThis is the Automation Engine's graphical user interface. [Formerly called the "Rich Client", "RichGUI" and "Dialog Client."] and/or the reportA report provides more detailed information about a task's execution or a component. but do not cause the AE Script to abort. This can happen if the commands ACTIVATE_UC_OBJECT and IMPORT include errors. The utility always ends with the return codeThe value that represents the result of tasks and script functions. 0 in such a case.
The RunIDShort for "run number". It is a number that provides unique information about a task's execution. The RunID can include 7 to 10 digits. It is assigned by the Automation Engine component . returned when running the utility is the CallAPI script's RunID.
The CallAPI requires a valid user in order to log on to the AE system. Login data consisting of client, user nameName of the Automation Engine user., department and user can either be defined in the INI file or directly assigned when the CallAPI is called. The latter is preferred if loginAn Automation Engine object type that stores account credentials used by agents on target systems. data is stored in both locations.
The user logging on to the AE system via CallAPI must have the privilege "Logon via CallAPI."
The AE user must have the appropriate authorizations in order to execute scripts.
Your password can be encrypted with the program UCYBCRYP. Note that the encrypted string must not exceed 64 characters.
The CallAPI can be used without password verification. The advantage of this is that the password is not stored in programs or procedures. Thus, it is not necessary to change it every time a new password is assigned. It is also possible to store the data for automatic login in the variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. UC_USER_LOGON.
The above description shows that CallAPI usage requires the same procedure as manual login. Therefore, it uses a free Dialog license for each connection. Use the key RESERVED_API_USERS in the variable UC_SYSTEMS_SETTINGS (available in system client 0000) to reserve a number of Dialog licenses for CallAPI logins. This way, CallAPI and manual user logins do not block each other.
The CallAPI requires connection information for relevant communication processes in order to activate the script in the required AE system. Enter this connection information in the INI file. In CallAPI calls from your own programs, these can be directly assigned.
The script statement :STOP assigns message numbers and texts to the CallAPI. These are stored in variables and can be read with your own programs. The names of these variables depend on the programming language. Further details are provided in the chapter "Using CallAPI with your own Programs."
Call the CallAPI's utility with a Job objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task in order to view report messages.
Depending on the syntax used in the script function :STOP, the script either aborts or continues to run.
See also:
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |