Intra-Mart ServiceController解析

Intra-Mart处理工作流的流程点滴:

在Controller中生成Event对象的方法

 

    protected Event createEvent(String application, String key)
	throws ServiceControllerException {
	Event event = null;
	try {
	    event
		= EventManager.getEventManager().createEvent(application, key,
							     getUserInfo());
	} catch (Exception e) {
	    throw new ServiceControllerException(e.getMessage(), e);
	}
	return event;
    }

 

 

在此方法中,进一步说明Event由 EventManager的createEvent方法生成,并且在生成Event时加进里UserInfo对象.

 

 

    public Event createEvent(String application, String key, UserInfo info)
	throws EventPropertyException, EventException {
	Event event = eventContainer.createEvent(application, key);
	event.setApplication(application);
	event.setKey(key);
	event.setUserInfo(info);
	return event;
    }

 

此方法进一步解析了Event的生成,由EventContainer依据application,key 来生成,另外EventContainer由响应的Factory工厂生成.

 

待续:

你可能感兴趣的:(工作)