I have a couple of pre-defined expressions in the simplified UI that want to test using the email notification channel. I'd like that the email body contains the either:
- the name of the pre-defined expression
- and/or the name the name of the rule/route
that trigger the email send.
Is that possible ? Are there variables that I can use in the email formatting groovy script ?
Paul

At this moment this
At this moment this information is not available in formatting scripts. Available parameters are:
from : the sender of the message
target: user's channel information
text: message text
properties : additional message properties
No hidden groovy global
No hidden groovy global variable that would allow that ?
This is not for production, but just for testing the filters.
Currently, I don't think the
Currently, I don't think the information of which route expression is used to send a message is kept in the system. The channels processes each message, compare with the route expressions and send it out if there is a match.
I'll ask the question in a different way.
As I understand it, Paul is trying to test the filter expressions that are used in the simplified UI to make sure they match the events they are supposed to, etc. As I understand it, currently the notifications come in from Smarts, and emails may be getting sent out, but there is no way for him to know it was sent due to which filter/route. is this right?
Is this information available in the channel log files?
If we step back, what is the best way for him to test these expressions with different events, etc.?
You're right, Berkay. It's
You're right, Berkay.
It's probably possible to find this information in the log file, but as I am testing against a production Smarts system and I cannot trigger on request the notifications that match the filters,I have to wait for the real notification to happen...
I would prefer a way to tag the emails, rather than browsing a looonng log file afterwards.
Understood. it would
Understood. it would certainly be easier to work in this fashion. This does not look possible with the current release. We'll need to investigate how this can be accomplished.
Currently, if the information is available in the log files, we can look into whether/how we can mine it so that you don't have to scan through log files. Still not ideal, but may help.
So the question awaiting answer : is this information currently available in the logs ?
The filter name is in the
The filter name is in the logs, as illustrated from the following extract from RapidInformer.log
08/02/28 09:26:24.316 DEBUG: [127.0.0.1 - AdapterRunner - /Message/add] Started to process request
08/02/28 09:26:24.322 DEBUG: MessageDistributor: Distributing message: PeribitSession::XPPS-XTATH001-XTSIN007-secondary_SQ is Down
08/02/28 09:26:24.325 DEBUG: MessageDistributor: Route PSU - DeviceDownEvents_email is enabled.
08/02/28 09:26:24.325 DEBUG: MessageDistributor: Evaluating exp Acknowledged == "false" && ClassName ~= "Contivity|Partition|Peribit|Router|Switch|Host|Node|S
ystem Monitoring|LagTime" && EventName~="Down|LagTime"
08/02/28 09:26:24.325 DEBUG: MessageDistributor: Evaluation result: false
08/02/28 09:26:24.325 DEBUG: MessageDistributor: Route Test - AllEvents_email is enabled.
08/02/28 09:26:24.325 DEBUG: MessageDistributor: Evaluating exp true
08/02/28 09:26:24.325 DEBUG: MessageDistributor: Evaluation result: true
08/02/28 09:26:24.325 DEBUG: MessageDistributor: sending to channel email
08/02/28 09:26:24.325 DEBUG: MessageDistributor: Got primary channel
08/02/28 09:26:24.325 DEBUG: MessageDistributor: Sending via primary channel
08/02/28 09:26:24.325 DEBUG: Queue has 1 packet(s). Start to process.
08/02/28 09:26:24.325 DEBUG: Writing to database.
08/02/28 09:26:24.325 DEBUG: DatabaseDatasourceImpl RINF_ACTION_LOGGER_DATABSAE_DATASOURCE : Preparing statement.
08/02/28 09:26:24.326 DEBUG: DatabaseDatasourceImpl RINF_ACTION_LOGGER_DATABSAE_DATASOURCE : Executing statement.
08/02/28 09:26:24.329 DEBUG: [127.0.0.1 - AdapterRunner - /Message/add] Finished to process request.
In this example, the filters are called "PSU - DeviceDownEvents" and "Test - AllEvents". I
It looks like the route name is built by appending "_" + the name of the channel ("email")
Could you add a parameter "Route" to the channel formatting scripts ?