Add capability to add external events to engine

Signed-off-by: walteryang <walteryang47@gmail.com>