Using Attributes in Query Filters
Each Event Collector database table contains specific attributes for the type of information held in that table. For example, the ec_event table contains attributes that hold information about events, the ec_case_status table contains attributes that hold information about case objects, and so on.
When you submit a query, the filter expression itself can contain one or more attributes from the table. Plus, you can request that all attributes, or only specific attributes, and their values, be returned in the response.
A target option is also passed in the query, which specifies the Event Collector database table or view against which the query will execute. The attributes that you can include in a query filter expression is determined by the target option specified in the query. See the list of target options below.
The following shows a basic query against the ec_pe_status table (target=PROCESS_STATS). It is requesting that all attributes (requireAllAttributes=true) from the ec_pe_stats table be returned for process instances in which caseReference='BDS-1-com.example.hastings.Customer-1-0'.
URL: .../audit/query/execute?target=PROCESS_STATS&requireallattributes=true Request Body { "executeQueryObject": { "query": { "filter": "caseReference='BDS-1-com.example.hastings.Customer-1-0'"} } }
The following are the available target options. The links display lists of the attributes in each table (or view) that can be used in filters, or returned in the response, when targeting that table:
- AUDIT - for queries against the ec_event Event Collector database view, which stores information about events. (This is the default option if target is not specified in the query.)
- CASE_STATS - for queries against the ec_case_status Event Collector database table, which stores information about case objects.
- PROCESS_STATS - for queries against the ec_pe_status Event Collector database table, which stores measures about process instances.
- PROCESS_TEMPLATES - for use only with the getChart and getChartData operations, as well as the bpm-highcharts business component. These attributes cannot be used when executing queries from the AuditService.
- REGISTERED_ATTRIBUTES - for queries against the ec_attribute Event Collector database table, which stores information about attributes that have been registered with Event Collector.
- REGISTERED_COMPONENTS - for queries against the ec_component Event Collector database table, which stores information about components that have been registered with Event Collector.
- REGISTERED_QUERIES - for queries against the ec_query Event Collector database table, which stores information about queries that have been registered with Event Collector.
- USER_ACTIVITY - for queries against the ec_user_activity Event Collector database table, which stores information about user activity.
- WORKITEM_STATS - for queries against the ec_wi_status Event Collector database table, which stores measures about work items.