Hi Team,
I have a scenario where I need to detect following pattern for a transaction.
My basic transaction event look like this => Transaction(id,status, eventTime)
Transaction goes through following state.
BEGIN -> COMPLETE (within 5 day, if this comes then no need to wait for PROCESSING)
BEGIN -> PROCESSING (within 1 day)
PROCESSING -> PROCESSING (within 1 day, could happen upto 5 days)
PROCESSING -> COMPLETE (within 1 day)
In plain text, basically when a transaction is initiated it can go from BEGIN to COMPLETE in 5 days. But If its can not be completed within 1 day then it keep sending a PROCESSING event on that day. So this can happen upto 5 day and then finally it can send COMPLETE event.
I want to alert per transaction if there is any diversion form this pattern.
But still I am not sure how to design this pattern. I hope it is possible to design pattern with Flink CEP?
Also if I am not wrong , I need to use PatternTimeoutFunction to trigger alert.
Thanks,
Shishal