lundi 23 février 2015

Triggering events with EPL

I have to define e query to select events that flows in this way:


let's imagine a tunnel with several videocameras within (let's say 3 videocameras) and two exits (Exit_A and Exit_B). Moreover, let's imagine that Exit_A is checked by all videocameras (3) and Exit_B is checked by 2 (excluding the last one).


To consider all people exiting from Exit_A I wrote the following EPL:


"select * from pattern [every camera1=Videocamera-> (camera2=Videocamera(id=camera1.id) -> camera3=Videocamera(id=camera2.id) ->exit=Exit(id=camera3.id))]"


Where Videocamera and Exit are beans I defined.


I considered that a person who exits from Exit_A must pass under videocamera1, then videocamera2 and finally under videocamera3, so I defined a pattern "every A->(B->C->Exit)" where I considered the id of person passed. I understand that person exit from Exit_A as it passed all 3 videocameras.


But if I want to check also all people exiting from Exit_B how can I enrich my EPL? How can I understand where does a flow of people exit in an EPL query?


Aucun commentaire:

Enregistrer un commentaire