Tutorial: Hello World for Groups
Access the Web interface to the previously instantiated engine, e.g. http://localhost:8125.
For a running Hello World example you need to do three things:
- Setup Your first Rule
- Emit Your first Event into the System, which triggers the Rule, that uses your Action Dispatcher
1. Setup Your first Rule
1.1. In the navigation, click on “Create Rule”:
You will see the skeleton of an empty Rule, called “My new Rule”:
An ECA-Rule has three sections: EVENT, CONDITIONS and ACTIONS:
Whenever the specified EVENT is detected, it will be compared against the CONDITIONS and if all are met, the ACTIONS are dispatched.
1.2. Type Hello World Rule
in the input field Rule Name
1.3. In the select box Event Type
, select Custom Event
1.4. In the input field Event Name
, type button-click
1.5. Leave the CONDITIONS section empty for now (keep the existing brackets)
1.6. In the select box under ACTIONS, choose Logger -> writeLog
1.7. In the input filed msg
that should show up now, type Hello World
1.8. Click “Save Rule”
The system responds with Rule 'Hello World Rule' stored and activated!
:
-> Congratulations you stored your first Rule!
2. Emit Your first Event into the System
The system is now listening for button-click
Events and will dispatch your chosen Action as soon as a button-click
Event is detected. In order to emit such an Event into the system you need to…
2.1. …click on “Push Event”, in the navigation:
You will see a prefilled Event in JSON format.
The type of the Event is button-click
, the same as you just defined in your first Rule. You do not need to care about the body
section of the Event for now and could also just delete that section, so you’re left only with:
{
"eventname": "button-click"
}
2.2. Now click on “Push Event into System” and the system will respond with Thank you for the event: button-click
:
-> Congratulations you emmitted your first Event into the system!
4. Check the Result
Now you need to check the Rule log in order to see the result of this Hello World tutorial.
4.1. Click on “Edit Rules”, in the navigation:
You see a list of all your active Rules, which currently only consists of your Hello World Rule
. Hover over the icon that looks like a sheet of paper. A tooltip saying Show Rule Log
appears.
4.2. Click on the “Show Rule Log” icon of the Hello World Rule
:
Ỳou will see all the log entries that correspond to your Rule. For your Rule this should be the initialization of the Rule and also the manually triggered Event with the logged message Hello World
:
Congratulations, you completed the Hello World tutorial!