Pattern Matching failure, listener is not called.

Pattern Matching failure, listener is not called.

book

Article ID: KB0093383

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
Issue:
========
Pattern Matching failure listener is not called.

For this pattern string:

String inventoryPatternString = "define pattern /Patterns/InvReqAggregator \n" +
" using /Events/InventoryRequest as ir \n" +
" with ir.SKU" +
" starts with ir then within 60 seconds repeat 0 to 5 times ir";
 
This pattern aggregates at most six InventoryRequest events within a span of 60 seconds. If there is a success listener and a failure listener, if less than 6 events are sent, such as 2, after 60 seconds it will trigger the success listener which is expected. But if there are more than 6 events, such as 7, a timeout after 60 seconds is seen but it still triggers a success listener even though it should have triggered the failure listener.


Resolution:
========
Use the "during" clause rather than the "within" clause.

Corrected query:
String inventoryPatternString = "define pattern /Patterns/InvReqAggregator \n" +
" using /Events/InventoryRequest as ir \n" +
" with ir.SKU" +
" starts with ir then during 60 seconds repeat 0 to 5 times ir";

Issue/Introduction

Pattern Matching failure, listener is not called.