App XML

Define behavior in WinGuard

The use of an App XML offers the possibility to clearly separate the definition of the module’s object model from the application-specific definitions (<App> sections).

This is recommended whenever it is foreseeable that a user might make changes/customizations to the <App> sections. Module and app definitions can thus be managed completely separately from each other.

The principle is simple. Instead of placing the different <App> sections in the Module XML, they are inserted identically in the App XML instead. It correlates directly with the Module XML and contains the frame of the Object, Activity and Incident definitions in the same form. However, no definitions for the objects themselves are taken from the App XML, only the respective <App> section is evaluated. The App XML altogether can be understood as an addition to the Module XML. It is loaded after the Module XML and the found <App> definitions are added.

The default name of the App XML is derived from the name of the module, just like the Module XML. For example, a module “MyMod” uses the Module XML file MyMod.module.xml and the App XML file MyMod.app.xml and so on. This can be customized using the <AppDef> definition in the Manifest XML. The App XML file is loaded from the WinGuard project directory. If it is not yet available when starting an Extension, it is copied there. However, it will never be overwritten. When setting up an Extension in WinGuard, an App XML file can alternatively be specified explicitly or by using the custom folder setting.

The root node <AppDef> contains three sections for defining Objects, Activities and Incident. The different XML elements and attributes are described in detail below.

<AppDef>

Root element of the Module XML file with following sections. The structure of the Objects has to match the Module XML.

Description
<Objects> Container for <Object> definitions.
<Activities> Container for <Activity> definitions.
<Incident> Definition for the <Incident> Object. Only the <App> sections are relevant there.

<Object>

Defines an Object type.

Description Remarks
id Symbol. Defines the URL entry for this Object.

Indirectly defines the type together with the parent Object IDs, separated by a point (.) (Automatic type generation).
“activity”, “incident” and “operation” are not allowed as ID for Node Objects
<App>… Definitions for the application (WinGuard) with regard to how to handle this Object.
<Object>… Any subordinate Objects
<ObjectType>… Any alternative Object types at this address Node
<AppObjectType>… ≥ext.adapter 0.1.13 Possibility to overwrite <Objects>

<AppObjectType> ≥ext.adapter 0.1.13

Possibility to overwrite <Objects> from the Module XML. Nested <AppObjectType> definitions are not allowed.

The <AppObjectType> element itself defines an alternative Object type and may contain the child nodes listed below. Only the attributes documented in the following tables can be overwritten.

Description
id Symbol. Identifies this alternative Object type. Results in the ObjectType Object@<id>.
name Display name of the alternative Object type.
<Property>… Overwrite of a <Property> defined in the Module XML.
<State>… Overwrite of a <State> defined in the Module XML.
<Event>… Overwrite of an <Event> defined in the Module XML.
<Operation>… Overwrite of an <Operation> defined in the Module XML.

<Property>

Overwrite of a <Property> from the Module XML. The following attributes can be overwritten.

Description Remarks
id (mandatory) Symbol. Identifies the <Property> to overwrite.
name Display name of the Property.
minval Minimum value. Can only restrict values (the range can only get smaller than defined in the Module XML).
maxval Maximum value. Can only restrict values (the range can only get smaller than defined in the Module XML).
maxlen Maximum length. Can only restrict values (the range can only get smaller than defined in the Module XML).
readonly Marks the Property as read-only. Can only restrict values (cannot be set to 0 if set to 1 in the Module XML).
default Default value of the Property.
value Prefilled value of the Property. ≥ext.adapter 0.1.14 Used to prefill a parameter of an aliased <Operation>, see below.
available Availability condition of the Property.
desc Description of the Property.

<State>

Overwrite of a <State> from the Module XML. The following attributes can be overwritten.

Description
id (mandatory) Symbol. Identifies the <State> to overwrite.
name Display name of the State.
desc Description of the State.

<Event>

Overwrite of an <Event> from the Module XML. The following attributes can be overwritten.

Description
id (mandatory) Symbol. Identifies the <Event> to overwrite.
name Display name of the Event.
desc Description of the Event.

<Operation>

Overwrite of an <Operation> from the Module XML. The following attributes can be overwritten.

Description Remarks
id (mandatory) Symbol. Identifies the <Operation> to overwrite.
name Display name of the Operation.
available Availability condition of the Operation.
desc Description of the Operation.
alias ≥ext.adapter 0.1.14 Maps this operation to an existing operation from the Module XML. See below.
<Property>… Overwrite of an Operation <Property>.

The <Mapping> of an <AppObjectType> is merged with the <Mapping> of the base Object. The resulting Object type therefore contains both the base Object mappings and the mappings defined in the <AppObjectType>.

For example:

<ModuleDef id="test">
	<Nodes>
		<Node id="Sensor" object="Sensor" />
	</Nodes>
	<Objects>
		<Object id="Sensor">
			<App domain="Fire" device="Fire.Sensor" member="true" >
				<Functionality id="Off" />
				<Functionality id="Revision" />
				<Functionality id="Reset" />
				<Mapping>
					<State id="Off" value="true" appstate="Off" appevent="Off" />
					<State id="Revision" value="true" appstate="Revision" appevent="Revision" />
					<Event id="Alarm" appstate="Alarm" appevent="Alarm" />
					<Event id="PreAlarm" appstate="PreAlarm" appevent="PreAlarm" />
					<Event id="Warning" appstate="Warning" appevent="Warning" />
					<Event id="RevAlarm" appstate="RevAlarm" appevent="RevAlarm" />
					<Event id="RevFault" appstate="RevFault" appevent="RevFault" />
				</Mapping>
			</App>
			<AppObjectType id="EventSwitch">
				<App domain="Fire" device="Fire.Sensor" member="true" >
					<Mapping>
						<Event id="Alarm" appstate="Fault" appevent="Fault" />
						<Event id="Fault" appstate="Alarm" appevent="Alarm" />
					</Mapping>
				</App>
			</AppObjectType>
		</Object>
	</Objects>
</ModuleDef>

The Sensor@EventSwitch Object type contains both the base Object mappings (Off, Revision, PreAlarm, Warning, RevAlarm, RevFault) and the mappings defined in the EventSwitch <AppObjectType> (Alarm, Fault). It is also possible to overwrite an existing mapping: since the base Object already defines an Alarm event, the Alarm mapping in the EventSwitch <AppObjectType> overwrites it (mapping Alarm to Fault instead of Alarm).

Example (using part of DemoPanel):

In this example, the Module XML has defined an <Object id="Display"> with

<Object id="Display">
	<Operation id="SetDisplayText">
	    <Property id="Text" type="string" />
	    <Property id="Line" type="int" minval="1" maxval="2" default="1" />
	</Operation>
</Object>

In the App XML this can now be overwritten, e.g. with

<Object id="Display">
    <App domain="Other" device="TextDisplay">
         <Functionality id="SetDisplayText" />
    </App>
    <AppObjectType id="SecondLine" name="Random translation">
	    <Operation id="SetDisplayText">
    		<Property id="Line" default="2" />
	    </Operation>
    </AppObjectType>
</Object>

This would lead to two possible ObjectTypes:

  • Display
  • Display@SecondLine: default value changed

Please note that only one of these overrides can be used for a specific Datapoint, since they all use the same URL.

The alias attribute maps an operation defined in the App XML. This allows the application to expose its own operation IDs while still executing the native extension command. Parameters of the referenced operation can also be prefilled. For example, a module may define a generic Pulse operation that requires a duration parameter. The App.xml can then define a separate operation such as OpenGate, which internally executes Pulse with a predefined duration of 20 seconds.

Module XML:

<Object id="Output">
	<Operation id="Pulse">
		<Property id="Duration" type="int" minval="1" maxval="60" />
	</Operation>
</Object>

In the App XML, an application-specific operation can be defined with the optional alias attribute:

<Object id="Output">
	<AppObjectType id="Gate">
		<Operation id="Pulse" alias="OpenGate">
			<Property id="Duration" value="20"/>
		</Operation>
	</AppObjectType>
</Object>

The application can now use the operation OpenGate. Internally, it is mapped to the module operation Pulse, with Duration prefilled to 20.

<Activity>

Defines an Activity.

Description Remarks
id Symbol. ID of an Activity
type Symbol Path. One of the 4 pre-defined WG Activity types (showvideo, showvideoexternal, call, playaudio).
local ≥ext.adapter 0.1.6 Used to flag the Activity as “local”, which means that it shall be evaluated only at the station where it originated from. Additionally, App States set from such an Activity are kept local to the origin station and are not distributed across stations - except for alarm App States (Alarm, Prealarm, Warning) which are always distributed across stations. 0/1; default: 0
<ObjectRole>… Any role must be defined in order to create an <App> section.

<ObjectRole>

Defines a role with which an Object can be a participant of the Activity.

Description
id Symbol. ID of the role
<App>… Definitions for the application with regard to how to handle Objects with this role.

<App>

The definitions here are only meant for the application (WinGuard) to enable it to “understand” the Object/Activity/Incident and to handle the existing States and Events. Objects, Activities and Incident of the Extension function completely and independently of this section, but with this section they receive a meaning for the application, so to speak.

Description
domain Assigns the specified app domain to the Object/Activity.
device Assigns the specified app device type (app object or app Activity) to the Object/Activity.
member 0/1. If an Object is defined within another Object, it can be marked as “member” with this property. Member objects get their meaning in close connection with the parent Object. The definition can be considered to mean “part of”. In the application, display and handling can be distinguished for such Objects.
value 0/1. An Object marked as “value” is managed in WinGuard as “Value” Datapoint with corresponding Functionality. The first State of the Object is handled as value of the Object. If the State is of type “int” or “double”, it will be interpreted as an analog/continuous measured value by default, i.e. it is possible to set limit values, for example.
enum 0/1. Marks an Object marked as “value” as a discrete measured value, i.e. one can overwrite its behavior at the Datapoint for concrete values, but not for whole sections.
If the measurement value state has a limited set of values (i.e. it contains <Option>s), it is implicitly marked as a discrete measurement value.
Discrete measurement values must be of type “int”, “double” or “string”.
<Functionality>… Assigns the specified app Functionalities to the Object/Activity.
<Mapping> Section for defining the State, Event and Incident property mappings.
<Values> Lists the States of the Object that can be projected as “Value” Datapoint.
<Operation>… Section to autofill Operation props.
<Create>… Section to autofill Event props for creating an Incident.

<Functionality>

Assignment of an app Functionality.

Description
id Symbol Path. Assigned Functionality; value from app definitions

<Values>

References the States of the Object which can be projected as “Value” Datapoint. This is useful to define e.g. a camera that contains several sensors (pressure, temperature).

<State>

State list entry inside a <Values> section.

Description =
id Symbol. The ID of the referenced Object State.
enum 0/1. The “enum” attribute marks the State as a discrete measurement value, i.e. one can overwrite its behavior at the Datapoint for concrete values, but not for entire sections.
If the measured value State has a limited set of values (i.e. it contains <Option>s), it is implicitly marked as a discrete measured value.
Discrete measurement values must be of type “int”, “double” or “string”.
0/1 Default: 0

<Operation>

Description
id Symbol Path. The ID of the Operation.
<Property>… Property of the Operation.

<Property>

Description Remarks
id Symbol. The ID of the property.
autofill This Property’s value will be filled automatically by WinGuard Valid values for this attribute are:
- LocalIntercomURL: The URL of the local intercom Object defined for the station where the Operation is triggered.
- LocalPhoneURL ≥ext.adapter 0.1.8: The URL of the local phone Object defined for the station where the Operation is triggered. For meta-datapoints, the first Object of the same Extension is used.
- Properties of the current station, user and event using Property paths, e.g., station.Name, user.Code or event:Link.Url. Note that the name of the Event Property is preceded by : instead of .

Special case for Incident: The Event always refers to the Incident’s Event, not the current Event (the syntax for accessing the Properties of the Incident Event stays the same, i.e., event:<Property>). It also has no access to the LocalIntercomURL/LocalPhoneURL Properties.

<Create>

Description
<Property>… A property that is sent to the adapter when calling incident.Create.

<Property>

Description Remarks
id Symbol. The ID of the property for creating an Incident.
autofill This property’s value will be filled automatically by WinGuard Valid values for this attribute are:
- properties of the current station, e.g. station.Name,station.Num
- properties of the current user, e.g. user.FirstName, user.Code
- properties of the Event for which the Incident is created, e.g. event:Link.Url, event:AcceptUser. Note that the name of the Event property is preceded by : instead of .

<Mapping>

Definition of State, Event and Incident property mappings. The <State>, <Event> and <Property> values relate to the corresponding fields of the Object.

Description Remarks
<State>… State mapping definitions
<Event>… Event mapping definitions
<Generic> ≥ext.adapter 0.1.0 Generic mapping definitions Only available for <ObjectRole> in <Activity>
<Property>… Incident property mapping definitions Only available for Incident

<State>

Defines the mapping for a specific State ID/value combination.

Description Remarks
id (mandatory) Symbol. Identifies the State uniquely within the parent element.
value Value indication The mapping takes effect if the value of the State is equal to this value.
valuefrom Indication of a max. limit value The mapping takes effect if the value of the State is greater than this value.
valueto Indication of a min. limit value The mapping takes effect if the value of the State is smaller than this value.
deadband Specification of a tolerance range, which is added to the min. limit value or subtracted from the max. limit value. Hysteresis
condition Defines an additional condition when this mapping should take effect, similar to the “available” attribute for Operations. See also Expressions.
appstate Symbol. Triggered App State Value from app definitions
appevent Symbol. Triggered App Event Value from app definitions
appstate_text Text of the Datapoint State to be triggered.
appevent_text Text of the App Event to be triggered.
prio Priority of the App Event to be triggered. 0..9
<AppEvent> Alternative notation for definitions with regard to the App Event to be triggered.
<AppState> Alternative notation for definitions with regard to the Datapoint state to be triggered.

The attributes “value”, “valuefrom” and “valueto” are exclusive. Only one of the three should be specified.

The specification of the “deadband” attribute is only considered if “valuefrom” or “valueto” is set.

If an <AppEvent> element is embedded in the <State> element, the “appevent”, “appevent_text” and “prio” attributes will be ignored.

If an <AppState> element is embedded in the <State> element, the “appstate” and “appstate_text” attributes will be ignored.

<Event>

Defines the Mapping for a specific Event.

Description Remarks
id (mandatory) Symbol. Identifies the Event within the Object. The same IDs can be assigned, but with different conditions.
condition Defines an additional condition when this mapping should take effect, similar to the “available” attribute in Operations. See also Expressions
appstate Symbol. Triggered App State Value from app definitions
appevent Symbol. Triggered App Event Value from app definitions
appstate_text Text of the Datapoint state to be triggered.
appevent_text Text of the App Event to be triggered.
prio Priority of the App Event to be triggered. 0..9
<AppLog> A log entry to be created.
<AppEvent> Alternative notation for definitions with regard to the App Event to be triggered.
<AppState> Alternative notation for definitions with regard to the Datapoint state to be triggered.

If an <AppEvent> element is embedded in the <Event> element, the “appevent”, “appevent_text” and “prio” attributes will be ignored.

If an <AppState> element is embedded in the <Event> element, the “appstate” and “appstate_text” attributes will be ignored.

<Generic> ≥adapter 0.1.0

Defines a generic mapping independent of any States or Events. This element can only be placed in <Mapping>s for <ObjectRole>s.

Description Remarks
id (mandatory) Symbol. Identifies the mapping and the resulting App Event text and identifiers. The same IDs can be assigned, but with different conditions.
condition Defines a condition when this mapping should take effect, similar to the “available” attribute in Operations. See also Expressions
appstate Symbol. Triggered App State Value from app definitions
appevent Symbol. Triggered App Event Value from app definitions
appstate_text Text of the Datapoint state to be triggered.
appevent_text Text of the App Event to be triggered.
prio Priority of the App Event to be triggered. 0..9
appurl If triggered by an Activity member that has no corresponding Object (e.g. an external caller, identified by number instead of URL), this Datapoint is used to create the App Event.
Note: In that case you cannot change App States, only App Events.
Note: This Datapoint must have an empty link, i.e. its URL must be empty.
E.g. “datapoint[97e50b3f-4e6d-4abb-9baf-9ddaa6556b94]”
<AppEvent> Alternative notation for definitions with regard to the App Event to be triggered.
<AppState> Alternative notation for definitions with regard to the Datapoint state to be triggered.

If an <AppEvent> element is embedded in the <Generic> element, the “appevent”, “appevent_text” and “prio” attributes will be ignored.

If an <AppState> element is embedded in the <Generic> element, the “appstate” and “appstate_text” attributes will be ignored.

<Property>

Defines the name mapping for a property of an Incident.

Description Remarks
id (mandatory) Symbol. Identifies the property within the Incident as used by the adapter. The same IDs can be assigned multiple times, but with different “as” assignments.
as Defines an alias ID for this property that is referenced by WinGuard. This can also be used to assign a property to a specific textmacro.

The combination of “id” and “as” can be used to map the same adapter-property to multiple separate properties in WinGuard:

<Property id="AdapterProp" as="MyProp"/>
<Property id="AdapterProp" as="Textmacro[47]"/>

<AppLog>

Defines an entry in the system log.

Description
id Symbol. Used only to form the LNG ID for the entry text. → “[event.<id>.log]”
text Alternatively, explicit text value for the log entry.
props Comma-separated list of property IDs from the context that will be added to the log entry.
tags Comma-separated list of tags that the log entry shall contain.
type Message type. Info, warning and fault are available.

<AppEvent>

Defines properties of the Event to be triggered for a concrete <State> or <Event> mapping.

Description Remarks
id The ID that is assigned to the App Event to be triggered. If an App Event with this ID is already pending, no new App Event will be created.
If no ID is specified, the ID of the parent <State> or <Event> element will be used.
type Symbol. Type of App Event see AppEvents
text Display text of App Event
prio Priority of App Event 0..9
<Property>… Optional definitions for Event properties. Mainly used for resources.
<Property>
Description Remarks
id Symbol. The ID of the property
attachment (only for resources of the type “data”) Name of the attachment. Resources of the type “data” can only be persisted as an attachment of a WinGuard event created in this context.
persist (only for resources) The resource should be persisted. 0/1: Default: 0

<AppState>

Defines properties of the Datapoint state to be triggered for a concrete <State> or <Event> mapping.

Description Remarks
type Symbol. Type of Datapoint state Value from app definitions
text Display text of the Datapoint state

Samples

App XML Outline

<AppDef>

	<Objects>
		<Object>
			<App domain="" device="" name="" >
				<Functionality id="" />
				<Mapping>
					<State id="" appstate="" appevent="" prio="" />
					<Event id="" appstate="" appevent="" prio="" />
				</Mapping>
				<Operation id="">
					<Property id="" autofill="" />
				</Operation>
			</App>
			<Object>
				<!-- ... -->
			</Object>
		</Object>
	</Objects>

	<Activities>
		<Activity id="" type="">
			<App domain="" device="" />
		</Activity>
	</Activities>

	<Incident>
		<App>
			<Mapping>
				<Property id="" as="" />
			</Mapping>
			<Create>
				<Property id="" autofill="" />
			</Create>
			<Operation id="" />
			<Operation id="">
				<Property id="" autofill="" />
			</Operation>
		</App>
	</Incident>

</AppDef>

DemoPanel App XML

If the <App> sections were swapped out of the DemoPanel Module XML, the App XML would look like this:

<AppDef>

		<Objects>

			<!-- DemoPanel -->
			<Object id="DemoPanel">
			<App domain="Other" device="Device">
				<Mapping>
					<State id="@connectionfault" value="false" appstate="Fault" appevent="Fault" appevent_text="[event.notconnected]" />
				</Mapping>
			</App>

			<!-- DemoPanel.Fire -->
			<Object id="Fire" exclude="1">

				<!-- DemoPanel.Fire.Panel -->
				<Object id="Panel" >
					<App domain="Fire" device="Fire.Panel" />
				</Object>

				<!-- DemoPanel.Fire.Zone -->
				<Object id="Zone" >
					<App domain="Fire" device="Fire.Zone">
						<Functionality id="Off" />
						<Functionality id="Revision" />
						<Functionality id="Reset" />
					</App>

					<!-- DemoPanel.Fire.Zone.Sensor -->
					<Object id="Sensor">
						<App domain="Fire" device="Fire.Sensor" member="1">
							<Functionality id="Off" />
							<Functionality id="Revision" />
							<Functionality id="Reset" />
							<Mapping>
								<State id="Off" value="true" appstate="Off" appevent="Off" prio="2" />
								<State id="Revision" value="true" appstate="Revision" appevent="Revision" />
								<Event id="Alarm" appstate="Alarm" appevent="Alarm" prio="7" />
								<Event id="PreAlarm" appstate="PreAlarm" appevent="PreAlarm" prio="6" />
								<Event id="Warning" appstate="Warning" appevent="Warning" prio="5" />
								<Event id="RevAlarm" appstate="RevAlarm" appevent="RevAlarm" prio="1" />
								<Event id="Fault" appstate="Fault" appevent="Fault" prio="4" />
								<Event id="RevFault" appstate="RevFault" appevent="RevFault" prio="1" />
							</Mapping>
						</App>
					</Object>
				</Object>

				<!-- DemoPanel.Fire.Control -->
				<Object id="Control">
					<App domain="Fire" device="Fire.Control">
						<Functionality id="Off" />
						<Functionality id="Activate" />
						<Mapping>
							<State id="Fault" value="true" appstate="FAULT" appevent="Fault" prio="4" />
							<State id="Off" value="true" appstate="OFF" appevent="Off" prio="2" />
							<State id="Active" value="true" appstate="ACTIVE" appevent="Active" prio="3" />
						</Mapping>
					</App>
				</Object>

				<!-- DemoPanel.Fire.Intervention -->
				<Object id="Intervention">
					<App domain="Fire" device="Fire.Control">
						<Functionality id="Activate" />
						<Mapping>
							<State id="Stage" value="Reaction" appstate="PreAlarm" />
							<State id="Stage" value="Investigation" appstate="Alarm" />
							<State id="Stage" value="Elapsed" appstate="Message" />
							<State id="Active" value="true" appstate="Active" />
						</Mapping>
					</App>
				</Object>
			</Object>

			<!-- DemoPanel.Intrusion -->
			<Object id="Intrusion" exclude="1">

				<!-- DemoPanel.Intrusion.Panel -->
				<Object id="Panel">
					<App domain="Intrusion" device="Intrusion.Panel" />
				</Object>

				<!-- DemoPanel.Intrusion.Area -->
				<Object id="Area">
					<App domain="Intrusion" device="Intrusion.Area" >
						<Functionality id="Arm" />
						<Mapping>
							<State id="Armed" value="true" appstate="Armed" />
							<State id="Armed" value="false" appstate="Disarmed" />
						</Mapping>
					</App>
				</Object>

				<!-- DemoPanel.Intrusion.Sensor -->
				<Object id="Sensor">
					<App domain="Intrusion" device="Intrusion.Sensor" >
						<Functionality id="Off" />
						<Mapping>
							<State id="Active" value="true" appstate="Active" appevent="Active" prio="3" />
							<State id="Fault" value="true" appstate="Fault" appevent="Fault" prio="4"/>
							<State id="Off" value="true" appstate="Off" appevent="Off" prio="2" />
							<Event id="Alarm" appstate="Alarm" appevent="Alarm" prio="7" />
						</Mapping>
					</App>

					<!-- DemoPanel.Intrusion.Sensor.Panic -->
					<ObjectType id="Panic" />

				</Object>
			</Object>

            <!-- DemoPanel.Video -->
			<Object id="Video" exclude="1">

				<!-- DemoPanel.Video.Recorder -->
				<Object id="Recorder">
					<App domain="Video" device="Video.Recorder" >
						<Mapping>
							<State id="Fault" value="true" appstate="Fault" appevent="Fault" prio="4" />
						</Mapping>
					</App>

					<!-- DemoPanel.Video.Recorder.Camera -->
					<Object id="Camera" >
						<App domain="Video" device="Video.Camera">
							<Functionality id="Reset" />
							<Mapping>
								<State id="Fault" value="true" appstate="Fault" appevent="Fault" prio="4" />
								<Event id="MotionAlarm" appstate="Alarm" appevent="Alarm" prio="7" />
							</Mapping>
						</App>

						<!-- DemoPanel.Video.Recorder.Camera.PTZ -->
						<ObjectType id="PTZ">
							<App domain="Video" device="Video.Camera">
								<Functionality id="Camera.PTZ" />
								<Functionality id="Camera.PTZStatus" />
								<Functionality id="Camera.Presets" />
							</App>
						</ObjectType>
					</Object>
				</Object>
			</Object>

			<!-- DemoPanel.Access -->
			<Object id="Access" exclude="1">

				<!-- DemoPanel.Access.Door -->
				<Object id="Door">
					<App domain="Access" device="Access.Door">
						<Functionality id="Door" />
						<Mapping>
							<State id="Open" value="true" appstate="Active" />
							<State id="Mode" value="AllowAccess" appstate="Disarmed" />
							<State id="Mode" value="Unlock" appstate="Disarmed" />
							<State id="Mode" value="Block" appstate="Armed" />
							<Event id="OpenedTooLong" appstate="Fault" appevent="Fault" prio="4" />
							<Event id="ForcedOpen" appstate="Alarm" appevent="Alarm" />
							<Event id="AuthorizedAccess" >
								<AppLog id="AccessGranted" props="BadgeId, LastName, FirstName, Company" tags="user, access" />
							</Event>
							<Event id="AttemptForUnauthorizedAccess">
								<AppLog id="AccessDenied" props="BadgeId, LastName, FirstName, Company" tags="user, access" />
								<AppEvent type="Message" prio="3">
									<Property id="EventImage" attachment="[event.attemptforunauthorizedaccess.attachment]" />
									<Property id="StaffNumber" persist="1" />
								</AppEvent>
							</Event>
						</Mapping>
					</App>
				</Object>
			</Object>
        </Object>
    </Objects>

    <Activities>
		<!-- Intercom call -->
		<Activity id="mycall" type="call">
			<ObjectRole id="ObjectRoleBase">
				<App>
					<Mapping>
						<State id="State" value="3" appstate="Message" appevent="Message" appevent_text="[activity.call.normal]" condition="activity.CallType==1" />
						<State id="State" value="3" appstate="Alarm" appevent="Alarm" appevent_text="[activity.call.emergency]" condition="activity.CallType==2" />
						<State id="State" value="8" appstate="Active" />
					</Mapping>
				</App>
			</ObjectRole>
		</Activity>
	</Activities>

	<Incident>
		<App>
			<Mapping>
				<Property id="prop1" as="status" />
				<Property id="prop2" as="id" />
			</Mapping>
			<Create>
				<Property id="eventid" autofill="event:id" />
				<Property id="url" autofill="event:link.url" />
			</Create>
			<Operation id="close" />
			<Operation id="custom">
				<Property id="myProp" autofill="event:category" />
			</Operation>
		</App>
	</Incident>

</AppDef>
Last modified September 25, 2026