Application Integration
Guide
Version: 11.2.2
Publication Date: 2016-10
Automic Software GmbH
ii Copyright
Copyright
Automic® and the Automic logo® are trademarks owned by Automic Software GmbH (Automic). All such
trademarks can be used by permission only and are subject to the written license terms. This
software/computer program is proprietary and confidential to Automic Software and is only available for
access and use under approved written license terms.
This software/computer program is further protected by copyright laws, international treaties and other
domestic and international laws and any unauthorized access or use gives rise to civil and criminal
penalties. Unauthorized copying or other reproduction of any form (in whole or in part), disassembly,
decompilation, reverse engineering, modification, and development of any derivative works are all strictly
prohibited, and any party or person engaging in such will be prosecuted by Automic.
No liability is accepted for any changes, mistakes, printing or production errors. Reproduction in whole or
in part without permission is prohibited.
Contents
1 CallAPI 1
1.4.1 C, C++ 12
1.4.2 Cobol 15
1.4.3 Java 17
2 Program Exits 21
3 Rapid Automation 24
4 AE.ApplicationInterface 26
4.1 Introduction 26
5 AE Internal Webservices 38
5.1 Introduction 38
6 AE.ResourceAdapter 46
6.1 ResourceAdapter 46
7 AE Release Manager 48
Glossary 51
A 51
C 51
D 51
G 51
I 52
J 52
P 52
R 52
S 53
T 53
U 53
V 53
W 53
Chapter1 CallAPI | 1
1 CallAPI
There are numerous ways of using AE - you can start executable objects, set or read contents of Variable
objects, get particular information about task states etc.
Use the script statement :PUT_READ_BUFFER to supply the script variables of an activated object
with values.
Scripts started via a CallAPI are displayed in the Activity Window and a statistical record including a report
is created. Use the selective statistics to search for it specifying type API or its RunID.
See also:
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.
l C, C++
l Cobol
l Java
l Visual Basic
Examples for this way of using the CallAPI are supplied for all supported platforms.
2 | Chapter 1 CallAPI
Write the script 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=client, user, [department [, password]]] [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.
The utility supplies several return codes that can be used to monitor script activation:
Return Description
code
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 Engine.
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 function parameters is specified. There are also errors that cause an output in the Message
Window of the UserInterface and/or the report 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 code 0 in such a case.
The RunID returned when running the utility is the CallAPI script's RunID.
Chapter1 CallAPI | 3
Login
The CallAPI requires a valid user in order to log on to the AE system. Login data consisting of client, user
name, department and user can either be defined in the INI file or directly assigned when the CallAPI is
called. The latter is preferred if login 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 variable 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.
Messages
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 object 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:
The CodeTable to be used is specified in the BS2000 CallAPI's INI file. Enter the name of the
CodeTable object in the parameter codetable= of the section [GLOBAL].
4 | Chapter 1 CallAPI
The AE CallAPI can be called from your own programs. This requires sound knowledge of the
programming language in which this program was written.
All the required parameters are assigned within the program. The program using the CallAPI must only
include or dynamically reload the large module UCCALL at runtime.
The supplied package includes the utility UCXBB2?C and is applicable in BS2000 procedures or "Enter"
jobs.
The utility reads the data required for logging on to the Automation Engine via SYSDTA. The AE Script to
be executed can either derive from a file or directly from SYSDTA. If a file is used, it must be assigned
before the program is called using the file-catenation name UCSCRIPT.
Example
In the first example, the file-catenation name UCSCRIPT is not assigned. The AE Script to be executed is
read until it reaches the SYSDTA command /EOF.
/FILE UCXBB22C.INI,LINK=INI
/EXEC UCXBB22C
04,RS,PROG,PASSWORD
:SET &RUNNR = ACTIVATE_UC_OBJECT(JOBS,EXAMPLE1)
:IF &RUNNR = '0000000'
: SET &ERROR = SYS_LAST_ERR_NR
: SET &ERROR = SYS_LAST_ERR_NR
: STOP MSG,51,'ACTIVATION ERROR: &ERROR'
:ELSE
: STOP NOMSG,50,'THE JOB WAS STARTED WITH RunID &RUNNR'
:ENDIF
/EOF
The following example returns the RunID, the error code and the error message from the CallAPI. These
three values will be written in a JV (job variable).
/CREATE-JV JV-NAME=#UC.RETCODE
/SET-JV-LINK LINK-NAME=UCRETC,JV-NAME=#UC.RETCODE
/CREATE-JV JV-NAME=#UC.RETTEXT
/SET-JV-LINK LINK-NAME=UCRETT,JV-NAME=#UC.RETTEXT
/CREATE-JV JV-NAME=#UC.RUNID
/SET-JV-LINK LINK-NAME=UCRUNID,JV-NAME=#UC.RUNID
/EXEC UCXBB23C
*INI
Chapter1 CallAPI | 5
See also:
The AE CallAPI may be called from your own programs. This requires sound knowledge of the
programming language in which this program was written.
The program ucxbxxxc.c is available as C source code. The corresponding structure definition is stored in
the file uccall3.h. Update the example with your data and adjust the JCL files to your environment. In doing
so, you create an RU and test the CallAPI.
The CD we supply includes the utility ucxbgc8c which may be called from a job.
The processing steps defined with AE Script are read from the standard input. The INI and script files may
also be defined using file code.
Example
In the second example, the CallAPI is called with the INI and script files being defined with file code.
$$dismiss
$ ident uc4
$ run rufile=uc4/callapi/exec/ucxbgc8c,
$ etc runame=ucxbgc8c
$ privity
$ limits 9999,,,50k
$ dmpopt savdmp=(mini)
$ data cz
$ ascii
$ prmfl SC,r,s,uc4/callapi/data/script
$ prmfl IN,r,s,uc4/callapi/data/ucxbgc8ci
ucxbgc8c ini=fc*IN script=fc*SC
$ endjob
See also:
It is possible to call the file UCCALL3.JAR from the command line or from a batch file. A sample file
(UCCALL3.BAT) explaining how to call it from a batch file is supplied with AE.
Example
The CallAPI is called with the login data of client 0098 and can be accessed without using a password.
The example activates an AE Script which is stored in the file SCRIPT.TXT.
java -jar uccall3.jar script=script.txt logon=98,smith,uc4
See also:
The utility UCXBNS1C is part of the AE package. It may be called from the command line of the relevant
operating system, from a script or a job.
Examples
Example 1
The first example calls the utility with the connection and login information being specified in the form of
parameters. The utility reads the processing instructions (AE Script) from the file "SCRFILE" which is also
specified in the form of a parameter.
run ucxbns1c script=SRCFILE LOGON=1000,SMITH,UC4
Example 2
The utility is called with the script file being specified in the form of a parameter. Connection and login data
as well as additional information are read from the INI file.
run ucxbns1c script=SRCFILE INI=UCXBNS1I
See also:
Define the CodeTable to be used in the INI file of the z/OS CallAPI. Enter the name of the CodeTable
object in the parameter codetable= of the section [GLOBAL]. IBM's default code table is used if this
parameter is empty.
The AE CallAPI can be called from your own program. This requires sound knowledge of the programming
language in which this program was written.
The delivery directory includes the utility UCXBM25C which is available in the load library. It can be used
in z/OS jobs.
The AE Script which is to be processed in the Automation Engine is read from SYSIN.
You can also use the data definition instead of the dataset names (see example).
If the utility should be used in a job, the user must be authorized to communicate via TCP/IP.
The parameter REGION= should be set at least to 65M, otherwise errors occur.
Example
See also:
The utility can directly be used without any adjustments being required.
The supplied utility UCXBO41C is found in the library and may be used in OS/400 CL scripts.
Chapter1 CallAPI | 9
Example
See also:
The RFC Server transfers the script to the AE system. It includes a function module called AE which can
be called in your ABAP programs.
The folder "sample" of the delivery directory includes example programs which show how it is best used.
Function Module AE
Parameter Description
Import Parameter client(4) type c AE client
trcflg(1) type c Trace flag
userabtl(200) type c Department of the AE user
username(200) type c Name of the AE user
userpass(32) type c Password of the AE user
Export Parameter msg(255) type c Message
run(10) type c Run number of the scripts
Tables script Script table (a total of 255 characters per line)
Example:
data: uscript(80) type c occurs 30 with header line
Exceptions logon-failed Logging on to AE was not successful
others Other error
10 | Chapter 1 CallAPI
See also:
The AE CallAPI can be called from your own programs. This requires sound knowledge of the
programming language in which this program is written.
The program UCXBXXXC.c is available as C source code. The corresponding structure definitions are
stored in the file UCCALL3.h. These files as well as the Makefile for compiling the example are available in
the directory /src. Update the example with your data. Adjust the Makefile MAKEFILE_EXAMPLE.??? to
your environment. Rename it MAKEFILE as otherwise it might be overwritten with the next update. It can
then be called with make because MAKEFILE is the default name. In doing so, you generate an EXE file
and test the CallAPI.
The utility UCXB???C is supplied with AE. It may either be called from the command line or an executable
file.
AE Script is used to define processing steps which are assigned as default input when the program is
called: The entry < file name reads the AE Script from the corresponding file. The entry <<EOF_SCRIPT
reads the AE script from the command line until the text "EOF_SCRIPT" is recognized.
Chapter1 CallAPI | 11
Example
In the first example, the utility is called with the AE Script being read from the file SCRIPT.TXT.
Connection and login specifications are read from the INI file.
./UCXBUI5C SCRIPT=./script.txt
See also:
The AE CallAPI may be called from your own program. This requires a sound knowledge of the
programming language in which this program was written.
The program UCXBVXXC.C is available as C source code. The corresponding structure definition is
stored in the file UCCALL3.H. This file and a command for compiling the example are found in directory
/src. Update the example with your data. Adjust the command file MAKEXAMP.COM to your
environment. In doing so, you generate an EXE file and test the CallAPI.
The delivery directory includes the utility UCXBV??C.EXE which may be called from a command file.
Processing steps defined with AE Script are read by the standard input.
See also:
The CallAPI utility may be executed using a VSE job. AE Script can be assigned to the utility via SYSIPT,
or made available via a file or a library element. Examples are provided in the supplied files "sample1.jcl"
and "sample2.jcl".
12 | Chapter 1 CallAPI
The utility's output provides further call information. The numbers Uxxxxxxx are AE Message numbers.
See also:
The AE CallAPI may be called from your own programs. This requires sound knowledge of the
programming language in which this program is written.
AE supplies the utility UCXBXXXC.EXE which can be called via the command line, in an MS-DOS box or
a batch file.
The CallAPI can be used via the utility without a special installation being required. Just make sure that the
utility can access the file UCXBWI3C.DLL.
Example
In the example, the utility is called with the login data of client 0098. Access is possible without a
password. The aim is to activate a AE Script which is stored in the file SCRIPT.TXT.
UCXBXXXC SCRIPT=SCRIPT.TXT LOGON=98,SMITH,UC4
See also:
For this, you need to integrate the files uccall3.h and ucxbwi3c.lib. Note that your program requires access
to the library ucxbwi3c.dll.
Chapter1 CallAPI | 13
The delivery directory contains sample programs that provide a detailed description of how a script
activation can be implemented.
General
You can log on to several AE systems at the same time and process various scripts. In this case, a
Dialog license is used for each connection.
Functions
In your programs, you can use the functions listed below. These supply return code 0 if the action was
successful or a message number if an error occurred.
Variables
Information such as the system name or the script's returned RunID is stored in the structure UCCALL_
PARAMS. It contains the following variables:
Allowed values:
"OPC_LOGON" - logs on to the AE system
"OPC_LOGOFF " - logs off the AE system
"OPC_ACTIVATE_SCRIPT" - activates a script
char cErrorCode The error code in cErrorCode is automatically set and can contain one
of the following values:
See also:
1.4.2 Cobol
The CallAPI can be used to process scripts in the AE system from your own Java programs.
The delivery directory contains sample programs that provide a detailed description of how a script
activation can be implemented.
General
You can log on to several AE systems at the same time and process various scripts. In this case, a
Dialog license is used for each connection.
Call
Call the CallAPI using the command CALL UCCALL3. Return code 0 is supplied if the action was
successful or a message number if an error occurred.
Description Call
16 | Chapter 1 CallAPI
Logging on to the AE system CALL UCCALL3 USING structure, login data, connection
Variables
The supplied sample program explains the structure AE-RECORD. It contains the following variables:
Allowed values:
"OPC_LOGON" - logs on to the AE system
"OPC_LOGOFF " - logs off the AE system
"OPC_ACTIVATE_SCRIPT" - activates a script
UC-ERROR- PIC X The error code in cErrorCode is automatically set and can contain one
CODE of the following values:
UC-FLAG1 PIC X Depending on the specified value, this flag results in one of the
processing options listed below:
See also:
1.4.3 Java
The CallAPI can be used to process scripts in the AE system from your own Java programs.
This requires the class UCCALL3 to be imported from the package com.uc4.uccall3.
The delivery directory contains sample programs that provide a detailed description of how a script
activation can be implemented.
Detailed information about the Java class is provided in the included documentation.
18 | Chapter 1 CallAPI
General
You can log on to several AE systems at the same time and process various scripts. In this case, a
Dialog license is used for each connection.
Methods
See also:
This function is found in the COM object AE.Call3 which must be registered.
The delivery directory contains a sample program that provides a detailed description of how a script
activation can be implemented.
General
You can log on to several AE systems at the same time and process various scripts. In this case, a
Dialog license is used for each connection.
Methods
In your program, you can use the functions listed below. They supply return code 0 if the action was
successful, or a message number if an error occurred.
Description Method
Logging on to the AE system Logonclient, user, [department, [password]]
Specifying INI file SetIniFile path and name of INI file
Logging on using INI-file data LogonAsDefault
Activating a script ActivateScript script
Logging off the AE system Logoff
Attributes
See also:
2 Program Exits
Also, the Automation Engine provides a password exit which can be used to verify or - where necessary -
reject attempts to log on to the AE system via a custom-developed program library. The password exit is
called for any type of AE user logon (UserInterface, CallAPI).
When using the password exit for verifying user authentication, the AE-specific authentication information
(users with the appropriate rights and privileges) must be available in the AE system.
Requirements
It is necessary to implement a program library which contains the following C functions:
The password exit has a higher priority than the LDAP connection if both are activated. If the states
"authenticated" or "access denied" are returned, the LDAP connection is not called at all. It is only
called if the password exit is inactive or has been deactivated.
Chapter2 Program Exits | 23
Installation Procedure
l Copy the generated program library to all computers on which WP Servers are started. The
indicated path must always be the same as it is specified in the variable UC_SYSTEM_SETTINGS
only once.
Automic strongly recommends copying the generated library to the Server installation directory.
See also:
variable UC_SYSTEM_SETTINGS
Encoding Passwords
24 | Chapter 3 Rapid Automation
3 Rapid Automation
RA Solutions
Each RA Solution has its own individual function but there are some similarities in all RA Solutions. The
corresponding RA agent requires specific settings. Therefore, an RA Solution includes a template for the
Agent object that should be used. Connection data can be specified in one or several Connection objects.
The RA Solution also includes the required object templates. The same is true for Job objects. Each RA
Solution includes one or several job types that can be used to call the relevant functions.
The contents of agent, Connection and Job objects depend on the particular RA Solution.
RA Solutions are supplied as JAR files and can be loaded to the AE database by using the utility
AE.DB Load. The utility reads the JAR file and creates the following objects in system client 0000:
The utility AE.DB Load automatically enters the new templates into the variable UC_OBJECT_
TEMPLATE.
The utility AE.DB Load can also be used to load later versions of an RA Solution. The former version is
automatically replaced in the AE database.
You can delete an RA Solution from the AE system by deleting the corresponding RA Solution object in
client 0 (folder: RA_SOLUTIONS). The object including its entries is not moved to the Recycle Bin but
is completely removed from the AE database.
For Rapid Automation agent documentation, see the Automic Hosted Documentation.
RA Agent
An RA agent can only connect to one RA Solution. If you intend to use several RA Solutions, you need a
separate RA agent for each solution.
Chapter3 Rapid Automation | 25
An Agent object must be created in system client 0000 before the RA agent is put into operation. Use the
supplied agent template for this purpose. An Agent object contains the Connection objects that should be
used for logging on etc. Create these Connection objects by using the supplied templates.
When the RA agent starts, it checks whether the RA Solution has already been stored locally. If not, it
requests the RA Solution's JAR file from the Automation Engine. The RA agent unpacks it in the folder
"cache" (the path has been specified in the INI-file parameter cache_directory=). The name of the created
subfolder is the RA Solution object's latest modification date. While starting, the system checks whether
this time stamp complies with the AE database's time stamp. If they differ from each other because a later
version has been loaded to the AE database, the RA agent retrieves the JAR file and replaces the local RA
Solution.
RA Jobs
RA jobs include two object type-specific tabs. The first one is the RA tabwhich includes the options for
report creation and transfers. The name of the second tab is preset by the RA Solution. It includes the RA
job's specific configurations. Possible attributes that apply to all the RA Solution's job types are displayed
in a separate subtab. In this case, the tab includes two subtabs instead of one.
A traffic-light symbol is displayed in the tab whose content is preset by the RA Solution. It displays the
connection status to the RA agent:
Note that a positive connection status (green traffic-light symbol) will only be displayed if a valid RA
agent has been specified. In the following cases, it cannot be displayed:
No Login objects are required in RA jobs. Login data is stored in the agent object.
Open the RA Solutions help by clicking "Solution Help" in the RA job's Solution tab (RA Banner job) or
FTP tab(RA FTP job).
You can also set and read the attributes of the tab that is preset by the RA Solution via script. To change
these attributes using the utility AE DB Change, see the relevantdescription.
A tooltip text displays the attribute names in the UserInterface. Another method to retrieve the attribute
names including their values is to run the following command in the AE database (replace the JOBNAME
by the job's actual object name):
select OCV_VName,ocv_value from OCV,oh where OCV_OH_Idnr=OH_Idnr and oh_
name='JOBNAME'
To run this command, you can also use an SQLI-type VARA object.
26 | Chapter 4 AE.ApplicationInterface
4 AE.ApplicationInterface
4.1 Introduction
The ApplicationInterface is an interface that facilitates access to the AE system.
The interface comprises hundreds of classes and methods which can be used to call many of the
UserInterface's functions such as creating and editing objects, accessing statistical records, accessing
the System Overview, reading reports, starting tasks, etc. All actions are kept for the Revision Reports
and can be listed using the utility AE Revision.
File Description
uc4.jar ApplicationInterface Java library
*.dll ApplicationInterface .NET library (for .NET programming languages such as C# and
VisualBasic)
*.zip Archive with IKVM runtime libraries which are required for using the .NET library. The
DLL files in the archive must be added to the respective .NET project.
doc.zip Javadoc (Java documentation) which contains a list and description of all classes and
methods.
The names of the Java library classes/methods are the same as those in the .NET
library.
examples.zip Sample Programs
All sample codes in the following documents work with the programming languages Java and C#. For
other programming languages, the syntax in the examples should be adapted as appropriate.
There are numerous ways of using the ApplicationInterface. For example, you can automatically create
many objects at the same time, or release only a relevant processing selection to users. This interface is
an ideal addition to extend your existing programs, as it facilitates access to your AE system.
Access via the ApplicationInterface must be made with an AE user and are subject to the authorization
system.
The ApplicationInterface functions may vary depending on the Automation Engine version in use.
Automic recommends reconverting your projects when you install a new version.
It is important that you do not confuse the ApplicationInterface with the CallAPI for Java, which serves
to execute an AE Script in the AE system.
Note that the ApplicationInterface cannot be called from Enterprise JavaBeans. For this, use the
ResourceAdapter.
Also see:
Data between the program and the AE system is exchanged via "Requests". Keep in mind that you should
establish a connection to the AE system and log on to a client, as otherwise requests cannot be sent or
received.
Procedure
The following steps are always required, regardless of how your program is used:
3. Any number of requests can be sent now (e.g., searching for an object). These requests are sent
synchronously or asynchronously using the methods "sendRequestAndWait" and "sendRequest".
uc4.sendRequestAndWait(WinJobs);
uc4.sendRequest(WinJobs, Handle);
Now access the request result (e.g., search result).
Requests are used for retrieving information from or executing an action in the AE system. The
supplied package includes several examples which describe how the AE.ApplicationInterface is best
used. Additionally, the documents shown below provide information about the most important classes.
See also:
Do's
l Log on - execute all actions - log off.
l Open objects in read-only mode if no modification is being made.
l Modify rather than delete and recreate.
l Only use what is required.
28 | Chapter 4 AE.ApplicationInterface
l Use mass functions instead of many individual actions if applicable (no mass function available:
contact Automic Support).
l Execute complex mass modifications via the AE.ApplicationInterface in a non-production AE
environment and transfer your modifications to the production system using the corresponding
utility.
Don'ts
l Loops without waiting time (especially for status queries)
l Creating/modifying an object and storing it repeatedly
l Huge and numerous searches using the class "SearchObject"
Important Notes
l The AE.ApplicationInterface mainly facilitates the automation of user interactions.
l When reviewing applications, put the main focus on recurring processes (especially in processing
loops) as performance gains are most likely here.
l In high-volume processing using the AE.ApplicationInterface, weigh up the importance of a fast
processing time with the importance of non-impaired production system performance. If the
performance of the production system is more important, use the AE.ApplicationInterface in such a
way that processing is distributed evenly over a longer period of time (e.g. through waiting queues).
l The aim should be to send as few queries as possible to the Automation Engine. Only call the
methods Connection.sendRequest() and Connection.sendRequestAndWait() if necessary.
Creating Objects
First retrieve the client's folder structure using the class "FolderTree". As this is a request, method
sendRequestAndWait is called. Now determine the folder in which the object should be created. Object
names must not contain particular characters; hence they have been implemented in an extra class.
Select an object name via "UC4ObjectName". The object is created via the class "CreateObject".
Subsequently, call the method sendRequestAndWait in order to transfer the request to the AE system.
FolderTree tree = new FolderTree();
uc4.sendRequestAndWait(tree);
IFolder folder = tree.getFolder("/MATERIAL_MANAGEMENT/DAILY_CLOSING");
Creating Folders
Folders are objects and are created in the same way as all other objects.
UC4ObjectName fname= new UC4ObjectName("PRODUCTION");
CreateObject create = new CreateObject(fname, Template.FOLD, folder);
uc4.sendRequestAndWait(create);
Editing Objects
Use the class "OpenObject" to open the object to be edited. This class contains methods which can be
used to query particular information. The example shown below checks whether the object is a UNIX job.
If so, the class "Job" can be used to set specifications and attributes in the Job object. Note that the
names of users, agents and TimeZone objects have been implemented in extra classes because different
naming conventions apply to them.
After the object has been edited, it must be transferred and stored using a request. This is done via the
class "SaveObject" which contains the relevant methods. Keep in mind to close the object afterwards.
OpenObject open = new OpenObject(name);
uc4.sendRequestAndWait(open);
if (open.getType().equalsIgnoreCase("JOBS_UNIX"))
{
Job job = (Job) open.getUC4Object();
job.header().setArchiveKey1("Material_Management");
job.attributes().setPriority(100);
job.attributes().setHost(new UC4HostName("UNIX01"));
job.setPostProcess(script);
Deleting Objects
Use the class "DeleteObject" to delete objects:
DeleteObject delete = new DeleteObject(name);
uc4.sendRequestAndWait(delete);
Searching Objects
The class "SearchObject" can be used to search for objects. Search parameters can be defined the same
way as in the UserInterface. The example shown below searches for workflows whose names commence
with "FIAC". The request supplies a result which can be filtered with an iterator. Information such as the
object name can be retrieved for each result.
SearchObject search = new SearchObject();
search.setTypeJOBP(true);
search.setName("FIBU*");
30 | Chapter 4 AE.ApplicationInterface
uc4.sendRequestAndWait(search);
if(search.size() > 0)
{
Iterator it = search.resultIterator();
while(it.hasNext())
{
SearchResultItem result = (SearchResultItem) it.next();
System.out.println("Result: " + result.getName());
}
}
See also:
For compatibility reasons, the class names still show the name JobPlan that has been used prior to AE
v8 instead of the new name workflow.
task1.calendar().addCalendarCondition(calecond);
task2.dependencies().addDependency(task1,TaskState.ENDED_OK);
jobplan.addTask(task1);
jobplan.addTask(task2);
jobplan.addTask(task3);
jobplan.closeJobPlanTasks(null);
jobplan.format();
task1.setStartTime(new Time("08:00"));
task2.setStartTime(new Time("10:30"));
schedule.addTask(task1);
schedule.addTask(task2);
See also:
Starting Objects
Use the class "ExecuteObject" to activate objects and get information about the activated object.
ExecuteObject execute = new ExecuteObject(new UC4ObjectName("MM.DAY"));
uc4.sendRequestAndWait(execute);
System.out.println("RunID of the activated task: " + execute.getRunID());
Iterator it = list.iterator();
if(list.size() > 0)
{
while(it.hasNext())
{
Task task = (Task) it.next();
System.out.println("result: " + task.getName());
}
}
// Restart task
ResumeTask go = new ResumeTask (task1.getRunID(), false);
uc4.sendRequestAndWait(go);
Chapter4 AE.ApplicationInterface | 33
// End task
QuitTask quit = new QuitTask (task1.getRunID());
uc4.sendRequestAndWait(quit);
// Deactivate task
DeactivateTask deactivate = new DeactivateTask (task1.getRunID());
uc4.sendRequestAndWait(deactivate);
// Cancel task
CancelTask cancel = new CancelTask (task1.getRunID(), true);
uc4.sendRequestAndWait(cancel);
System.out.println("Run ID:"+exec.getRunID());
//Read report
Report act = new Report(exec.getRunID(), "ACT");
System.out.println(act.getReport());
See also:
uc4.sendRequestAndWait(statistic);
if(statistic.size() > 0)
{
Iterator it = statistic.resultIterator();
while(it.hasNext())
{
StatisticSearchItem result = (StatisticSearchItem) it.next();
System.out.println("Result: " + result.getParentRunNumber());
System.out.println("Result: " + result.getReturnCode());
System.out.println("Result: " + result.getStatusText());
}
}
Reading Reports
The class "Report" and the RunID of the execution are required for reading reports. The RunID is retrieved
using the class "LatestReport" which supplies the particular report pages in the form of a string. Keep in
mind that a request must be sent for each individual page.
int i = 1;
page = report.getReport();
if( (page.indexOf("cd Temp")) != -1)
{
System.out.println("found");
}
report.nextPage(i);
uc4.sendRequestAndWait(report);
i++;
}
See also:
Iterator it = list.iterator();
while(it.hasNext())
{
ServerListItem item = (ServerListItem) it.next();
System.out.println(item.getName());
}
See also:
You can use the existing Java code or adjust it according to your requirements.
Use the following command-line parameters in order to call the sample program:
l <go/stop>
Possible values: "go" or "stop".
"go" - Starts the client and "stop" - Stops the client.
l <cp> = The IP address or the name of the CP computer.
l <port> = The port number of the CP.
l <client> = The four-digit client number.
l <user> = The name of the AE user.
l <pwd> = The user password.
To be able to call the program successfully, you will need the Java Application Interface (uc4.jar).
36 | Chapter 4 AE.ApplicationInterface
import java.io.IOException;
import com.uc4.communication.Connection;
import com.uc4.communication.requests.CreateSession;
import com.uc4.communication.requests.ResumeClient;
import com.uc4.communication.requests.SuspendClient;
import com.uc4.communication.requests.XMLRequest;
new aeClientGoStop().gostop(args);
}
//Login
CreateSession login = uc4.login(Integer.parseInt(client),user,dep,pwd,'E');
System.err.println(login.getMessageBox().getText());
uc4.close();
System.exit(1);
}
} else if (action.equals("stop")){
rqr = new SuspendClient();
}
uc4.sendRequestAndWait(rqr);
if (rqr.getMessageBox() != null) {
System.err.println(rqr.getMessageBox().getText());
uc4.close();
System.exit(3);
}
uc4.close();
System.out.println("done action: " + action + " client: " + client);
}
};
38 | Chapter 5 AE Internal Webservices
5 AE Internal Webservices
5.1 Introduction
The AE Internal Webservice is a Web service that you can use to access the AE system. Numerous
operations are available. For example, you can start objects, access task details or read System Overview
areas.
The supplied WSDL file AE.wsdl includes a description of all available operations. Therefores, you can
quickly and easily create Web clients which call the AE Internal Webservice.
Accesses made via the AE.ApplicationInterface require an AE user and are subject to the authorization
system.
The AE Internal Webservice is bound to a particular AE system. You can deploy this Webservice several
times if you want to use it in several AE systems.
See also:
Two methods are available for accessing the AE system via the Webservice.
You can use any programming language to create a Web client. The following examples are written in
Java.
This port can be used to call Webservice operations and, for example, a list of all the client's agents.
List<AgentListItem> list = port.getAgentList();
A port of type "Uc4PortType" is again required for the communication with the Webservice.
Chapter5 AE Internal Webservices | 39
Log on using the operation logon. The AE user is assigned via the corresponding parameters. The return
code is a session ID which can be set in the HTTP Header. By doing so, it will automatically be assigned
whenever this operation is called.
try{
String sessionID = port.logon(100, "SMITH", "UC4", "top-secret password",
(bytes) 'D');
if(requestHeaders == null) {
requestHeaders = new HashMap<String, List<String>>();
context.put(MessageContext.HTTP_REQUEST_HEADERS, requestHeaders);
}
requestHeaders.put("id", Arrays.asList(sessionID));
} catch(UC4WSException e){
System.out.println("ERROR: " + e.toString());
}
You can use the port to call the Webservice operations and, for example, read database information from
the System Overview:
DatabaseInformation dbInfos = port.getDatabaseInfo();
String dbName = dbInfos.getDbName();
The Webservice automatically closes connections that have not been used for a particular period of
time. You can define this timeout length in the configuration web interface.
read.add(p1);
Only one value list is required even if an object has several :READ masks.
Because values are assigned via entry field labels, Automic recommends creating unique labels in
order to avoid confusion.
For performance reasons, Automic recommends using one larger :READ mask instead of using
several individual ones.
Error Handling
Errors occur for the following three reasons:
1. The Webservice cannot establish a connection to the Automation Engine (e.g. the communication
process is not available, invalid login data etc.)
2. Runtime error while processing an operation (e.g. the object to be started does not exist)
3. The SOAP message the Web client sends to the Webservice is invalid.
The Webservice provides the exception UC4WSException. It contains an information field which includes
the message number and text. It also informs about the type, which can either be "CONNECT" if the error
occurred while attempting to establish a connection or "REQUEST" if operation processing was
erroneous.
try{
} catch(UC4WSException e){
System.out.println("Error number: " + e.getFaultInfo().getId();
System.out.println("Error text: " + e.getFaultInfo().getMessage);
}
The language that is used to transfer message texts to the Web client depends on the time the error
occurred:
See also:
Webservice Operations
Chapter5 AE Internal Webservices | 41
Logon/Logoff
Description Operation Parameters Return code
Logon logon Client, user name, Session ID
department, password,
language
AE System Information
Description Operation Parameters Return code
Retrieving the getVersion - Automation Engine
Automation version
Engine version
Example: 8.00A909-
including the
001
hotfix number
Retrieving getDatabaseInfo - Type
database DatabaseInformation
information (see
Use this type to
System
query individual
Overview -
information such as
Database)
the database name.
Client Information
System client 0000 supplies a list of all the AE system's users, agents etc. If you log on to a user-
defined client, only this client's objects will be supplied. This list corresponds to the content of the
System Overview.
Possible values:
"LOW" - Low
"MEDIUM" -
Normal
"HIGH" - High
Chapter5 AE Internal Webservices | 43
See also:
6 AE.ResourceAdapter
6.1 ResourceAdapter
With the ResourceAdapter, you can use the ApplicationInterface from Enterprise JavaBeans (EJB). Due
to technical limitations, you cannot use the ApplicationInterface directly from an EJB. The
ResourceAdapter does not run in the Enterprise JavaBean Container. It is therefore not bound to these
limitations.
Using the ResourceAdapter and the ApplicationInterface differs in only two points:
l Connection establishment
l Logon
All other classes are used in the same way as when the ApplicationInterface is directly accessed.
Connection Establishment
The J2EE Server administers a pool of connections in the Java Connector Architecture (JCA). The EJB
must request a connection from it (if required). The J2EE Server either uses a suitable connection from the
pool or generates a new one via the ResourceAdapter which is then stored in the pool.
The computer and port number of a communication process are required for establishing a connection via
the ApplicationInterface.
Connection uc4 = Connection.open("PC01",2080);
Both parameters are part of the configuration if the connection is established via the ResourceAdapter.
You obtain a pre-configured instance of a ConnectionFactory via a JNDI Lookup. At this point in time, it is
not necessary that a connection to the communication process exists.
Context initctx = new InitialContext();
ConnectionFactory factory = (ConnectionFactory) initctx.lookup
("java:comp/env/eis/UC4");
Logon
The JCA distinguishes two logon types:
1. Component-managed sign-on
The EJB supplies login data.
2. Container-managed sign-on
The J2EE Server supplies login data. The EJB does not require access data such as user name or
password.
Login data is required in order to establish the connection using the ApplicationInterface. The method
isLoginSuccessful can be used to query whether the login procedure was successful.
CreateSession login = uc4.login(98,"MEIER","UC4","pass",'D');
if (!login.isLoginSuccessful()) {
...
}
Chapter6 AE.ResourceAdapter | 47
When establishing a connection using the AE.ResourceAdapter, the method getConnection of a factory is
used (supplied via a JNDI Lookup) to execute a TCP/IP connection plus login. The following methods are
possible:
The configuration of the ResourceAdapter is used for the Server, port, client, department and
language. The J2EE Server supplies the user name and password which have been used to log on
to the J2EE Server (Single Sign-on).
With this method, all login data is entered in the EJB. This data has a higher priority than data used
for configuring the ResourceAdapter. If one or several parameters are not indicated, the
corresponding one of the configuration is used. If the attempt to log on was not successful, a
ResourceException is triggered whose text describes the error in more detail.
Only the client, department and language must be indicated in the EJB. User name and password
are supplied by the J2EE Server (see method 1).
Usage
Java classes of the ApplicationInterface are used in the same way as when the ApplicationInterface is
used directly (except for connection establishment). A simple example is shown below; it executes the
object MM.DAY.
Context initctx = new InitialContext();
ConnectionFactory factory = (ConnectionFactory) initctx.lookup
("java:comp/env/eis/UC4");
AdapterConnection uc4 = factory.getConnection();
See also:
ApplicationInterface
48 | Chapter 7 AE Release Manager
7 AE Release Manager
You require an Automation Engine for both, the Enterprise Control Center and the ARA because they use
the Automation Engine's user and authorization system.
Deployment workflows are defined in the ECC or the UserInterface of the Automation Engine. Note that
you must define them in a way that they can be used and activated by Application Release Automation.
When you use the UserInterface for your definitions, you must configure the Deployment tab of the
related workflow that should be used as the deployment workflow.
You can only define deployment workflows in AE clients in which the setting DEPLOYMENT_CLIENT
of the variable UC_CLIENT_SETTINGS is set to "Y".
When you have created the required deployment workflows, you can activate the installation procedures
using Application Release Automation. The parameters of the applications are now passed from the
Release Manager to the Automation Engine and the related deployment workflows start.
You can also start deployment workflows directly in the Automation Engine or the Enterprise Control
Center. For this purpose, the relevant data is retrieved from Application Release Automation and the
workflow is updated.
General
Deployment workflows are workflows that were specially defined for Application Release Automation.
Deployment workflows are usually activated via Application Release Automation and all
values/parameters are forwarded to the Automation Engine. However, it is also possible to start workflows
like this via the Automation Engine UserInterface. In this case, all parameters/values required to execute
the deployment workflow are determined by Application Release Automation.
Requirements
JWP
Within the Automation Engine system, a Java-based work process (JWP) must be installed and started.
The JWP installation instructions can be found in the Administration Guide.
UC_CLIENT_SETTINGS
The following settings must be set in the UC_CLIENT_SETTINGS VARA object in every client in which
deployment workflows are to be started:
UC_CLIENT_SETTINGS Description
Setting Value
ARA_WS_INT URL to the desired Full URL (including protocol and port) of the Application
Application Release Release Automation instance
Automation instance
50 | Chapter 7 AE Release Manager
keytool -import -keystore cacerts -file <Path and file name of the certificate>
Next, enter the Java keystore password and confirm the "Trust this certificate?" request with "yes".
How the HTTPS certificate for the ARA Web application is set and exported is described in the
Application Release AutomationARA documentation.
Workflow
If a workflow that was configured as a deployment workflow via the Deployment tab is activated, the
Automation Engine sends a request to the ARA instance (1). Specifically, the deployment descriptor is
requested – a package with all of the parameters required to execute the deployment workflow. In the next
step (2), general parameters of the Automation Engine (workflow RunID, content of the Deployment tab
such as workflow name and application name), which are required for the request, are transmitted to ARA.
In the final step (3), the ARA instance transmits all of the parameters/ values to the Automation Engine and
the workflow is continued.
Workflows waiting for the ARA parameter have the following status:
Glossary
This glossary lists all specific technical terms in alphabetical order.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
A
l ARA Client
Refers to a computer on which a ARA/Deployment Manager/Automation Engine user works.
l admin computer
Admin computer refers to the computer that is used by an administrator for e.g. Automation Engine
or database administration purposes.
C
l configuration
A set of constituent components that make up a system. This includes information on how the
components are connected including the settings applied.
D
l Download Center
The Download Center (http://downloads.automic.com/) is the place where you find everything you
need to know about your Automic solution to make sure you are using our products to their fullest
potential.
l database
A database is an organized collection of data including relevant data structures.
l department
Department name to which the Automation Engine user belongs.
G
l graphical user interface
A graphical user interface (GUI) is a human to machine interface based on windows, icons and
52 | Chapter Glossary
I
l ILM
Stands for Information Lifecycle Management, which refers to a wide-ranging set of strategies for
administering storage systems on computing devices.
J
l Java work process
The Java work process, implemented in Java, is used to host special services, which have been
developed in Java.
P
l package module
A package module is a group of related package types, e.g. Feature, Change Request, or Bug. It
defines how the packages are displayed in the GUI and the features enabled for each package type.
l password
A secret combination of characters for a Automation Engine user.
R
l RichClient
Deprecated Term. Replaced by: UserInterface
l rollback scope
The scope of a workflow to roll back. For a rollback on a job the scope is this single task while for a
rollback on a workflow the scope is this workflow and all sub-workflows in arbitrary depth.
Chapter Glossary | 53
S
l Service Manager
The Service Manager serves to start, stop and access components such as the Automation Engine
processes or agents from a central point.
T
l token
A token is used for authentication within a session between a client and a server. A (soft) token is a
unique identifier which is generated and sent from a central server to a client software. The client
uses the token to authenticate each request.
U
l user name
Name of the Automation Engine user.
V
l vSphere
vSphere is a virtualization platform for building cloud infrastructures by VMware.
W
l web application
A web application is an application that is accessible over a network (Internet or intranet) and is
typically coded in a programming language like Java or JavaScript, combined with a markup
language like HTML. Web applications are provided on web servers and web browsers are used as
GUI on client computers.