public class WorkItemModeFactory {
public static WorkItemMode buildWorkItemMode(String mode) {
if(Constants.WORKITEM_SINGLE.equalsIgnoreCase(mode))
return new SingleWorkItemMode();
else if(Constants.WORKITEM_MULTI.equalsIgnoreCase(mode))
return new MultiWorkItemMode();
else
throw new ProcessEngineException("工作项模式值不正确,Mode="+mode);
}