liveBook · Manning

Participant event set

As explained in Event Processing in Action

The set of event instances within a pattern detect agent's context partition that have types listed as relevant to the pattern.

A participant event set contains event instances in a Pattern detect agent’s context partition whose types appear in the pattern’s relevant event types list. The agent’s matching step examines this set for events that satisfy the pattern. A matching set may contain the entire participant set, a subset, or no events, depending on the pattern. section 9.1.2 section 9.2.1

Reservations

An all pattern can wait for flight, car, and hotel reservation events within a context partition. Once at least one of each is present, one event of each type forms a matching set; their order does not matter. If several hotel reservations are present, pattern policies determine how matches are chosen. section 9.2.1

Figure 9.2. Illustration of the all pattern—an instance of every event type listed as a relevant event type must be present for the pattern to be matched. In this case there are three relevant event types (flight reservation, car reservation, and hotel reservation), and you can see that the participant event set includes an instance of each type.

The reservation example shows the participant set and the events that satisfy an all pattern. section 9.2.1

Different patterns use the set differently. An any pattern can match a subset, while an absence pattern matches an empty participant set. A threshold pattern aggregates the participant events and compares the result with a threshold; if it matches, the entire set is the matching set. section 9.2.1 section 9.2.2

Counting complaints

A count pattern can detect at least three customer complaints in a single day. It counts participant event instances, including multiple instances of the same type. When the threshold is met, all counted events form the matching set. section 9.2.2

For modal patterns, always requires a nonempty set in which every participant satisfies an assertion. Sometimes requires at least one participant to satisfy it. In either case, a successful match includes the entire participant set. section 9.2.4

When extra instances of a relevant type occur, a repeated type policy controls their treatment. Override replaces the oldest retained instance when the required number is already present; every retains all instances for possible matches. First, last, and maximum- or minimum-value policies retain all instances but restrict which ones are used for matching. section 9.4.3

For temporal or spatiotemporal patterns, an order policy determines how participant events are ordered: by occurrence time, detection time, a user-defined attribute, or stream position. Time or attribute values can tie, so those policies do not always give a unique order. section 9.4.5

How Event Processing in Action covers it

How deep it goes
Defines the set and compares matching, repeated-type handling, and ordering across several pattern policies.
Examples
Illustrates the set with travel reservations and a count of customer complaints within one day.
What you can do after
Evaluate how a pattern and its policies determine which participant events form a match.
How it connects
Connects event patterns with context partitions, matching sets, threshold patterns, and order policies.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Event Processing in Action. The section links point to the parts of the book it draws on.