EventContext ec = appContext.getEnvironment().getEventContext();
//
final String EventName = "MyEvent";//事件链的终端
final String SeedEvent = "SeedEvent";//种子事件
//1.添加事件监听器F
ec.addListener(EventName, new MyListener());
ec.addListener(SeedEvent, new EventListener() {
public void onEvent(String event, Object[] params) throws Throwable {
AppContext app = (AppContext) params[0];
EventContext localEC = app.getEnvironment().getEventContext();
System.out.println("before MyEvent.");