Apama 10.15.0 | Developing Apama Applications | EPL Reference | Queries | Find statement
 
Find statement
 
Pattern
Where condition
Within condition
Without condition
Between clause
Select clause
Having clause
A query find statement tries to find a match for the event pattern that the find statement specifies. When the query finds a match it executes the EPL in the find statement block.
Syntax diagram for find statement
When a find statement specifies a select or having clause, the every modifier is required. Conversely, you cannot specify the every modifier if you do not specify a select or having clause.
When a find statement specifies the every identifier, the identifiers in the select clause are available in the having clause and in the find block, but the coassignments in the pattern are not available.
Pattern coassignments are available in a where clause that applies to the pattern.
When you do not specify the every modifier, all pattern coassignments, except a without clause coassignment, are available in the find block.
In a where clause that is part of a without clause, pattern coassignments as well as the coassignment in the without clause are available.
Example:
find Withdrawal as w1 -> Withdrawal as w2
where w1.country = "UK" and w2.country = "Narnia" {
// Recent card fraud in Narnia against UK customers
send SuspiciousWithdrawal(w2) to "SuspiciousChannel";
}