}
String validateMsg = workflowProcess.validate();//校验工作流定义是否有效
if (validateMsg != null){
throw new KernelException(null,null,validateMsg);
}
NetInstance netInstance = new NetInstance(workflowProcess, kernelExtensions);
netInstance.setVersion(workflowDef.getVersion());//设置版本号
//map的key的组成规则:流程定义ID_V_版本号
netInstanceMap.put(workflowDef.getProcessId() + "_V_" + workflowDef.getVersion(), netInstance);
return netInstance;
}