This section describes a "hello world" use-case for the notification domain using the email connector.
If you are already familiar with setting up services in OpenEngSB about 15 minutes. (see HowTo: Setup
Create a new Email Notification Service by clicking the "New..." link for the Email Notification on the Test Client link.
In the following view you have the possibility to configure the Notification Service. The following screen provides an example for a gmail account. Please use "test1" for the Service Id field.
When you have finished setting all fields to appropriate values, create the new instance by clicking the "Save" button.
Now create another service with the Service Id "test2". Otherwise you can use exactly the same values again.
You can validate the services open the "Services" page, which should look similar to the following screenshot. All your created services should be available with the state "ONLINE".
Now we're going to validate the created services. First of all start by open the "Test Client" link. Now open the "Notification Domain" tree and choose test1. Next get the notify method from the drop down box. The available fields should change instantly. Let the attachment field free and enter anything into message and subject. The address should be a valid email address (not validated for the moment). After all the view should look similar to the following image:
Call the service by using the "Call" button. Some seconds after you've pressed the call button the following message should occur on on your screen:
Within the next seconds to minutes the address, specified by you, should receive a mail.
Next validate if the service test2 does the same. Therefore press on test2, choose notify again and enter your values. Click "Call" again and validate if you receive an email.
Till now you've used the services directly. Now one of the OpenEngSB core concepts is presented: the Domains:
To send messages via domains, instead of directly via the connectors a default receiver for a specific project has to be set. A graphical user inteface for doing so is the "Context Page":
Change the entry "domains/NotificationDomain/defaultConnector/id" to test1 or test2. Do this by clicking on the node (id). This should create a drop down box next to it. Select test1 or test2. Afterwards go back to the "Test Client" page and select "Notification Domain/domains.notification". Now choose the notify method again and try sending a message to yourself.
Again, the call was successful if you receive a message (with the prefix of the notifier you've chosen in the context).
Congratulations, you have just finished the first implementation HowTo of Open Engineering Service Bus.
Now that you've finished the most easy OpenEngSB use case go on with a more complex one: Events