No-code automation platform XenoGuard 4.0

A German version of the following article was published in the magazine dotnetpro (issue 10/2022):

Flexible toolbox without coding: Use XenoGuard to automate daily routines

The Gartner Group predicts that as early as 2025, between 65–75 percent of all enterprise solutions will be created with low-code and no-code platforms. While low-code solutions tend to be flexible due to the programming languages used, no-code platforms have a reputation for being rigid, particularly in the purely sequential execution of workflows that often occurs. Low and no-code editors are also regularly critiqued for their sprawling representations of workflows. MycroTools, and its universal no-code automation platform XenoGuard, proves that this can be done differently [1]. The XenoGuard 4.0 platform, on the market since the beginning of 2022, offers a high degree of flexibility combined with a compact design and is suitable for all users who want to automate processes on the PC without coding. The system is easily extended by .NET developers to add new actions with little code and effort. 

This article introduces the product in more detail, outlines various possible use cases and, using two examples, explains how it works in practice. In the first example a .NET solution is automatically checked out and compiled. The second example is dedicated to encrypted data exchange between several clients and a server. Both solutions are created within a few minutes via drag-and-drop.

New conceptual world

As a reader of the dotnetpro, you may have become familiar with the expressions Zap and Scenario when comparing the Zapier and Integromat automation platforms – both terms used to describe a workflow. Microsoft uses the word flow in Power Automate [2]. MycroTools, likewise, refers to a workflow as ActionScript and an action as ActionStep [3]. Both are registered word marks and at the same time class names in C#, because with the Plus and Premium variants of XenoGuard, the user has the option of developing their own extensions in Visual Studio to extend the software with actions and interfaces. The .NET framework on which XenoGuard is based is used for this purpose.

New workflows

XenoGuard is available in three variants – Basic, Plus and Premium – and runs exclusively as a local Microsoft Windows application. A permanent Internet connection is not required, however it simplifies registration.

XenoGuard's user interface is based on Visual Studio's IDE, so VS programmers will feel at home (Figure 1). The new workflows, on the other hand, are where the magic happens. Each ActionScript is created  by dragging and dropping actions:

  1. In the Workspace Explorer, the central collection point for actions and scripts, search filters allow the desired ActionStep  to be found easily. All it takes to transfer the action into the script is a mouse double-click or pressing Enter. Otherwise, Drag-and-drop is also a quick option.

  2. XenoGuard allows editing directly in ActionScript, with no separate dialog windows for parameterizing actions. This eliminates the bother of opening and closing various input masks, a shortcoming of other automation tools. XenoGuard offers the optimal solution: a single mouse click opens an action in ActionScript to access the parameters, which are then displayed hierarchically. By double-clicking or pressing Enter, the user easily initiates editing mode. Following the motto: “less is more”,  ActionScripts are pleasantly compact, without sprawling graphics that fill too much screen space. The uncluttered interface follows Visual Studio’s conventions at all times, and is targeted at a programming-savvy audience familiar with code-based tools. This makes it easy to switch from other tools to XenoGuard.

  3. Data and variables can be moved back and forth between the actions by drag-and-drop, without any annoying buffering and repeated opening of dialog windows. Working with XenoGuard assists intuitive compilation of actions, their placement and parameterization. XenoGuard uses Live Execution during script execution, allowing the results of all actions to be observed immediately and processed further. The tool visualizes its data during execution, and single ActionSteps can be executed while editing in the script. 

The more than 250 included actions are divided into the categories Programming, Windows, and Home Automation. Under Programming you find classical elements of a programming language, such as variables, parameters, enumerations.  It also includes actions for string manipulation, loop constructs and much more. The Windows group combines certain application areas of Windows, such as Network, File, Database and Process. The last group Home Automation underlines the versatility of the tool, which supports automation of lamps and motion detectors from Philips Hue. Included C# code examples illustrate how programmers can include their own interfaces and devices for automation. MycroTools also offers further extensions on its website, with which XenoGuard can be expanded.


Figure 1: An open ActionScript in the XenoGuard 4.0 working environment

Build automation - actually no-code!

The first ActionScript presented checks out a C# solution from a repository using the Tortoise SVN tool, builds the project using the Microsoft build engine MSBuild, and uploads the application to an FTP server. This example is included in the Example Workspace of the trial version.

At first glance those unfamiliar with XenoGuard will think the script in Figure 1 is ordinary source code, not the least because of the familiar color scheme, but this is deceptive. To the left of the line numbers are small plus icons – with these you can open the actions to get to the parameters. Red arrows and arrowheads on the left margin indicate whether there are connections between the individual ActionSteps. 
 
To create connections, a source parameter is linked to the target parameter via drag-and-drop. This eliminates the need for storage in temporary variables as the result can be processed directly.

Figure 2 shows the script after execution. The actions in lines 1 and 12 are open so that the hierarchical arrangement of parameters and results is visible. The green symbols to the left of the actions indicate error-free execution, while red symbols signal errors. This display is based on another feature of XenoGuard – test automation, supporting both positive and negative tests.

Initially the script defines the Programs enumeration and three variables. The enumeration contains entries from key-value pairs and stores the program paths of Tortoise SVN and MSBuild in them. Unlike the classic enum type which is based on numeric values only, XenoGuard assigns a constant string value to each named key. This may contain any string, as well as the key used in the script.

In lines 5 to 8, different paths are created dynamically, as both the repository and the checkout directory are located within the workspace. Before building the solution, the checkout directory is deleted and the command line tool svn.exe is executed with Process Start (line 10) to retrieve the source code from the repository via checkout. In line 12, the example starts a script named Build Solution, a subroutine that is filled with four input parameters. As a result, the script returns Exit Code, which XenoGuard displays below the Action Script Results node. Finally, the executable file is uploaded to the server via FTP using the FTP File Upload action.


Figure 2: Representation of an ActionScript after execution
 
Figure 3 shows the child script Build Solution. It contains the parameter and result definitions at the beginning. The fact that an identifier (Variables, Parameters and Results) is able to directly fill a parameter of an action is very convenient. XenoGuard can either read the content of a parameter if it is an argument or store the result as needed. This can be seen in Figure 3, where the Process Start action calls the MSBuild compiler. The program path of MSBuild.exe is passed via the MSBuild Path Name parameter and the exit code is stored directly in Result without explicit assignment. The arguments of Process Start are also specified in this way. This makes the actual call of MSBuild quite simple. The script uses Process Start as before, with all command line arguments conveniently defined in a table.


Figure 3: Calling the compiler MSBuild.exe using the Process Start action

All data can be viewed both during and after script execution. XenoGuard even displays the contents of an identifier in a tool tip as soon as the mouse moves over a cell (Figure 3). This does not require explicit inspection via Watch or an active debugging session. In addition, command line output from XenoGuard is redirected and visualized in the user interface, making it easier to check results and locate errors. This function works for all command line calls.

Everyone gets to be the first, but at the same time it also goes

Unlike many classical programming paradigms, XenoGuard does not have a main method or a fixed entry point into an automation. This may be surprising, however it underlines how flexibly XenoGuard operates: Every ActionScript that is run automatically becomes the main program. In this way, each script can be tested, reused, and started on demand as the next task requires. Additionally, the Plus and Premium variants of XenoGuard allow simultaneous execution of scripts. For example, the user can start an ActionScript to automatically upload files to a server via FTP, and simultaneously start a second ActionScript that collects and analyzes local data. Meanwhile, a third script can be edited. This allows XenoGuard to act as a highly efficient execution engine, making it easy to follow up on common office tasks. Scripts can also be executed in a scheduled manner, thanks to the built-in scheduler.

Client/server communication

The next example illustrates how a client reads personal data from an Excel spreadsheet and sends it to a server (Figure 4). Each data record contains the first name, last name, street, city, gender, date of birth and e-mail address. The data is then encrypted before transmission. XenoGuard provides ready-made actions for a client and server to establish a TCP connection and transfer data.
 
The TCP Client Start action in line 14 opens the TCP socket to the server. The action expects several parameters. The most important of these are the client name, server address, server port and the client’s login password. The client’s name is freely selectable – however it should be unique.

The Excel Get Data action processes the entire Excel table with the address data. It reads all the data at once and presents the result in tabular form, but only a portion is visualized in the interface to save memory. The visualization is done page by page. Each page contains 100 records. With the small buttons you can scroll back and forth – this works even during script execution.

The For Each ActionStep iterates through arbitrary lists and tables processing the data row by row. The action waits for a list element to be entered as its data source. As soon as a list element has been assigned, XenoGuard automatically tries to determine and display the structure of the data source. In the example shown, these are the columns of the Excel spreadsheet that appear as a list below Row. Each loop pass reads in the next data set.

For Each belongs to the group of actions that may contain inner ActionSteps, just like For Loop. The inner actions further process the records and access the elements that For Each returns.

Lines 17 to 19 link the data into a single string, which is then encrypted using AES. The password for encryption is used on the client and server side. Data transfer to the server is simple; the TCP Client Send action transmits the string to the server. So the server can later distinguish the data packets from each other, the data is marked with the Person Data mark.


Figure 4: Client script for transferring the encrypted address data to the server

Finally, all that is missing is the server script (Figure 5). This script receives the data, decrypts it and stores it in a local Access database. 
 
The action on line 38 starts the server. The action expects the parameters necessary for the initialization of the TCP socket (server name, login password and server port). The password must be identical to that of the client, otherwise the connection is rejected. Dedicated network adapters cannot be specified.

Receiving client data is simple. The TCP Server Receive action lists (in a table) the data packets of all clients that have been received since the last call of the action. XenoGuard returns the IP address, port number, data packet tag and the actual packet data as a string. The data is then processed line by line by the For Each action, as seen earlier in the article.

The correct Person Data mark must be set for the server to accept the data. Then the data is decrypted with Decrypt AES and split, with a total of seven elements expected. Each received record is stored in the Access database with the Database Insert Table action and the number of imported records is incremented.

As soon as all records in the loop have been processed the script jumps back to the TCP Server Receive action using Goto Label and checks whether further data is available. The server script runs in an endless loop to permanently receive and process the client data, with a wait time of 50 milliseconds if no data is available.

The client/server example shown transfers 5000 records per client. The personal data used has been created at random and does not contain any real data. There are two variants of the client script that can be started concurrently, and each script transmits its own data with 5000 addresses each. The server stores all data in a common Access database, whose content is deleted with every restart of the server script. You can find the examples in the installed Example workspace of the XenoGuard test version.


Figure 5: Server script for receiving address data in debug mode
 
Debugging and single step

Similar to Visual Studio and other development tools, XenoGuard users can set breakpoints and single-step an ActionScript. This can be used to find errors or understand what a script does in detail. The debugger also supports step-over and step-into. In addition, scripts that have already been started can be interrupted and then continued step-by-step. After each individual step, XenoGuard opens the action parameters so that the user can view the results. With a single key press even child scripts can be opened for single-step debugging if required. The debugger is included in all XenoGuard versions to make troubleshooting easier.

Conclusion

MycroTools XenoGuard is a flexibly deployable no-code platform for Microsoft Windows. Typical use cases include automated file exchange via FTP, folder synchronization, access to SaaS services via the REST API, newsletter systems and test automation, among others. The neatly presented ActionScripts resemble code-based scripts – yet they are consistently created without code by dragging and dropping ActionSteps. 

XenoGuard is easy to use and beginner friendly. However, to work effectively with the tool the user should have basic knowledge of programming. XenoGuard’s target market is software developers and programmers, test engineers, and IT administrators. Unlike other tools established on the market, XenoGuard offers fewer SaaS interfaces to other services in the cloud. Those who own the Plus or Premium version of XenoGuard can use Visual Studio to develop their own actions in C# and integrate them seamlessly into the platform. 

XenoGuard also features simulation of mouse and keyboard inputs. By utilizing integrated image analysis, which searches for graphics and buttons on the screen and emulating a mouse click to select the target, any browser and Windows programs can be automated without a programming interface. You can register on the MycroTools website and test XenoGuard free of charge for 30 days. Online tutorials are available to make it easier to get started with the software.

[1]    MycroTools XenoGuard, www.xenoguard.mycrotools.com
[2]    Microsoft Power Automate, www.powerautomate.microsoft.com
[3]    Adobe Inc. also uses the term ActionScript for its scripting language.