WmPublic. Creates a subscription for a specified event.
Important! Subscriptions that you add using this service take effect immediately; however, they are not
made permanent unless you also persist them to disk with the pub.event:saveEventManagerSettings service. If you do not run pub.event:saveEventManagerSettings after adding subscribers, your changes will be lost when the server is restarted.
pub.event:sessionExpire WmPublic. Specification for sessionExpire event handlers.
pub.event:sessionExpireInfo WmPublic. Document type for sessionExpire event information.
pub.event:sessionStart WmPublic. Specification for sessionStart event handlers.
pub.event:sessionStartInfo WmPublic. Document type for sessionStart event information.
pub.event:stat WmPublic. Specification for stat event handlers.
pub.event:statInfo WmPublic. Document type for stat event information.
pub.event:txEnd WmPublic. Specification for txEnd event handlers.
pub.event:txEndInfo WmPublic. Document type for txEnd event information.
pub.event:txStart WmPublic. Specification for txStart event handlers.
pub.event:txStartInfo WmPublic. Document type for txStart event information.
pub.event.audit:logToFile WmPublic. Deprecated—Logs audit events to the audit log.
pub.event.exception:logToFile WmPublic. Deprecated—Logs exception events to the error log.
Input Parameters
EventType String Type of event to which the event handler is subscribing. Must be one of the
following: Alarm Event Audit Event Exception Event GD End Event GD Start Event Port Status Event Replication Event Session End Event Session Expire Event Session Start Event Stat Event
Tx End Event Tx Start Event
Tip! To view the current list of event types, you can execute the pub.event:getEventTypes
service in Developer.
Filter String Selects (filters) the set of events within EventType to which the event handler
is subscribing. addSubscriber uses Filter as a pattern string to filter a particular attribute of an event.
The pattern string can be composed of literal characters, which match a character exactly, and/or the “*” character, which matches any sequence of characters. For example:
This pattern string... Would match...
* Any string
M* Any string that starts with an uppercase “M.”
M*X Any string that starts with an uppercase “M” and ends with an uppercase “X.”
The following table shows the attribute that is filtered for each event type. Note that some event types cannot be filtered.
EventType Filtered attribute
Alarm Event Message generated by the alarm event.
Audit Event Fully qualified name of the service that generates the audit
event.
Exception Event
Fully qualified name of the service that generates the exception event.
GD End Event None. This event type cannot be filtered. Filter is ignored for
GD Start Event Fully qualified name of the service that generates the GD Start
Event.
Port Status Event
None. This event type cannot be filtered. Filter is ignored for this event type.
Replication Event
Name of the package being replicated.
Session End Event
None. This event type cannot be filtered. Filter is ignored for this event type.
Session Expire Event
None. This event type cannot be filtered. Filter is ignored for this event type.
Session Start Event
User ID of the user starting the session or the groups to which the user belongs. (The filter is applied to a space-delimited list of groups, composed of group names suffixed with the user’s user ID.)
The following examples show how you might filter session start events for various groups and/or user IDs:
To select session starts for any user in the Administrators group, the filter would be:
*Administrators*
To select session starts for the user ID “LRMalley” in the Administrators group, the filter would be:
*Administrators*LRMalley
To select session starts for the user ID “LRMalley” in any group, the filter would be:
*LRMalley
Stat Event None. This event type cannot be filtered. Filter is ignored for
this event type.
Tx End Event None. This event type cannot be filtered. Filter is ignored for
this event type.
Tx Start Event None. This event type cannot be filtered. Filter is ignored for
this event type.
Service String Fully qualified name of the event-handler service (the service that will
execute when the event specified by EventType and Filter occurs).
Comment String Descriptive comment for this subscription. This comment is displayed when
Output Parameters See Also pub.event:deleteSubscriber pub.event:modifySubscriber pub.event:getSubscribers pub.event:saveEventManagerSettings
pub.event:alarm
WmPublic. Specification for alarm event handlers.
Input Parameters
Output Parameters
None.
Usage Notes
Remember to register your handler with the Event Manager.
Enabled String Flag specifying the status of the subscription. Must be one of the following
values:
Set to... To...
true Make the subscription active.
false Default. Make the subscription inactive.
Note: Although the default value is false, you will generally
want to set Enabled to true to activate the subscription
immediately when it is added.
Result String Flag indicating whether the subscriber was successfully added.
A value of... Indicates that...
true The subscriber was added successfully.
false The subscriber was not added.
time String Date and time that the event occurred, in the format yyyy/MM/dd HH:mm:ss.SS.
service String Fully qualified name of the service that generated the event.
sessionID String Session ID of the service firing the alarm.