BES Device Engines

BES Device Engines enable AlarmPoint to send notifications to and receive responses from service providers using the BlackBerry Enterprise Server (BES) protocol for BlackBerry Devices.

BES Device Engine details

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 BES Device Engines.

To use BlackBerry Enterprise Server notifications with AlarmPoint:
  1. Start the AlarmPoint Developer IDE and set up the Database Connection. (For more information about installing, configuring, and using the AlarmPoint Developer IDE, refer to the AlarmPoint Developer’s Guide & Scripting Reference.)
  2. Check out the script packages for the event domains you want to configure.
Note: The following steps have to be applied to each of the Event Domains you want to use with AlarmPoint and BES notifications.
  1. If you upgraded from a version prior to AlarmPoint 3.1, add the following code to each of the presentation scripts (If you are working with a new installation, skip this step.):
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 = "AlarmPoint 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:")
 
    #You may change the URL to point to the alarmpoint web
    $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 AlarmPoint.
  1. In each of the presentation scripts, locate the following line and change localhost in the URL to the fully qualified domain name of the AlarmPoint Web Server.
    #You may change the URL to point to the alarmpoint web
    $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.
  1. Save and validate the script, update the version number, and check in the script package.
  2. Repeat steps 3 to 6 for each of the script packages you are planning to use in AlarmPoint.