BES Device Engines enable xMatters to send notifications to and receive responses from service providers using the BlackBerry Enterprise Server (BES) protocol for BlackBerry Devices.
|
Details |
Description |
|
Name |
Name used to identify this Device Engine. |
|
Description |
Brief description of this Device Engine (optional). |
|
Notification Polling |
How often (in seconds) the Device Engine polls the notification node for new alerts. Must be a whole number greater than or equal to 10 and less than or equal to 300. |
|
Concurrent Threads |
Number of requests or tasks that this Device Engine can run at the same time. Your Active Licenses control the maximum number of available threads. |
|
Logging |
For an explanation of Device Engine logging, see Enabling Device Engine logging. |
| Note: | The following steps have to be applied to each of the Event Domains you want to use with xMatters and BES notifications. |
ELSE-IF ($content.deviceclassification == "bes")
@recipient = @event::getRecipient($content.recipient_target)
$recipientCategory = @recipient::getRecipientCategory()
IF ($recipientCategory == "DEVICE")
@person = @event::getRecipient($recipient.owner)
$userId = $person.id
ELSE
$userId = $recipient.id
ENDIF
$content.subject = "xMatters Message: " & $event.incident_id$content.message = "Message"
#Fill the html part for BES device
#Note: content.pushurl must be present, even if url is invalid
$content.pushurl = "http://localhost:8888/static"
$content.pushtitle = $content.subject
$content.htmlmessage = $content.htmlmessage & "<table width=\u0022100%\u0022 border=\u00221\u0022>"
$content.htmlmessage = $content.htmlmessage & "<tr><td><b>Situation</b></td><td>" & $content.situation & "</td></tr>"
$content.htmlmessage = $content.htmlmessage & "<tr><td><b>Device</b></td><td>" & $content.device & "</td></tr>"
$content.htmlmessage = $content.htmlmessage & "<tr><td><b>Time of Incident</b></td><td>" & $userTime & "</td></tr>"
$content.htmlmessage = $content.htmlmessage & "</table>"
IF (EXISTS($content.choices))
$content.htmlmessage::add("<br>Your response choices are:")#Change the URL to point to your web server
$content.htmlmessage::add("<FORM action=\u0022http://localhost:8888/jsp/ProcessNotificationResponse.jsp\u0022 method=\u0022post\u0022>") $content.htmlmessage::add("<P><SELECT name=\u0022responseChoice\u0022>")FOR ($choice : $content.choices)
$content.htmlmessage::add("<OPTION>")$content.htmlmessage::add($choice)
$content.htmlmessage::add("</OPTION>")ENDFOR
$content.htmlmessage::add("</SELECT><br />") $content.htmlmessage::add("<input type=\u0022hidden\u0022 name=\u0022notificationId\u0022 value=\u0022" & $content.notification_key &"\u0022>") $content.htmlmessage::add("<input type=\u0022hidden\u0022 name=\u0022userId\u0022 value=\u0022" & $userId & "\u0022>") $content.htmlmessage::add("<input type=\u0022hidden\u0022 name=\u0022deviceType\u0022 value=\u0022BES\u0022>") $content.htmlmessage::add("<br><INPUT type=\u0022submit\u0022 value=\u0022Respond\u0022><INPUT type=\u0022reset\u0022></P></FORM>")ENDIF
| Note: | The above code applies to the default script package. For other script packages refer to the out-of-the-box script packages delivered with xMatters. |
#Change the URL to point to your web server
$content.htmlmessage::add("<FORM action=\u0022http://localhost:8888/jsp/ProcessNotificationResponse.jsp\u0022 method=\u0022post\u0022>")
| Note: | The URL must be in this form so a Blackberry Device can access it from its browser. |