EPL enhancements in 9.12
Apama 9.12 includes the following EPL enhancements:
The following new
string methods are available to search and replace strings using regular expressions:
matches(string regex) search(string regex) replace(string regex, string replacement) Apama currently uses ICU 3.8.1 to implement the regular expressions.
Event listeners (
on statements) and stream listeners (
from statements) can now coassign matching events to an implicitly declared variable using the
as operator. This variable is only in scope in the processing block of the listener and has no effect on clashing local or global variables. For example:
// Variable newTick is not yet defined
on StockTick(*,*) as newTick {
// The variable newTick is only in scope in this block
}
Data views now support the
decimal field type. Decimals can thus be displayed in the Scenario Browser and used in dashboards. An event with a
decimal field type can now be sent from a dashboard.
Decimals are now also supported in C, C++ and Java plug-ins, in the MemoryStore and in the distributed MemoryStore.
In Java, both BigDecimal (for backwards compatibility) and Number are now supported types for decimal in a plug-in API. For Number, it is either a BigDecimal type for a value, or a Double type for NaN/infinity. NaN/infinity are still not supported when using the BigDecimal type, and will throw an exception that kills the monitor instance if not caught.
A new
OutOfBandConnections event has been added to the
com.apama.oob package, which provides a mechanism to synchronously get the currently connected senders and receivers. For further information, see
Out of band connection notifications.
It is now possible to declare static actions inside an event type. For further information, see
Defining static actions.
The
if statement no longer requires the
then keyword. It can still be specified optionally (for backwards compatibility), but you can now write a shorter form. For example:
if seq.size() > 0 { print "First element is " + seq[0]; }