IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing monitor models > What are monitor models? > Monitor details models
Keys
A key is a piece of information that characterizes and identifies the real-world entity that is being tracked by a monitoring context. Every monitoring context must have one or more keys. The set of these keys, together with the keys of any ancestor monitoring contexts (parent, parent's parent, and so on) are combined to uniquely define the real-world object.
Each monitoring context requires at least one key to make it unique.
For example, each process execution in a workflow engine is uniquely identified by a process instance identifier that can be used as its key. Because more than one piece of information can be required to uniquely identify the monitoring context (for example, each flight of an airline is uniquely identified by a flight number and departure date), a monitoring context can have many keys.
The key can be useful to correlate runtime events with the instance of the monitoring context. It is used to identify the monitoring context to which an event must be delivered. It is also useful for the display of monitoring contexts on a dashboard: the user specifies a key to indicate which monitoring context should be shown.
The key values of a monitoring context instance must be set when the instance is created and can be set only once per lifetime of the instance. They must be unique among the set of monitoring contexts that have the same parent, or among all instances, if the monitoring context has no parent.
Keys are similar to metrics. In fact, a key is simply a metric with the isPartOfKey attribute set to true. If you edit the definition of a key in the XML editor and set isPartOfKey to false, the element is automatically converted from a key to an ordinary metric in the form editor. Keys are set by key value expressions just as metrics are set by metric value expressions, except that key value expressions do not include a trigger. Keys are expected to acquire values from the inbound event definition when the monitoring context instance is created.