Pattern
In a query definition, the find statement specifies the event pattern of interest followed by a procedural block that specifies what you want to happen when a pattern match is found.
A coassignment variable specified in an event pattern is within the scope of the find block and it is a private copy in that block. Changes to the content that the variable points to do not affect any values outside the query. Unlike EPL event expressions, you need not declare this identifier before you coassign a value to it.
In an event pattern in a find statement, each coassignment variable identifier must be unique. You must ensure that an identifier in an event pattern does not conflict with an identifier in the parameters section or inputs section.
If a pattern specifies a wait operator, then it must be at the beginning of a pattern, at the end of a pattern, or both. It cannot be in the middle of a pattern. The followed-by operator must be after or before each instance of the wait operator. For example:
wait(1):w -> (A:a and B:b) // Allowed
{(A:a and B:b) -> wait(1):w } // Allowed
wait(1):w1 -> (A:a and B:b) -> wait(1):w2 // Allowed
wait(1):w and A:a // Not allowed
A:a -> wait(1):w -> B:b // Not allowed
A wait operator must specify a positive float value or a time literal. A float value always indicates a number of seconds.
Optionally specify and or -> and then specify an event_type and coassignment variable. Parentheses are allowed in the pattern specification and you can specify multiple operators, each followed by an event_type and coassignment variable. For example, the following is a valid find statement:
find (A:a1 -> ((A:a2)) -> (A:a3) ->
(A:a4 -> A:a5 -> A:a6) ->
(((A:a7) -> A:a8) -> A:a9) -> A:a10 {
print "query with 10: "+a1.toString()+ " - "+a10.toString();
}