EPL - catching multiple alarm types using "on all" listener

Hi,

we are facing the following challenge with “on all” we want to catch multiple alarm types which have a common wildcard but right now with on all we cannot use something like .contains
the only way is a specific match
on all Alarm(type=ALARM_IN_TYPE)

is there a workaround for this so that we match the alarm type which contains a specific string?

Hi,

Since filtering based on a field containing a specific string isn’t possible, you can instead handle this within the listener. You can check inside the listener like this:

on all Alarm() as alarm {
	if alarm.type.contains("searchString"){
		//your code
	}
}

Thanks,
Sudha.

1 Like