Notification
Notification
The Notification module is used to manage automatically generated e-mail notifications. Such a notification can be configured via a notification rule in the submodule Rules. An overview of generated notifications can be found in the submodule Notifications.
Notification rules
A notification rule defines when and how a notification should be sent. Each rule consists of two parts: a cause (the event or condition that causes the notification) and an action (what happens when it occurs, such as sending an e-mail). Together, these elements ensure that the right people are automatically informed when specific events take place.
URI pattern
The following triggers define the events that can initiate a notification.
| Trigger | URI pattern |
|---|---|
| New preliminary transit | /Inbox/Process/%#Submitted,% |
| Preliminary transit accepted | /Inbox/Process/%#Accepted,% |
| Preliminary transit rejected | /Inbox/Process/%#Rejected,% |
| New transit | /Transits/%/Details/#OperationalTransit |
| Archive transit | /Transits/%/Details/#TransitClosed |
| Transit within 6 hours | /Transits/%/Details/#ETA6_% |
| Transit within 24 hours | /Transits/%/Details/#ETA24_% |
| Updated transit start | /Transits/%/Details/#RTDUpdated% |
| New message at transit | /Transits/%/Details/#NewMessage=% |
| New calculation request | /Transits/%/CalculationRequest/%/ |
|
Calculation started (only if there is a calculation request, the notification is only sent once) | /Transits/%/Details/#CalculationStarted |
|
Couple calculation to calculation request (only if the calculation is judged as Indicative or Definitive) | /Transits/%/Calculation/%/ |
|
Update itinerary (only for calculations coupled to a calculation request) | /Transits/%/Calculation/%/#ItineraryUpdated_% |
| Calculation error | /Transits/%/Calculation/%/#CalculationError% |
Within a notification rule, the wildcard character (%) in the URI pattern is used as a
placeholder for an identifier like the transit ID, calculation ID or name of the port.
Depending on the trigger, the (partial) port name is placed in the middle of the URI pattern or at the end.
| Module | URI pattern with wildcard | URI pattern with port name |
|---|---|---|
| Inbox | /Inbox/Process/%#Submitted,% | /Inbox/Process/%#Submitted,PortName |
| Transit | /Transits/%/Calculation/%/ | /Transits/PortName/Calculation/%/ |
Example
With the following example, an automatically generated e-mail will be sent. The content of the subject line and body is configurable as well as the recipients.
URI pattern
1
/Transits/%/Calculation/%/#CalculationError%
Action
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<Email>
<To>user1@example.com</To>
<To>user2@example.com</To>
<Summary>
<GetVariable Name="TransitSummary"/> - Calculation error
</Summary>
<Description>
<P>An error has occurred in a PROTIDE calculation.</P>
<P>
<GetVariable Name="TransitDetails"/><Br/>
<GetVariable Name="TransitUri"/>
</P>
<P>Please click the link to open the failed calculation.</P>
</Description>
</Email>