...
The date and time when the event occurred, serialized as shown below:
Code Block | ||
---|---|---|
| ||
<DateTime> <Utc> <DateString>01.10.2020</DateString> <TimeString>12:00:00</TimeString> <TimeZone>+00<TimeZone>00:00</TimeZone> <IsoFormat>2020 <Iso>2020-10-01T12:00:00.0000000</IsoFormat>.0000000Z</Iso> </Utc> <Local> <DateString>01.10.2020</DateString> <TimeString>14:00</TimeString> <TimeZone>+02:00</TimeZone> <IsoFormatLocalTime>2020<Iso>2020-10-01T1301T14:00:00.0000000</IsoFormatLocalTime> <FormattedLocalTime>01.10.2020 13:00:00</FormattedLocalTime> </DateTime> |
Info |
---|
Note: As the event date is in UTC, the xml structure contains also the |
Event List
...
.0000000+02:00</Iso>
</Local>
</DateTime> |
Event Subscriber
There are a couple of event subscribers available which can handle an event.
Subscriber | Description |
---|---|
SMS | Sends the transformed event data by SMS |
Sends the transformed event data by mail | |
UI | Shows the transformed event data in the UI |
Workflow | Executes a workflow with the event data as an input |
Event List
Page Tree | ||
---|---|---|
|
Making the notification template
If you want to use data from the event in the notification template you will need to write correct XPath to the data.
Example 1: template that just writes event name. notice Xpath EventData/EventInfo/Event
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="EventData/EventInfo/Event"/>
</xsl:template>
</xsl:stylesheet> |
Example 2: template that takes something from event data - let’s say we have event UserTermsAndConditionsAccepted and we want to write TargetSystemName
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="EventData/UserTermsAndConditionsAccepted/TargetSystemName"/>
</xsl:template>
</xsl:stylesheet> |
Notice that in XPath we put the name of the event data contract and then path to the property which was there simply TargetSystemName
Example 3: notification in HTML format and with table inside event data (event data contract is MachineLogonUserNotificationDataContract
)
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Logon Users of the week</h2>
<xsl:value-of select="EventData/EventInfo/EventMessage"/>
<h2>
<xsl:value-of select="EventData/MachineLogonUserNotificationDataContract/MachineName"/>
</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Time</th>
<th>Identifier</th>
<th>Action</th>
</tr>
<xsl:for-each select="EventData/MachineLogonUserNotificationDataContract/LogonUsers/LogonUserHeaderDataContractArray/LogonUserHeaderDataContract">
<tr>
<td>
<xsl:value-of select="TimeStamp" />
</td>
<td>
<xsl:value-of select="Identifier" />
</td>
<td>
<xsl:value-of select="Action" />
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet> |
How to do the XPath
As you noticed Xpath start with EventData then you set event data contract and go to the data contract itself of use EventInfo.
EventInfo contains:
Code Block | ||
---|---|---|
| ||
{
EventMessage : string
Event : string, //translated event name
Level : string //translated event level
} |
Template Name
In the template name you should specify following parts:
Descrription | |
---|---|
Type (required) | What part of the notification this template is for. Possible values
|
Event | For which event is this template. (prefix '_e') Possible values: id of the event |
Level | For which event level is this template. (prefix '_l'). Possible values (subscription_event_level table):
|
Message type | For which message type is this template. (prefix '_t'). Possible values (subscription_notification_type table):
|
Participating entities | For which entities is this template. (prefix '_p') Possible values: id of the entity Can occur multiple times |
Examples:
MessageBodyHtml_e14_l1_t2 - this is HTML message body for event 14 with level Info and type Email
MessageBodyHtml_e19 - this is HTML message body for event 19 for any level and any type