> ## Documentation Index
> Fetch the complete documentation index at: https://docs.germainux.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Program execution (RPA Bots)

> ⚙️ GermainUX can execute local programs—also referred to as RPA Bots—on servers running the GermainUX Engine.

Components
[`Engine`](/main/germain-ux-engine)

Availability
2014.1 or later

⚙️ GermainUX can execute local programs—also referred to as RPA Bots—on servers running the GermainUX Engine. Programs can be written in any supported language, including Python, Shell, PowerShell, Java, or Perl.

> **[Execution Methods](#execution-methods)**
>
> Ways programs can run

> **[Configure a Local Program](#configure-a-local-program)**
>
> Add actions in automation settings

> **[Configuration Reference](#configuration-reference)**
>
> Field-by-field settings reference

> **[Remote Execution](#remote-execution)**
>
> Run commands on other hosts

## Execution Methods

Programs can be executed:

* Manually from the GermainUX Workspace
* Automatically on a schedule
* Automatically when an SLA condition is met

## Configure a Local Program

Go to **GermainUX Workspace -> Left Menu → Setting -->Automation -> Local Program**.

Select an existing action to edit it, or click **+** to launch the **Local Program** wizard.

![Program execution (RPA Bots): Configure a Local Program](https://mintcdn.com/germain-ux/S6CZjLTFu68xyZFG/images/main/local-program-execution/image2020-7-20_23-42-54.png?fit=max\&auto=format\&n=S6CZjLTFu68xyZFG\&q=85\&s=322ac014bde36bde7989aa67cda66da3)

## Configuration Reference

| Workspace field | Configuration key | Description | Possible values | Default |
| - | - | - | - | - |
| **Name** | `name` | Unique name for the action. | String | — |
| **Working Directory** | `workingDirectory` | Directory from which the program or script runs. Context variables are supported. | String | — |
| **Program** | `command` | Program or command to execute, such as `powershell.exe` or `/bin/bash`. Context variables are supported. | String | — |
| **Arguments** | `arguments` | Arguments passed to the program. Context variables are supported. | String or list of strings | — |
| **Quote Arguments** | `quoteArguments` | Encloses arguments containing spaces or quotation marks in quotes. | Boolean | — |
| **Script** | `script` | Name of a script defined under **Automation -> Script**. | String | — |
| **Run on Schedule** | `schedule` | Enables scheduled execution and allows a cron expression to be defined. | Boolean | — |
| **Triggered by SLAs** | — | Lists the SLAs configured to trigger this action. | Collection of SLAs | — |
| **Timeout** | `timeout` | Maximum execution time, in seconds. | Integer | — |
| **Exit Value** | `exitValue` | Exit code indicating successful execution. | Integer | — |
| **Logging Enabled** | `loggingEnabled` | Enables execution logging. | Boolean | — |
| **Notify on Success** | `notifyOnSuccess` | Generates a notification when execution succeeds. | Boolean | — |
| **Notify on Failure** | `notifyOnFailure` | Generates a notification when execution fails. | Boolean | — |
| **Execution Count** | `limitCount` | Maximum number of executions allowed during the configured execution interval. | Integer | — |
| **Execution Interval** | `limitInterval` | Period during which the execution-count limit applies. | `YEAR`, `MONTH`, `WEEK`, `DAY`, `HOUR`, or `MINUTE` | — |
| **References** | `references` | Advanced configuration containing credentials, configuration objects, or custom values that the action can reference. | Reference collection | — |

### References

References allow an action to securely access credentials, configuration entries, or custom values.

A reference can point to an existing GermainUX configuration item:

| Property | Description | Example |
| - | - | - |
| `name` | Unique name used to reference the item. | `Credentials` |
| `key` | GermainUX configuration collection key. | `germain.apm.monitoringConfig.credentials` |
| `itemName` | Name of the item within the collection. | `SSHProdCredentials` |

You can then access its properties using an expression such as:

```text theme={null}
${Credentials.username}
```

A reference may also contain a direct key-value pair. Avoid storing passwords or other secrets as plain-text values; use a configured credential whenever possible.

## Example: Restart a Windows Service

This example creates a local action that restarts a Windows service when a memory-usage SLA is breached.

### 1 Step 1: Create the Local Program

**1. Go to GermainUX Workspace -> Automation -> Local Program**

**2. Click + to open the Local Program wizard**

**3. Enter the following name:**

```text theme={null}
Windows-Service-Restart-Local
```

1. Click **Next**.

### 2 Step 2: Configure the Command

Enter:

| Field | Value |
| - | - |
| **Program** | `powershell.exe` |
| **Argument** | `Restart-Service #ServiceName#` |

Replace `#ServiceName#` with the target service name or an appropriate reference.

Click **Next**.

### 3 Step 3: Configure the Schedule

Because this action will be triggered by an SLA breach, do not configure a schedule. Click **Next**.

### 4 Step 4: Select the SLA

Select the **Memory Usage SLA** that should trigger the service restart, and then click **Finish**.

GermainUX will now execute the action on the GermainUX Engine server whenever the selected memory-usage SLA is breached.

![Program execution (RPA Bots): 4 Step 4: Select the SLA](https://mintcdn.com/germain-ux/S6CZjLTFu68xyZFG/images/main/local-program-execution/image2020-7-21_0-1-13.png?fit=max\&auto=format\&n=S6CZjLTFu68xyZFG\&q=85\&s=7c822cb2c2cdd8fa4178e68ad4266c5b)

## Remote Execution

For more advanced scenarios, the program can execute a command against a remote host. For example, PowerShell can target another server by using the `-ComputerName` argument.

When configuring remediation actions:

* Use an SLA scoped to the intended server.
* Use stored credentials instead of embedding passwords in commands.
* Apply execution limits to prevent repeated restarts.
* Configure success and failure notifications.
* Test the action in a non-production environment before enabling automatic execution.

## Get Help

> **[Contact GermainUX Support](/main/support.md)**
>
> The Germain Team can help you set this up.

> **Can't find what you need?**
>
> Search all GermainUX docs with **Ctrl + K**, or use the feedback buttons at the bottom of this page to tell us what is missing.

The content of this document is proprietary to GERMAIN SOFTWARE.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.