How to get the event information for an EventId
You can get event information for an EventId of a background process in Event Monitor. You can retrieve information of the event and the event details.
Procedure
- In order to get the event information, you need the unique identifier of the event (= ProgressId). So, first the
EventIdwhich is returned by the background process, must be converted intoProgressIdusing the method GetProgressId. - Then the
ProgressIdcan be used to retrieve the information of the event and the event details with the method RetrieveEventsByProgressIdsTip:- Since this call can return a lot of records, try to limit the requested metadata.
<ishfields> <ishfield name='CREATIONDATE' level='detail'/> <ishfield name='STATUS' level='detail'/> <ishfield name='ACTION' level='detail'/> <ishfield name='DESCRIPTION' level='detail'/> <ishfield name='EVENTDATASIZE' level='detail'/> </ishfields> - We suggest to add the field
EVENTDATASIZE. If the value of fieldEVENTDATASIZEis larger than 0, you can request the event data of the event detail.
- Since this call can return a lot of records, try to limit the requested metadata.
- For each of the event details you can get more metadata (including the event data) by calling GetEventDetail with the unique identifier of the event detail (= DetailId)
<ishfields> <ishfield name='EVENTID' level='detail'/> <ishfield name='CREATIONDATE' level='detail'/> <ishfield name='STATUS' level='detail'/> <ishfield name='ACTION' level='detail'/> <ishfield name='DESCRIPTION' level='detail'/> <ishfield name='EVENTDATATYPE' level='detail'/> <ishfield name='EVENTDATASIZE' level='detail'/> <ishfield name='HOSTNAME' level='detail'/> <ishfield name='PROCESSID' level='detail'/> <ishfield name='THREADID' level='detail'/> </ishfields>Note: The method will throw an error, if the event data is requested but the event detail has no event data - You can use GetEventDetail to get the event data of an event detail. However, if the event data is large, we advice you to get the event data in chunks using GetNextEventDetailDataChunk.