Name
event, event, kPMEvent — Event containing triggers to observe, conditions to test, and actions to perform.
Synopsis
event structure { unique ID, enabled, name, notes, image, tool, behaviours, triggers, criteria, actions, access rights };
unique ID : string, default, length 1..255 |
enabled : boolean, default |
name : string, default, length 1..255 |
notes : string, default, length 0..4048, optional |
image : string, length 1..1024, optional |
tool : string, length 3..1024, optional |
behaviours : array of behaviour elements, optional, unique
|
triggers : array of trigger structures, default
|
criteria : criteria structure, default
|
actions : array of action structures, default
|
access rights : array of right elements, read only, unique
|
Description
Event containing triggers to observe, conditions to test, and actions to perform.
event is the core unit of the engine. events are self contained.
event describes of a set of triggers to observe. When any one of these triggers fires, the criteria is tested. If the criteria is met at the time of triggering, the actions are performed in sequence.
The unique ID of event is the structure's key. When manipulating or tracking individual events, use this value.
Fields
unique ID. Unique identifier.
We recommend the unique ID is set to a CoreFoundation UUID using its UTF8 string representation. This ensures the event's unique ID is truely unique.
The engine indexes events by unique ID.
unique ID
is a string. If unique ID
is omitted, a default is created. unique ID
must be between 1
and 255
characters long, inclusive.
enabled. Is the event available to be scheduled and performed.
Setting enabled to true allows the engine to enqueue the event's triggers.
Setting enabled to false stops the engine from acting upon the event, even if the appropriate triggers fire.
enabled
is a boolean. If enabled
is omitted, the default true
is used.
name. Presentation name.
name need not be unique, but we recommend it is. The name should convay the purpose of the event. Try to suggest or pick names that touch upon the cause or outcome of the event.
name
is a string. If name
is omitted, the default Untitled
is used. name
must be between 1
and 255
characters long, inclusive.
notes. Notes about this event's purpose.
notes is provided to hold information about the event's purpose, intent, creator, and any other miscellaneous details that may be useful to other users. No specific format should be expected.
notes
is a string. If notes
is omitted, the default "" is used. notes
is optional. notes
must be between 0
and 4048
characters long, inclusive.
image. A Universal Image Identifer respresenting the event.
image is a Universal Image Identifer (UII). The image will be used is association with the event throughout the user interface.
image
is a string. image
is optional. image
must be between 1
and 1024
characters long, inclusive.
tool. Owning tool in reverse domain name format.
tool is the reverse domain named formatted identifier of the tool that created or last manipulated this event. Used to help tools identify which events they claim responsibility for. A tool with limited functionality might restrict itself to attempting to edit or show only events with a tool entry matching their own identifier.
tool
is a string. tool
is optional. tool
must be between 3
and 1024
characters long, inclusive.
behaviours. Non-standard event behaviour.
Behaviours affect how the event is performed and allow the event to take on non-standard responses to situations such as requests to idle sleep, and parallel triggers.
behaviours
is an array of behaviour elements. behaviours
is optional. Each item in behaviours
must be unique.
triggers. Triggers determining when the event performs.
triggers
is an array of trigger structures. If triggers
is omitted, a default is created.
criteria. A criteria determining if the event performs.
The criteria is tested after a trigger fires. Only if the criteria is met, will the actions be performed.
criteria
is a criteria structure. If criteria
is omitted, a default is created.
actions. Actions performed when the event is successfully triggered.
List of actions performed in sequence after one of the's event triggers has fired, and the criteria has been met.
actions
is an array of action structures. If actions
is omitted, a default is created.
access rights. Caller rights for the event.
Access rights lists what the caller can do to this event. The rights are specific to the caller. access rights is read only. Any access rights passed into the engine will be ignored.
access rights
is an array of right elements. access rights
is read-only. Each item in access rights
must be unique.