= SAMBRO User Guide = [[TOC]] [http://eden.sahanafoundation.org/wiki/Deployments/SAMBRO An Introduction to SAMBRO] (Sahana Alerting and Messaging Broker) == Purpose == The user guide is comprehensive with instructions from setting up SAMBRO software to issuing alerts. It is intended for all user levels: novices to experts. The guide is structured to take you through an actual implementation with real world examples and data. [[br]] === How to use the Guide === The user guide is designed to quickly access relevant information for performing a task and understanding the technical details. Notice that the most frequently used activities are listed first, for the users, and the seldom used (one time type) activities are listed at the bottom. We have segmented the topics as bellow: ==== Publishers (Alert Issuers) ==== The section discusses ways and means for creating a CAP message, having it authorized, and then issuing (or disseminating) to the subscribers 1. [http://eden.sahanafoundation.org/wiki/UserGuidelines/SAMBRO/Publish#CreateaCAPMessage Create a Message] for the first time and as a message originator 1. [# Update a Message] using an existing message 1. [# Cancel a Message] that has been wrongly issued or provided wrong information 1. [# Clear a Message] when the event has subsided to inform the subscribers with an 'All Clear' message ==== Implementers (Super Users) ==== Section is for CAP Implementers for orienting the CAP Broker in the country or implementation specific context. 1. [http://eden.sahanafoundation.org/wiki/UserGuidelines/SAMBRO/Implement Create Message Templates] for categories of events and user groups 1. [# Define CAP Profile] specific information (waring priorities, event types, incident tables) 1. [# Update Register of Alerting Authorities]; i.e. setup your organizational structure and alerting jurisdictions 1. [# Manage Users] by associating them with the relevant roles and alerting authority ==== Administrators ==== 1. [# Install and configure] software with web2py framework and dependencies 2. [# Basic Administration] tasks for activating an instance for the users 3. [# Testing the installation] to ensure all SAMBRO specific features are functional ==== Subscribers (Alert Recipients) ==== == Data == Note: the alert data model and its children are more or less identical to those in the [http://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.html#_Toc454352650 CAP 1.2 Specification]. The help text next to each field in the UI describes the purpose of these as in the specification document. * '''Alerts''' -- The qualifiers of the alert message. Includes alert identifier, sender, message type, scope (audience), references to other cap alerts and other fields. * '''Alert information''' -- An alert can contain more than one information element, the primary purpose of this is to annotate the alert message in multiple languages. An information part of the alert contains fields that are pertinent to the actual subject and characters of the alert. Fields include: language, category of the alert, a short description of the event, expected response type, priority, urgency, severity, certainty, target audience, auxiliary codes and parameters as metadata to the event, time of effectiveness, onset and expiry, name of the sender, headline of the event, a url, contact information etc. * '''Resource''' -- One or more files attached to the information (could be things like a map of the affected area, documents containing instructions etc.) * '''Area''' -- Each alert information item may contain one or more area fields which describe the affected geographical area and optionally provide data to place it on a map. * '''Alert templates''' -- these are a subset of alert and alert information fields which can be filled in before hand and kept ready for use during a time of emergency. This will be part of the pre-planning process for the particular Eden instance. A default empty template is provided on a fresh installation. As a first step of the alert creation procedure you will need to select a template to apply to the alert message. * '''CAP Profile''' -- These are site-wide configuration settings that can be used for configuring the cap module for a specific region's (usually a country) requirements for disaster preparedness. For an example look at [http://capan.ca/index.php/en/cap-cp/ Canadian CAP Profile]. == Workflow == Before creating a CAP template and a message, you should have [wiki:UserGuidelines/Alerts#ConfiguringaCAPProfile created a CAP Profile] first. === Create a CAP Message === '''[[http://www.youtube.com/watch?v=WvObh2BTABc&feature=youtu.be | Watch the Video]]''' The workflow for creation of a CAP alert is as below. As the first step of the process, you will need to select a template. [[Image(http://i.imgur.com/nIhQh.png)]] ---- A form is displayed to you after the template has been applied on it. You can edit the alert qualifiers now. [[Image(http://i.imgur.com/K98gj.png)]] ---- After you are done and submitted the above form you will be redirected to a page where you can add information about the alert. Fill in the details as it applies [[Image(http://i.imgur.com/IZjFy.png)]] ---- After saving the alert information you can click on the "Open" button against the information row to edit it further or to add its components such as Area or Resource. [[Image(http://i.imgur.com/0LzB4.png)]] The next image is slightly obsolete. It shows an embedded "Location" widget (a subform with pick lists, map, and "Draw on Map" button). That's gone now. Instead, alongside the Area tab is a "Location" tab. From that tab, there is an "Add Location" button -- clicking that exposes the location widget. This change allows adding multiple location records to an Area, as the CAP specification allows. [[Image(http://i.imgur.com/GSTIz.png)]] Click on the "Draw on Map" button to open a map to mark the boundary of the affected area. [[Image(http://i.imgur.com/V4J92.png)]] Some Sahana versions have a toolbar on the map, as shown: its polygon tool will be active by default when you open the map (or select it as needed later). In any event, successively click then move the mouse, drawing a polygon with vertices at each click. Double-clicking ends the polygon. [[Image(http://i.imgur.com/6Fqzj.png)]] Close the map and click on save to commit the area to the alert information. ---- You can now also attach files to the Alert information by going to the "Resources" tab. [[Image(http://i.imgur.com/jfIyr.png)]] ---- == Configuring a CAP Profile == [[http://www.youtube.com/watch?v=nfW4vs7j5Kw | Watch the Video]] CAP profiles can be configured using the deployment settings. The following settings can be set as follows {{{ settings.cap.identifier_prefix = "prefix" # string settings.cap.identifier_suffix = "suffix" # string settings.cap.codes = [...] # key-value pairs settings.cap.parameters = [...] # key-value pairs settings.cap.geocodes = [...] # key-value pairs settings.cap.base64 = False # boolean settings.cap.languages = OrderedDict([ ("en-US", "English"), ("fr", "Français") ...]) settings.cap.priorities = OrderedDict([ (", "", , , , ), ... ]) }}} Key-value pairs above are python lists containing many dictionaries detailing the behavior and parameters for the key-value pair. It should take the following form {{{ kvpairs = [ dict(key="", value="", comment="", immutable=, options=[("", ""), ...]), ... ] }}} * Here the comment and options dictionary values are optional. * The options argument is a list of ("", "") pairs and provides a drop-down to pick the value for the key from. * The mutable argument is a bit-map saying whether to lock the key field or the value field or both in the key-value user interface. (by locking we mean disabling.) You can use it like so: {{{ KEY_MUTABLE = 1 VALUE_MUTABLE = 2 immutable = KEY_IMMUTABLE # only key is immutable immutable = VALUE_IMMUTABLE # only value is immutable immutable = KEY_IMMUTABLE | VALUE_MUTABLE # both immutable immutable = 0 # both immutable }}} == Future Plans == See the [wiki:BluePrint/CAPBroker BluePrint/CAPBroker]