# Automation (low-code)

The automation functionality, built on the low-code visual programming engine and its own scripting and execution system, allows users to create arbitrary event processing scenarios using visual blocks and establishing links between them.

To build Scenarios, both basic Blocks of the system library and local functions, written by the user in the C# scripts scripting language, are available

# Architecture of processing Automation scenarios

Image

# General principle of building a Service Model

Image

# Scenario management screen

Image

The main screen of the Automation menu presents a list of scenarios with the following information:

  • Scenario name
  • Scenario type (in the first version -- CMDBAutoDiscovery)
  • Scenario Owner (Workgroup)
  • Scenario State

# Scenario constructor

The constructor includes the ability to view and edit the scenario itself, as well as basic information about it.

Image

The scenario can be in the active or inactive state.

  • Active scenario - the scripting and execution system runs it to handle events.
  • Inactive scenario - the system for launching and executing scripts does not run it in event processing.

Immediately after creation, the scenario is set to Inactive mode. You can activate a scenario from the scenario builder or from the scenario management screen.

# Object Manager

Object Manager

The Object Manager is available to the user, allowing him to work with the declared entities of the current scenario. Every declared local function, variable or structure in the scenario will be displayed in this list.

The user can go to the settings of these entities (Object Inspector) immediately from the manager, without the need to add them to the graph.

In the object manager, you can create new scenario entities, namely:

  • Local functions,
  • Local variables,
  • Local structures.

When added new entities are assigned default names:

In a case of names repetition a serial number is added to them.

Image

# Object Inspector

Object Inspector

Image

# Debug terminal / Compiler log

To work with the logs of the compiler and the engine itself, a debug terminal is available.

The debug terminal is available in the scenario editing mode.

Logs are presented in separate tabs:

  • Compiler log,
  • Debug terminal

The tab containing log errors has an indicator that displays the presence of errors.

The panel can be collapsed and expanded as needed.

# Compiling scenarios

After making changes to the scenario graph, configuration or block script, the system will prompt the user to compile the final scenario to check for correctness.

# Debug panel

The debug panel is designed to work with the automation script compiler log.

The panel includes a tab for viewing the compiled C# source code.

The panel is collapsed by default, you can expand it if necessary.

The panel display is available in the following options:

  • full screen
  • third of the screen (default)

# Launch Scheduler

Starting with Acure 2.2, users can run scripts at scheduled times or at specified intervals.

You can schedule a script to run manually using the current script interface. And also with the help of special global functions directly in the script, under certain conditions.

For example, after receiving an event about the restoration of a problem, the Signal cannot be closed immediately, only after a certain time, if this problem does not reoccur.

In this case, the launch of the script can be two types:

  • One-time launch of the script at a specific time
  • A number of script launches recurring at regular intervals

# View active schedules

To view the scheduled launches of the current scenario, go to the "Launch Scheduler" section of the bottom panel of the current scenario

Image

This section displays information about the currently scheduled runs of this scenario:

  • Next start time
  • Schedule Status
    • Enabled - the schedule is active
    • Paused - the launch of the script by the scheduler is paused
  • Description of the schedule
  • Schedule controls
    • Schedule editing
    • Stop/start schedule
    • Delete schedule

# Manual creation of the schedule

To schedule a script to run at a specific time or frequency:

  1. Go to the "Launch Scheduler" section of the bottom panel of the current script

  2. Click the "+ Schedule a launch" button

  3. Fill out the schedule creation form

    Image

    • Description - a textual, user-friendly description of the planned launch
    • Action - an event in JSON format that will be passed to the script the next time it is run
    • Timezone
    • Start - date and time of the first run of the script
    • Repetitions - the ability to enable a series of script launches

      Indicated in CRON format

      Consists of five fields separated by spaces: <Minute> <Hour> <Date> <Month> <Day of the week>

    • End - date and time until which the script will be launched if repetitions are configured
  4. Press the button "Schedule launch" - a launch schedule will be created

# Automatic schedule generation

Automatic scheduling involves initializing the subsequent script directly from the original script.

The corresponding global function CreateSchedule is intended for this.

# Import/export scenarios

Users can share scenario designs with each other thanks to the Export and Import scenario tools.

When exporting, the mechanism for serializing the scenario into the base64 format is used. Based on the results, the user will be prompted to copy a string to the clipboard or download a txt file with its contents.

image

In addition to the standard scenario creation, the user will have access to the import option. After selecting this option it is necessary to fill in a string with content in the base64 format.

image

During the import process, the system will check the versions of the involved modules, and if successful, will create a scenario with all the necessary local functions and structures.