when I try to get runtime manager via calling the two-parameter constructor, I got the error "RuntimeManager with id org.jbpm:Evaluation:1.0 is already active"
String processContext = "org.jbpm:Evaluation:1.0"; String[] strs = processContext.split(":"); UserGroupCallback userGroupCallback = new DBUserGroupCallbackImpl(false); RuntimeEnvironmentBuilder builder = RuntimeEnvironmentBuilder.getDefault(strs[0], strs[1], strs[2]); builder.userGroupCallback(userGroupCallback); RuntimeEnvironment environment = builder.get(); runtimeManager = RuntimeManagerFactory.Factory.get().newPerProcessInstanceRuntimeManager(environment, processContext);
but when I use the one-parameter constructor, it works well. like the below
String processContext = "org.jbpm:Evaluation:1.0"; UserGroupCallback userGroupCallback = new DBUserGroupCallbackImpl(false); RuntimeEnvironmentBuilder builder = RuntimeEnvironmentBuilder.getDefault(); builder.userGroupCallback(userGroupCallback); RuntimeEnvironment environment = builder.get(); RuntimeManager runtimeManager = RuntimeManagerFactory.Factory.get().newPerProcessInstanceRuntimeManager(environment);
does anybody can help me?
it means there is already one runtime manager with that id active. Make sure you don't create same runtime managers multiple times and you'll be fine.
HTH