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.
🖥️ Using the Rules Screen
Go to GermainUX Workspace -> Left Menu → Settings → Analytics -> Rules, and then click +.
📋 Define and Validate the Rule
|
Step |
Instructions |
|---|---|
|
Enter a name |
Enter a unique rule name, such as |
|
Add the content |
Paste the contents of the |
|
Edit the rule |
Modify the rule as required. Use the expand icon in the upper-right corner to enlarge or restore the editing area.
|
|
Validate |
Click Validate to identify syntax or configuration issues.
|
|
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.
🚀 Execute a Command from a Rule
A rule can execute a nested command and process its output within the same rule file.
The example below executes an AWS CLI command and analyzes its result.
|
Item |
Example |
|---|---|
|
Command name |
|
|
Program |
|
|
Arguments |
Added individually through |
|
Output pattern |
An optional regular expression assigned to |
|
Execution method |
|
|
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:
-
Assign the command name
EC2 BurstBalance Instances. -
Set the executable to
aws. -
Add the required arguments using
cmd.arguments.add(). -
Optionally define a regular expression in
cmd.patternto filter or parse the output. -
Execute the command with
exec.executeCommand(). -
Create a result-handling rule in the same rule file.
-
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