Best Practice Guide
Transcription
Best Practice Guide
Automation Engine 9 Best Practice Guide Version: 9.12.0 Date: 2015-03 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. © Copyright Automic Software GmbH. All rights reserved. Automation Engine iii Contents 1 Dos & Don'ts in UC4 1 2 Test and Production System 2 2.0.1 General 2 2.0.2 Three-system environment 2 2.0.3 Maintaining your UC4 systems 3 3 Security in UC4 Systems 3.0.1 Measures 4 Controlled Computer Restart 4 4 5 4.0.1 General 5 4.0.2 Preparations 5 4.0.3 Procedure 6 5 Assigning and Using Values 7 5.1 Variable objects 7 5.2 Object variables 8 5.3 Input buffer 8 6 Useful Calendar Keywords 10 6.0.1 Weekly 10 6.0.2 Monthly 10 6.0.3 Yearly 11 6.0.4 Group 11 6.0.5 Roll 11 Glossary 13 1 Chapter 1 Dos & Don'ts in UC4 1 Dos & Don'ts in UC4 UC4 strongly recommends keeping the following in mind in order to make best use of your UC4 system. Dos l l l l l l l Run a UC4 system for production plus a test system. Use an authorization system, encryption and authentication in order to ensure secure processing. Regularly maintain the UC4 Database using the available utilities and database processes. Use UC4's object orientation in order to keep your processing steps well structured. Store Calendar objects centrally in order to make them accessible for all tasks. Use Include objects in scripts wherever applicable. Check return codes for potential errors in all processing steps. Don'ts l l l l l l l Do not directly modify UC4 Database contents without using UC4 programs. Do not implement modifications and extensions without prior planning. Do not use newly created or modified Jobs, Workflows etc. in your production system without checking the test system beforehand. Do not assign object names without an adequate naming structure. Do not select non-descriptive names for objects, Agents, script variables etc. Do not divert UC4 functions from their intended use. Do not activate traces without being assisted by the UC4 support team. Automation Engine 2 2 Test and Production System Guidelines for using UC4 2.0.1 General A UC4 system is an environment which can be handled and monitored with UC4. This includes UC4 components such as the UC4 Automation Engine and Agents, their computers, applications and processing which can be defined via objects. We strongly recommend working with three UC4 systems. The first system serves to plan and create the objects which represent your processes (development system). A second UC4 system should be used to test all processes. The third one is used to execute your daily business processes (production system). There is a clear philosophy behind this three-system environment. You business processes are extremely important. Simply changing or adding Workflows or system settings might put them at risk. Thus, they must be tested in a separate system environment before they can be used for productive operation. 2.0.2 Three-system environment The following illustrations show how the three UC4 systems work together: In the production system, you can use a separate client for the development system. Test and production system must be physically separated in any case. This ensures that new procedures can be tested without putting your business processes at risk. Partition means: 3 Chapter 2 Test and Production System l l l l l l l Two UC4 systems Each UC4 system has its own UC4 Automation Engines, Agents, etc. Both systems use different computers. Both are equipped with the same hardware and software (OS, database, third-party software etc.) Optimally, the UC4 systems run in different networks. The same authorizations and UC4 settings (UC4 Variables, INI files etc.) apply for both systems. The test system has the same UC4 objects as the production system. The test system should be as far as possible identical to the production system. These settings ensure that newly created jobs are tested under productive conditions. The impact of modifications can be optimally tested in a test system. Updates to new UC4 versions, operating systems and databases can be carefully planned and tested with the most obvious advantage still being that your production system is not put at risk. Improvements and modifications are only transferred to the production environment after extensive testing. 2.0.3 Maintaining your UC4 systems Regularly check compliance with the above rules and maintain the UC4 Database on a regular basis using UC4's utilities and the relevant database-specific tools. Objects can easily be transferred between the different UC4 systems using the UC4 Transport Case. As opposed to imports, the Transport Case has been designed to transport numerous objects to a UC4 system. Extensive tests in the test system are always recommended before objects are transferred to the production system. Analyze the log files of all UC4 systems. This is also possible in an automated form using a job that filters particular keywords (such as "error") with the script element PREP_PROCESS_FILE. See also: Updating a UC4 System Automation Engine 4 3 Security in UC4 Systems How to protect your UC4 system with utmost security. 3.0.1 Measures UC4 provides several functions which all serve to protect your UC4 system from unauthorized access: l l l l Use the highest possible encryption strength AES-256. Use the authentication method "Server and Agent". Deactivate the compatibility function. Use the authorization system and do not grant more UC4 system rights and privileges to users than they really need. Also use your intra-company security measures to achieve utmost security. l l Protect access to your Server rooms. Act with caution when assigning access rights to computers and files. See also: Advanced Security Authorization System 5 Chapter 4 Controlled Computer Restart 4 Controlled Computer Restart Guideline for a monitored computer shutdown and start. 4.0.1 General Daily processing means that numerous tasks are executed on your hosts day and night. Running tasks are aborted if a computer shuts down unexpectedly. In order to avoid negative impacts, UC4 recommends preparing the Agent for shutdowns and restarts. 4.0.2 Preparations The following basic rules apply: 1. Ensure that no tasks are active when you shut down the computer. 2. Execute a Workflow that processes finishing tasks shortly before you shut down. 3. Tasks should not start immediately after the Agent has started. 4. Instead, execute a Workflow that processes some preparatory tasks. The following objects and configurations are required in order to implement these criteria: 1. The host characteristics include two settings that can be used to allow or prevent the start of tasks on an Agent. These settings are WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB. Jobs or FileTransfers do not start if the value "0" is specified in both of them. They wait until a positive value is specified. You can do so using the script statement :SET_UC_SETTING. Create two script objects and specify the value "0" in one of them and a positive number or "UNLIMITED" in the other one. Use a script variable in order to assign the Agent name to the statement :SET_UC_SETTING. In doing so, you can use the created script objects for any number of Agents. 2. Create two Workflows. One serves to process finishing tasks before the computer is shut down and the other one should be executed immediately after the computer has been restarted in order to process some preparatory tasks. Use the function MODIFY_UC_OBJECT in the scripts of both Workflows in order to set them to "Ignore Agent Resource". This step is required because no other tasks must run at this time. "Ignore Agent Resource" then applies to all objects that are started by these two Workflows. 3. Ensure that no tasks are active before starting the finishing Workflow. Create an Event object that uses the script function SYS_ACTIVE_COUNT in order to check in an interval of several minutes if there are active tasks on the Agent. Activate this Event before you shut the computer down. It starts the finishing Workflow as soon as there are no active tasks on the Agent or activates a Notification if there are tasks that have not finished at this point in time. In both cases, the Event can end itself using the script function CANCEL_UC_OBJECT. 4. Create a separate UC4 Agent variable for the host characteristics. This variable can also be used for several Agents. The UC4 Variable UC_EX_HOSTCHAR assigns them to the corresponding host characteristics. Set the default value for the host characteristics' validity keys WORKLOAD_ MAX_FT and WORKLOAD_MAX_JOB to "0" in order to prevent that tasks start immediately when the Agent has been restarted. Enter the name of the Workflow that should first be executed in the option EXECUTE_ON_START. This Workflow's final task must activate a script which sets a higher value than "0" for the settings WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB in order to ensure that the regular processing of tasks can start. Automation Engine 4.0.3 Procedure Before shutting down the computer: l l l Process the script that prevents the start of further tasks. Start the Event that checks whether tasks are running. Activate the finishing Workflow if there are no more active tasks. After starting the computer: l l Only the introductory Workflow is activated when the Agent has been started due to the configurations of the host characteristics. This Workflow's last task is to start the script that releases task processing for this Agent. 6 7 Chapter 5 Assigning and Using Values 5 Assigning and Using Values Guideline for using values Various values are used in objects. They serve to specify the host on which jobs run, the files which should be processed, the type of reaction to Events etc. An advantage of UC4's object orientation is that these values can be dynamically set and processing can be controlled by the particular situation. UC4 provides several ways of storing values and assigning them to other objects. 5.1 Variable objects Values that are relevant for many tasks are stored in static Variable objects. A client's objects can access their contents and modify them using script elements. The following illustration shows a static Variable object. It already contains the Variable "HOST" with value "unix01". Example: The responsible administrator is entered in the Variable object using the script statement :PUT_VAR. The host name is changed to "unix02". :PUT_VAR "DB_MAINTENANCE", "ADMIN", "Smith" :PUT_VAR "DB_MAINTENANCE", "HOST", "unix02" A task reads the host name using the script function GET_VAR:. :SET &HOST# = GET_VAR("DB_MAINTENANCE", "HOST") The script statement :DELETE_VAR deletes the host specification from the Variable object: :DELETE_VAR "DB_MAINTENANCE", "HOST" Automation Engine 8 5.2 Object variables Values that are only relevant for individual tasks are stored directly in the object. Almost all executable objects contain a Values tab which can be used to enter Variables that should be used in the Process tabs. These values can be used directly as script variables. The following screenshot shows the object variable "&HOST#". This variable can be immediately used in the script. The following example uses the object variable to terminate the Agent. :TERMINATE ,&HOST# There is a peculiarity which applies to object variables. They can be inherited from the superordinate object. For example, tasks of a Schedule can use the object variables of its Schedule. This simplifies maintenance because it is no longer necessary to store the values in all individual objects. 5.3 Input buffer Values relevant for a task that is started using ACTIVATE_UC_OBJECT can be stored in an input buffer. This is done using the script statement :PUT_READ_BUFFER . The task reads the stored values with the script statement :READ. Example: A job puts the name of its Agent to the input buffer and then calls a Notification: :SET &att_host# = GET_ATT(HOST) :PUT_READ_BUFFER host# = '&att_host#' :SET &ret# = ACTIVATE_UC_OBJECT('CALLOP') Notifications can read Agent names: :READ &host#,, 9 Chapter 5 Assigning and Using Values :PRINT "Agent: &host#" Automation Engine 10 6 Useful Calendar Keywords Even if a company uses many company-specific calendar dates, there are some dates which are generally helpful. The following Calendar object provides a collection of typical Calendar keywords which can be useful when processing tasks. 6.0.1 Weekly Name Description MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY Each individual day of the week is stored as an individual Calendar keyword. WEEKDAYS_MON_TO_FRI Contains all Mondays, Tuesdays, Wednesdays, Thursdays and Fridays WEEKEND Contains all Saturdays and Sundays 6.0.2 Monthly Name Description 11 Chapter 6 Useful Calendar Keywords FIRST_DAY_OF_ MONTH Contains the first day of a month LAST_DAY_OF_ MONTH Contains the last day of a month Select day "1" in the Calendar Definition and the option Count the days from the beginning of the month. Select day "2" in the Calendar Definition and the option Count the days from the end of the month. 6.0.3 Yearly Name Description QUARTER_1, QUARTER_2, QUARTER_3, QUARTER_4 There is a Calendar keyword for each quarter. Select In a defined interval in the Calendar Definition and specify the quarter's start and end date (e.g.: 01.01. until 31.03). 6.0.4 Group Name Description WORKDAYS Contains all weekdays from Monday to Friday except holidays Select the Calendar keyword WEEKDAYS_MON_TO_FRI in the Calendar Definition. Enter the holiday calendar of your country (e.g. UC_HOLIDAYS.US with the keyword TOTAL) in the setting AND none of the following Calendars apply. 6.0.5 Roll Name Description FIRST_ WORKDAY_ OF_MONTH Contains the first workday of each month LAST_ WORKDAY_ OF_MONTH Contains the last workday of each month Select the source Calendar keyword LAST_DAY_OF_MONTH. Select adjust by "+1" day. Specify the Calendar keyword WORKDAYS for the option use valid days from. Select the source Calendar keyword FIRST_DAY_OF_MONTH. Select adjust by "-1". Specify the Calendar keyword "WORKDAYS" for the option use valid days from. Automation Engine 12 13 Chapter Glossary Glossary This glossary lists all UC4-specific technical terms in alphabetical order. ABC D EFGH IJKLMN OPQR STU VW XYZ A l l l l l l activation Through activation, tasks obtain a RunID, are displayed in the Activity Window, and are ready for execution (see also 'Start'). activation log A report that contains all details about task activation. The details that are included in the log depend on the settings that have been specified (for example, the generated JCL, modified Variables). Activity Window A UserInterface window that displays all activated tasks. Agent A program that enables the execution of processes on target systems such as computers or business solutions. A particular UC4 object type. alias This refers to the name of Workflow tasks or objects that are activated once or recurring. This name is used instead of the actual object name in the Activity Window, the monitors and the statistics. AutoForecast It displays tasks that will run in a predetermined period. Comprehensive forecast for all future activities. B l batch mode This refers to the sequential background processing of tasks. C l l l l l Calendar It consists of days using Calendar keywords. A particular UC4 object type. Calendar condition The criteria for running a task is based on Calendar keywords. Calendar keyword A part of a Calendar object that is used to define days. CallAPI A programming interface that can either be called directly or from a different program. It processes a script in the UC4 system. Child, Children These are objects that are activated by superordinate tasks (parents). Automation Engine l l l l l 14 client This is a closed environment for the execution of tasks within a UC4 system. A particular UC4 object type. Cockpit It visualizes the values and states of UC4 or of the monitored and controlled system. A particular UC4 object type. CodeTable It defines a complete set of characters. A particular UC4 object type. communication process A communication process is part of the UC4 Automation Engine. It is responsible for connecting the UC4 components. context menu A menu that opens in a particular place when you right-click with the mouse. D l l l l data sequence An internal listing of Console outputs or lines of Variable objects, etc. The lines of a data sequence can be accessed by using a PROCESS loop or the script element GET_PROCESS_LINE. The script elements PREP_PROCESS* generate data sequences. dialog process A part of the UC4 Automation Engine and a special form of work process. Is exclusively responsible for UserInterface messages. Documentation This refers to the UC4 Guides. It is also a particular UC4 object type that can be used to store information. dynamic variables A Variable object with the attributes "Source" - "SQL", "SQL internal", "Multi" or "Filelist". Values are directly retrieved from the data source and not stored in the object. E l l l l l l . E-mail connection This is a functionality of Windows and UNIX Agents that is used to send e-mails. Enterprise Control Center (ECC) A separate UC4 product. Web application that allows access to the functions of various UC4 applications and products in a quick and easy way. Available for download from the UC4 Download Center. Event Action that is triggered if particular conditions apply. A particular UC4 object type. Event ID First RunID of FileSystem and Console Events. Both Event types require communication between UC4 Automation Engine and Agent. They communicate via the first RunID. Otherwise, Event identification is no longer possible after the first log change. Explorer UserInterface window in which objects can be created, edited and administered. external dependency A task whose end status is considered when a Workflow is being processed. The task itself, however, does not run within the framework of this Workflow. 15 Chapter Glossary F l l l File transfer Transfers files from one computer to another. A particular UC4 object type (FileTransfer object). Forecast Estimates a task's runtime on the basis of previous executions. fully qualified FileTransfer FileTransfers without wildcard characters. One particular file is transferred. G l Group Integrates tasks so that they can be processed together. A particular UC4 object type. H l l l host Computer, target system. host attributes Platform-independent attributes of the Job object. HTML help Microsoft help format for manuals. These help files have the ending .CHM (see also 'WebHelp'). I l Include A script that is often used in several objects. A particular UC4 object type. J l l JCL Short form of "Job Control Language". It refers to applications that are processing steps executed on computers. Job Processing on a target system. A particular UC4 object type. K l l Key Column in static Variable objects that can be used to access values of a particular line. Keyword Part of a Calendar or Variable object (Calendar keyword or key) or parameter of a script element that is used to define values. Automation Engine 16 L l l Login Login data for target systems. A particular UC4 object type. logical date The logical date is used as a comparison date for checking Calendar conditions. M l l Message Window UserInterface window that displays warnings, information and error messages. Monitor Graphical view of a task's execution. N l l nonstop process Part of the UC4 Automation Engine. Assumes processing if the computer with the active Server processes fails. Notification Sends messages to individual Users and UserGroups of the UC4 system. A particular UC4 object type. O l l l l object UC4-controlled activities and processes are structured in the form of objects (see also 'Task'). object class There are four classes of objects: executable, active, passive and system objects. object type An individual object is provided for the individual activities: User, UserGroup, Notification, Cockpit, CodeTable, Documentation, Event, Agent, FileTransfer, Group, Include, Job, Workflow, Calendar, Login, Client, RemoteTaskManager, Schedule, Script, Server, Sync, Variable and TimeZone. object variables Placeholder for values that are stored in an object's "Values" tab. P l l l l parent There are different ways of activating objects. The originator of an activation is referred to as the superordinate task (parent). (See also 'Child', 'Children') partially qualified FileTransfer FileTransfers that use wildcard characters in order to transfer several files. Period Container Controls the execution of periodical tasks perspective Separate functional area of the Enterprise Control Center's (ECC) web interface. The perspectives 17 Chapter Glossary l l l l l l l l Process Automation and Process Monitoring provide functionalities of the UC4 Automation Platform. Process Automation The old name of the Service Catalog perspective. Process Assembly A perspective of the Enterprise Control Centers. You use it to create, define and modify Workflows. Process Monitoring A perspective of the Enterprise Control Center. It lists the activities of all users and provides the opportunity to manipulate them (you can cancel or deactivate them). predefined variables Fixed variables that can be used in the attributes or the script of executable objects. The values refer to the object or the system. primary work process It is responsible for the execution of UC4-internal tasks and work processes. PromptSet A user-defined input mask for executable objects. A UC4 object type. PromptSet element Fields/control elements that are used to query User values. They are the content of a PromptSet input mask. PromptSet variable It stores the value of a PromptSet element. Depending on the situation, a value can be user-defined or a default value. PromptSet variables show the same behavior as object variables. Q l Queue A Queue determines the maximum number of concurrent tasks, their priorities and the order in which tasks should be executed. A particular UC4 object type. R l l l l Rapid Automation (RA) A generic technology that can include various solutions. Is composed of an RA Agent and an RA Solution. RA Agent A UC4 Agent that can be connected to a particular RA Solution and thus provide this solution's functionalities to a UC4 system. It is the interface between an external system / application / platform and a UC4 system. RA Solution A solution that is based on the Rapid Automation Technology that allows UC4 to access an external system / application / platform. The RA Solution is supplied as a JAR file that must be loaded to the UC4 Database and connected with an RA Agent. The specific RA objects (such as Jobs, Connections, Agent) are available in the UC4 system as soon as the solution has been loaded. real date The date that is used for checking runtime monitoring or time conditions in the properties of Workflow tasks is referred to as the real date. It complies with the top Workflow's activation time. It is passed on to all subordinate tasks. Automation Engine l l l l l l l l l 18 recurring tasks These tasks are scheduled without using a Schedule object and mostly consist of a period that is less than a day. registered This is the status of a task that runs within a group and is waiting for its start. RemoteTaskManager It monitors and controls external Jobs that were not started by UC4. A particular UC4 object type. report A report provides more detailed information about a task's execution or a UC4 component. Result column The first column of dynamic Variable objects with the sources "SQL", "SQL-internal" and "Multi". The content of this column can be defined with Result format. restart A restart refers to the repetition of an object's execution. This action differs from a new start in some parts. return code The value that represents the result of tasks and script functions. RunID Short 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 UC4 Server. Runtime The duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start). S l l l l l l l l l l l Schedule It starts executable objects periodically. A particular UC4 object type. Script A script processes statements in UC4's script language. A particular UC4 object type. Script Variable A placeholder for a value within a script. Server process The core of a UC4 Automation Engine. Different types are available: communication, work and dialog processes, as well as nonstop processes. ServiceManager A program that facilitates the starts and stops of UC4 components. Service Catalog A perspective of the Enterprise Control Center. It allows users to start the objects in their Favorites folder and generally monitor their execution. start This refers to the start of a task's execution (see also 'Activation'). static variables A Variable object with the setting "Source" - "Static": Variable values are entered by a User or with a script and remain stored in the object. Statistics This is a list of a task's previous runs. status This represents the condition of a task (such as active, blocked, generating). Sub-Workflow A Workflow that is part of a different Workflow. 19 Chapter Glossary l l l superordinate task There are various ways of activating objects. The originator of the activation is referred to as the superordinate task (parent). Sync It synchronizes executable objects based on defined states and actions. A particular UC4 object type. System Overview The UserInterface window that contains information about the UC4 system. T l l l task An executable object that is running is also referred to as a task. timeout Occurs when a particular period of time is over. TimeZone It defines a local time. A particular UC4 object type. U l l l l l l l l l UC4 Automation Engine It drives a UC4 system and consists of different types of Server processes. UC4 Automation Platform A separate UC4 product. Includes the components that are required in order to operate a UC4 system (such as the Automation Engine, UserInterface, Agents, WebInterface). Available for download from the UC4 Download Center. UC4 ClearView A separate UC4 product. Graphical analysis tool: Displays the activities, statistical and forecast data per UC4 system client in a bar diagram and can be used to calculate the critical path. Available for download from the UC4 Download Center. UC4 component Refers to UC4 programs such as UserInterfaces, the Automation Engine, Agents, ServiceManagers, utilities etc. UC4 Database A relational database management system (RDMS) that administers all scheduling data from a central point. It contains object definitions, system specifications, statistical data, job reports, etc. UC4 Insight A separate UC4 product. Complex graphical analysis tool for the data of UC4 Automation Platform systems (such as tasks). Available for download from the UC4 Download Center. UC4 Policy Orchestrator ( A separate UC4 product. Can be used to define and administer business rules and trigger Events. Available for download from the UC4 Download Center. UC4 priority Affects the order of task execution within a UC4 system. UC4 Application Release Automation Separate UC4 product that can be used to define, administer and activate installation and integration processes and to administer the versions and dependencies of various applications. The Deployment processes run via the UC4 Automation Platform. Available for download from the UC4 Download Center. Automation Engine l l l l l l l l l l 20 UC4 Script UC4's scripting language. UC4 Server Old term for UC4 Automation Engine (v8 or lower). UC4 Service Orchestrator A UC4 product. The Service Orchestrator is a perspective of the UC4 Enterprise Control Centers (ECC) and it is used to handle, monitor and analyze the performance of SLAs (Service Level Agreements). UC4 system An environment that is managed by UC4 components. UC4 Variables These are Variable objects that include the UC4 system's specifications. User A person who uses a UC4 system. A particular UC4 object type. User group A group of users who have a common profile of rights. A particular UC4 object type. UTC Internally, UC4 uses UTC (Universal Time Coordinated) because UTC is the international time standard and is always precise. Nevertheless, TimeZone objects are available that can be used to show local times in tasks and script elements. UserInterface This is UC4's graphical user interface. utilities Utilities support the execution of administrative tasks in a UC4 system (such as reorganizing and archiving the UC4 Database). V l l Variable It stores or retrieves values dynamically at runtime. An individual UC4 object type. Version Management This refers to an object version that is stored when you have modified the object. W l l l l l WebHelp One of the help formats that are provided for manuals. You open it with a Web browser (see also 'HTML Help'). WebInterface A UC4 user interface that can be called via a Web browser. wildcard characters These are placeholders for characters when you specify filters. ? stands for exactly one character, * for any number of characters. work process A part of the UC4 Automation Engine. It is responsible for a UC4 system's processes (see also 'Primary work process'). Workflow It refers to the execution of processes. A particular UC4 object type. 21 Chapter Glossary X l XML file A format for imports and exports. An XML file contains object structures.