Rules (Advanced Automation)

Rules provide the most advanced way to build custom automation in GermainUX. After creating a rule, you can deploy it to a GermainUX component and run it continuously, on a schedule, or when specified conditions occur.

Rules use MVEL for expressions and custom logic. For more information, see the MVEL documentation.

🔧 Configuration Example

This example explains how to create a custom rule that parses errors from a web-server log used by Oracle Siebel CRM. The same process can be adapted to other applications and automation use cases.

📁 Create a Rule

You can create a rule through the wizard or directly from the Rules screen.

✨ Using the Wizard

Go to GermainUX Workspace -> Left Menu → Settings → Wizards -> Rule.

image-20260825-145917.png
Rule Configuration Wizard - GermainUX

🖥️ Using the Rules Screen

Go to GermainUX Workspace -> Left Menu → Settings → Analytics -> Rules, and then click +.

image-20260825-150055.png
Rule Editor - GermainUX


📋 Define and Validate the Rule

Step

Instructions

Enter a name

Enter a unique rule name, such as custom-parser-siebel-web-drl.

Add the content

Paste the contents of the .drl file into the Content field.

Edit the rule

Modify the rule as required. Use the expand icon in the upper-right corner to enlarge or restore the editing area.

image-20201023-150330.png
Define and Validate the Rule - GermainUX

Validate

Click Validate to identify syntax or configuration issues.

image-20260825-150204.png
Validate a Rule to quickly address issues - GermainUX

Finish

After validation succeeds, click Finish, and then Close.

The new rule will appear in the Rules list.

🔗 Assign the Rule to a Component

After creating the rule:

Step

Instruction

Open the component

Open the component that should execute it.

Search

Search for the component by its name or by the rule it currently uses.

Select

Select the component.

Enable

Enable Use Custom Rule?

Choose rule

Select the new rule from Custom Rule Name.

Save

Click Save.

Restart

Restart the Engine instances monitoring SWSE so that the updated configuration takes effect.

Test custom rules in a non-production environment before deploying them to production.

image-20201023-155011.png


🚀 Execute a Command from a Rule

A rule can execute a nested command and process its output within the same rule file.

Picture2.png


The example below executes an AWS CLI command and analyzes its result.

Item

Example

Command name

EC2 BurstBalance Instances

Program

aws

Arguments

Added individually through cmd.arguments.add()

Output pattern

An optional regular expression assigned to cmd.pattern

Execution method

exec.executeCommand()

Result-handling rule

A rule in the same file with a name matching the command name

The resulting command is similar to:

aws cloudwatch list-metrics --namespace AWS/EC2 --metric-name "EBSIOBalance%" --query "Metrics[*].Dimensions[0].Value" --output text

The implementation follows this sequence:

  1. Assign the command name EC2 BurstBalance Instances.

  2. Set the executable to aws.

  3. Add the required arguments using cmd.arguments.add().

  4. Optionally define a regular expression in cmd.pattern to filter or parse the output.

  5. Execute the command with exec.executeCommand().

  6. Create a result-handling rule in the same rule file.

  7. Give that rule the same name as the command: EC2 BurstBalance Instances.

The matching rule receives the command output and can analyze it, generate data, trigger another action, or apply additional automation logic.

Ensure that commands run with the minimum required permissions. Store credentials securely, validate command arguments, and apply execution limits to prevent unintended or repeated operations.


Component: Engine

Feature Availability: 8.6.0 or later