Apama 10.3 | Apama Documentation | Using Apama with Software AG Designer | Using Query Designer | Creating queries in Query Designer | Adding query conditions | Adding query condition filters (where)
Adding query condition filters (where)
A query can specify a Boolean expression that must evaluate to true for the query to find a match. This is referred to as a query condition filter. You can add zero, one, or more condition filters to a query.
Note: where clauses are only able to use coassignments on one side of an or operator in the pattern. To place conditions on events on either side of an or operator, write separate where clauses for each side of the or operator.
* To add a condition filter to a query
1. In Query Designer, add the event inputs to the query and define the event pattern you want to find. See Adding query inputs and Adding query patterns.
2. In the Query Designer Conditions pane, click the down arrow next to the plus sign and select Filter (where).
3. In the New Query Condition Filter (where) dialog, enter a Boolean expression that refers to the events in the pattern of interest.
For example, consider a Withdrawal event followed by another Withdrawal event, both for the same account. You are interested in this pattern only when the country fields in the two events are different. Using the aliases w1 and w2 for the two Withdrawal events, the following Boolean expression specifies the filter: w2.country != w1.country.
4. Click OK.
The Query Designer displays the new filter in a row in the Conditions pane. To modify the filter, select it and click the Edit . To remove the filter, select it and click Delete . Also, the new filter is immediately added to the source code as a where clause in the find statement. If you modify the filter in the Source tab, this is reflected in the Conditions pane in the Design tab.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.