Example Queries

The following are example filter queries against the ec_event Event Collector database view (target=AUDIT).

Description Query
Returns all events referring to process instance pvm:0a121. SOAP
<filter>((messageCategory = 'PROCESS_INSTANCE') AND (managedObjectId = 'pvm:0a121'))</filter>

REST

"query": { "filter": "messageCategory='PROCESS_INSTANCE' AND managedObjectId='pvm:0a121'"}
Returns all events referring to a process instance value that is defined by the ProcID late bound parameter literal.

The executeGenericQueryRequest or executeRegisteredGenericQueryRequest message must include a value for ProcID as part of the QueryOptions element.

SOAP
<filter>((messageCategory = 'PROCESS_INSTANCE') AND (managedObjectId = ::ProcID))</filter>

REST

"query": { "filter": "messageCategory='PROCESS_INSTANCE' AND managedObjectId=::ProcID"}
Returns all events for work items generated by process instance pvm:0a126. SOAP
<filter>((messageCategory = 'WORK_ITEM') AND (parentObjectId = 'pvm:0a126'))</filter>

REST

"query": { "filter": "messageCategory='WORK_ITEM' AND parentObjectId='pvm:0a126'"}
Returns all events referring to process instance pvm:0a121 where the messageID is not BX_INSTANCE_PROCESS_COMPLETED. SOAP
<filter>((messageCategory = 'PROCESS_INSTANCE') AND (managedObjectId = 'pvm:0a121') AND (messageId <> 'BX_INSTANCE_PROCESS_COMPLETED'))</filter>

REST

"query": { "filter": "messageCategory='PROCESS_INSTANCE' AND managedObjectId='pvm:0a121' AND messageId <> 'BX_INSTANCE_PROCESS_COMPLETED'"}
Returns all events for work items associated with the resource (user) Clint Hill. SOAP
<filter>((resourceName = 'Clint Hill') AND (messageCategory = 'WORK_ITEM'))</filter>

REST

"query": { "filter": "messageCategory='WORK_ITEM' AND resourceName='Clint Hill'"}
Returns all events where the message attribute value begins with 'Start', followed by any number of characters. SOAP
<filter>(message = 'Start*')</filter>

REST

"query": { "filter": "message = 'Start*'"}
Returns all events for the current user. SOAP
<filter>currentUser(resourceName)</filter>

REST

"query": { "filter": "currentUser(resourceName)"}
Returns all events referring to process instance pvm:0a121 created between 9 AM on July 10, 2017 and 5 PM July 14, 2017, inclusive. Times are local.
SOAP
<filter>((messageCategory = 'PROCESS_INSTANCE') AND (managedObjectId = 'pvm:0a121') AND (creationTime = [2017-07-10T09,2017-07-14T17]))</filter>

REST

"query": { "filter": "messageCategory='PROCESS_INSTANCE' AND managedObjectId = 'pvm:0a121' AND creationTime=[2017-07-10T09,2017-07-14T17]"}
Returns all events referring to process instance pvm:0a121 created between 8 AM July 10, 2017 and 6 PM July 14, 2017, exclusive. Times are Eastern Daylight Time (-04 hour offset from UTC). SOAP
<filter>((messageCategory = 'PROCESS_INSTANCE') AND (managedObjectId = 'pvm:0a121') AND (creationTime = {2017-07-10T08-04,2017-07-14T18-04}))</filter>

REST

"query": { "filter": "messageCategory='PROCESS_INSTANCE' AND managedObjectId = 'pvm:0a121' AND creationTime={2017-07-10T08-04,2017-07-14T18-04}"}
Returns all events referring to process instance pvm:0a121 created between 8 AM July 10, 2017 (exclusive) and 5 PM July 14, 2017 (inclusive). Times are Indian Standard Time (+5 1/2 hour offset from UTC). SOAP
<filter>((messageCategory = 'PROCESS_INSTANCE') AND (managedObjectId = 'pvm:0a121') AND (creationTime={2017-07-10T08+05:30,2017-07-14T17+05:30]))</filter>

REST

"query": { "filter": "messageCategory='PROCESS_INSTANCE' AND managedObjectId = 'pvm:0a121' AND creationTime={2017-07-10T08+05:30,2017-07-14T17+05:30]"}

For information about dates and times being inclusive or exclusive, based on bracket type, see Using DateTime Literals.