1 Reply Latest reply on Jan 8, 2015 2:01 AM by Maciej Swiderski

    Error: RuntimeManager with id org.jbpm:Evaluation:1.0 is already active

    Steven Hu Newbie

      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?