eventCollectorQuery

This request returns a list of events that match a specified filter expression.

Syntax

com.tibco.wcc.base.Requests.eventCollectorQuery(requestId,
                                                bCorrelate,
                                                txtFilter,
                                                arrSorts,
                                                bReturnAttributes,
                                                numStartIndex,
                                                numReturnCount);

Parameters

  • requestId - (String) Uniquely identifies the request. For more information, see Submitting Server Requests.
  • bCorrelate - (boolean) true = return all events that satisfy the filter expression, plus the events that are correlated to those events. false = return all events that satisfy the filter expression, but not the correlated events.
  • txtFilter - (String) - The filter expression to apply to the events. For information about filter syntax, see the "Defining Query Filter Strings" topic in the developer's guide for your BPM runtime environment.

    For example:

    (  componentId = 'BRM'  OR  componentId = 'DE'  )  AND  (  priority = 'MEDIUM'  )
  • arrSort - (Array[Object]) The attributes used to sort the events returned. The events are returned in order according to the value in the specified attributes.
    [
      {
         Attribute: Attribute,
         Type: Type,
      }
    ]

    where:

  • Attribute - (String) The name of the attribute used for sorting the events.
  • Type - (String) (optional) The type of sort: ASCENDING or DESCENDING.
  • bReturnAttributes - (boolean) Specifies whether or not to return attribute values — can be used to just get the count. Also note that if you choose not to return attributes, elements representing the attributes are still returned in the response, but they do not contain any values.
  • numStartIndex- (Number) The starting index (zero-based) number for the returned events.
  • numReturnCount - (Number) The number of events to return per request.

Returns

Returns the following elements:

  • <ap:StartPosition> - The starting index for the event request.
  • <ap:EndPosition> - The ending index for the event request.
  • <ap:TotalItems> - The total number of events returned (the number that satisfied the filter expression).
  • <ap:Events> - Contains an <ap:Event> element for each event that is returned. Each <ap: Event> element contains the following elements:
    • <ap:Attributes> - Contains an <ap:Attribute> element for each attribute that is returned for the event. Each <ap:Attribute> element contains the following elements:
    • <ap:AttributeId> - A unique identifier for the attribute.
    • <ap:Value> - The value assigned to the attribute.

For example:

<ap:Requests>
  <ap:EventCollectorQuery Id="ApiSample.eventCollectorQuery">
    <ap:StartPosition>0</ap:StartPosition>
    <ap:EndPosition>20</ap:EndPosition>
    <ap:TotalItems>251</ap:TotalItems>
    <ap:Events>
      <ap:Event>
        <ap:Attributes>
          <ap:Attribute>
            <ap:AttributeId>27</ap:AttributeId>
            <ap:Value>10.97.8.142</ap:Value>
          </ap:Attribute>
          <ap:Attribute>
            <ap:AttributeId>26</ap:AttributeId>
            <ap:Value>BPMNode</ap:Value>
          </ap:Attribute>
          <ap:Attribute>
            <ap:AttributeId>24</ap:AttributeId>
            <ap:Value>SECURITY</ap:Value>
          </ap:Attribute>
               .
               .
               .
        </ap:Attributes>
      </ap:Event>
    </ap:Events>
  </ap:EventCollectorQuery>
</ap:Requests>