Skip to the content.

Understand the automation framework

Concept

The framework starts from the configuration of automation scripts that will be executed by a processing engine. The configuration is designed upfront and loaded in a configuration reposiory. From here, the engine will read this configuration, execute it and store its outcome back into the repository. The framework will take care of common and reusable functions such as logging, parameter passing, etc.

Principles

Different Statuses

The execution of an automation script can be associated with the following statuses.

Status Description
RUNNING Script is running
ERROR All actions in the script have ended in error
STOPPED Script has stoppped due to an error in an action that is configured to stop on error
SUCCESS All actions in the script have been executed successfully
WARNING Not all actions in the script have been executed successfully, at least one action has ended in error

The automation framework components

The automation framework consists of:

Configuration templates

The framework uses configuration to drive automation. Automation engineers can create or update configuration files that will be loaded and stored in a configuration repository. There are multiple ways to create these files: waiting for a more advance graphical user (web)interface, the framework contains a set of standard Excel templates. These provide a well-known user interface and facilitate creating a required technical json format. Engineers can directly create this technical format, or alternatively make use of a easier to use yaml format.

Creating configuration files

Json format

Underneath, the framework uses the json object format run and communicate its services.

Yaml format

To facilitate creating and updating configuration files for technical enigeers, support for the yaml object format has been included.

Excel templates

The templates allow to transfer the configuration Excel files into a json configuration file via a vba macro. The configuration templates can be found in folder modules/templates.

Template Description
Component Define a library of system components
Connectivity Define connections and environments
Script Design automation scripts
Subroutine Design subroutines

Versioning configuration files

Versioning can be done via any version tool that is being used.

Configuration repository

All tables of the framework are installed in a specific area of the database. Depending on the database type (e.g. Oracle, Postgresql, SQLite, …), this area can be either a database or schema. To support this multi-database support all table configurations are stored by the framework in json format in the metadata/def folder.

Categories

The configuration data can be divided in different categories.

Category Description
Connectivity Connectivity configuration to automate actions. This can include parameters that are resolved during execution.
Design Automation configuration as designed by the automation engineer. This can include parameters and other reusable constructs that are resolved during execution.
Execution In-process information to drive executions.
Result The technical outcome for the different actions as executed by the framework.
Trace The resolution of the automation configuration design as it has been executed by the framework. All parameters and reusable constructs are replaced by actual values.

Data Objects

The framework is based on a set of data objects that work closely together. All objects are designed using the following principle:

You can replace object here with: script, environment, connection, etc.

Users

The framework is built around 3 users having access to the configuration repository:

User type Description
Owner For creating tables and to be used as logon for deployments
Writer For processes writing data to the tables
Reader A read-only account for reference / reporting purposes

Tables

Prefixes:

Prefix Description
CXN Connectivity tables
DES Design tables
EXE Execution tables
RES Result tables
TRC Trace tables

Data Model

The data model for the solution is stored in the metadata/def folder. To support multi-database support the structure is stored in a data store agnostic json file. For each category a file [Category]Tables.json can be found here. The file [Category]Objects.json contains the relevant object definitions for the category. More information on the data models for the different categories can be found by clicking on the appropriate link below:

Processing engine

The installation of the automation framework deploys a set of artefacts that allow the processing engine to initialize itself and perform its operations.

Execution logic

The automation framework is an orchestrator that runs actions one after the other, caches intermediate results and variables that it can use in any next action.

Very simplisticly, it is a big loop over all actions:

File extensions

Extension Description
conf Configuration file
cmd Windows cmd shell script
db3 SQLite database file
ini Configuration file initialization
jar Java archive file
json json file
log Log file
sh Linux bash shell script
xml XML file
yml yaml file

Using variables

Variables allow automation scripts to be designed in a generic manner where execution depends on user input or execution context.

Variables are always available as key-value pairs