Skip to content
pCon.configurator onlineDocumentation
Esc
↑↓navigate↵open⌘Jpreview
On this page

Statistic Event Manager

With the statistics event manager in EAIWS statistic information can be sent to a HTTP client. The client can then for example save the events to a database and do statistical evaluations. To configure the client please see §Statistics Event Manager.

Basically, the event manager receives statistics events from the application and simply attempts to feed them into a bounded blocking queue limited to at most 1024 entries. (The queue actually stores groups of events, so it may contain more than 1024 events if events are reported in groups, as often happens during property changes of composite articles).

If the queue fails to accept new events because its capacity has already been reached, the events are discarded, and an error message is eventually logged (after 1000 discarded events or 10 minutes since the last error message of that kind).

A separate thread takes events from that queue and delivers them to local event queues and the HTTP client event queue (if configured, see §Statistics Event Manager). One of these queues discarding events due to overflow has no effect on other queues.

The statistics framework defines two (abstract) base classes for events:

Synopsis

[ uuid(d108dd08-1e07-3ca0-9202-615aab9e63df), extensible ]
struct StatsEvent
{
    Instant timestamp@1;
}
[ uuid(61ca0e23-6f68-3af9-a686-d775b56074e9), extensible ]
struct SessionStatsEvent : StatsEvent
{
    UUID sessionId@10;
}

See also: UUID

All statistics events must be derived from StatsEvent. All session-specific events should be derived from SessionStatsEvent.

The statistics framework defines three events related to the management of sessions:

Synopsis

[ uuid(4fd35df3-f9a0-48fd-8da5-70994b2f9985), extensible ]
struct SessionOpenEvent : SessionStatsEvent
{
    String localeName@100;
    String zoneId@101;
}
[ uuid(e06c9897-699b-4216-9d8f-1a5a5d95eada), extensible ]
struct SessionCloseEvent : SessionStatsEvent
{
}
[ uuid(3e4df265-391d-491a-98a4-30ec4745ef16), extensible ]
struct SessionConfigEvent : SessionStatsEvent
{
    String? localeName@100;
    String? ZoneId@101;
}

Open and close events are emitted whenever a session is opened or closed. Configuration events result from operation setLocale (§setLocale) of the session web service.

The statistics framework defines five events related to the insertion, deletion and configuration of basket articles.

Synopsis

[ uuid(75b076cf-10b9-3bc8-b441-142f73af878c), extensible ]
struct BasketStatsEvent : egr.eai.fw.statistics.SessionStatsEvent
{
}
[ uuid(901b332b-c7d6-3c5c-bd0e-b914bb99faed), extensible ]
struct BasketArticleEvent : BasketStatsEvent
{
    String manufacturerId@100;
    String seriesId@101;
    String baseArticleNumber@102;
    String distributionRegion@103;
    String finalArticleNumber@104;
    String ofmlVariantCode@105;
    Boolean isSubArticle@106;
}
[ uuid(e94a83b6-5cfd-4f00-80cd-0da52752b35a), extensible ]
struct InsertArticleEvent : BasketArticleEvent
{
}
[ uuid(024ace31-0c50-4acf-908e-3968db66b47f), extensible ]
struct DeleteArticleEvent : BasketArticleEvent
{
}
[ uuid(f8a453f6-b616-35b2-a41a-ebedc1385009) ]
struct PropertyChange
{
    String propertyName@1;
    GDRValue oldValue@2;
    GDRValue newValue@3;
}
[ uuid(949ae94c-7358-40ee-835f-d964e1d09e6d), extensible ]
struct ConfigArticleEvent : BasketArticleEvent
{
    String? oldManufacturerId@200;
    String? oldSeriesId@201;
    String? oldBaseArticleNumber@202;
    String? oldDistributionRegion@203;
    List<PropertyChange> propertyChanges@204;
}

BasketStatsEvent is the abstract base class of all events emitted by the basket module.

BasketArticleEvent is the abstract base class of all article-related basket events.

Events of type InsertArticleEvent are emitted whenever a new OFML article is inserted by operation insertOFMLArticle (§insertOFMLArticle) of the basket web service, as a result of the CreateObject OAP action, or as a result of a property change (see below).

Events of type DeleteArticleEvent are emitted as a result of a property change.

Events of type ConfigArticleEvent are emitted as a result of a property change.

Property changes are usually triggered by

Each property change compares the configurations of the main article and the set of sub-articles of the affected composite article before and after the property change. Articles that no longer exist (according to their item ID) are put in the set of deleted articles, articles that did not exist before are put in the set of inserted articles, and articles that did exist before and still exist, but differ in manufacturer ID, series ID, base article number, distribution region, final article number, OFMLVarCode, and/or PropVarCode a put in the set of changed articles.

Changed article items always result in a ConfigArticleEvent. Fields oldManufacturerId, oldSeriesId, oldBaseArticleNumber, and oldDistributionRegion are set only if the respective values differ before and after the property change. If manufacturer ID, series ID and base article number have not changed, the old and current PropVarCodes are compared and changed properties are stored with their old and new values in propertyChanges (added or removed property values are not reported).

The sets of inserted and deleted sub-articles are then compared to remove pairs of identical articles which have been both inserted and deleted. Furthermore, pairs of inserted and deleted articles which are identical except for their PropVarCode are removed from the sets of inserted and deleted sub-articles but result in a ConfigArticleEvent (necessary as insert and delete events don’t include the PropVarCode). Finally, InsertArticleEvent and DeleteArticleEvent are generated for articles remaining in the sets of inserted and deleted articles.