Previous Topic: VALIDATE_BOUNDS_STUB_1Next Topic: MAND_GROUPING_STUB_1


MAIN_GROUPING_STUB_1

Note: In SQL Server this function is standalone and named differently as described further down. There is no Stub version.

Purpose

Function that returns the user defined grouping to be defined for metric categories 0,1 and 2. Note as the actual type of the grouping is unknown it must be returned as a character string. Note as per definition of metrics, only groups that have the appropriate DGrouping setting of 1 will be subject to this level of grouping. This function is called to attach a user defined value to each event that will allow totals to be computed grouped by that value, examples are 'user' 'direction' 'hour' etc.

The function takes the arguments listed below. These are the respective attributes from the event to which the user defined value is to be attached.

eventuid
eventtimestamp
ParticipantIndex
groupidm
groupid
useridm
userid
AddressUID1
AddressUID2
ParticipantNodeUID
InterventionNodeUID
eventmajortype
Default Implementation

Returns NULL.

SQL Server custom implementation

In SQL Server, the custom function must always be named WGN_RQ_GROUPING_MAIN_CUSTOM_n_1 where 'n' is the RQ Process number for which this function applies. If the name of the custom function(s) deviates from that stipulated above then the RQ process to populate the Review Queue will merely ignore it and subsequently it will fail to implement the intended custom grouping behavior.

Oracle custom implementation

In Oracle, the custom function is contained within the stored package WGN_RQ_CUST and must always be named WGN_RQ_CUST.GROUPING_MAIN. Additionally, the process number is passed to this function such that multiple implementations can be coded on a per process basis by using a PL/SQL CASE construct. The custom package body is contained within the supplied file WGN_RQ_BODY.sql and can be modified accordingly.