0 Replies Latest reply on Jun 14, 2013 3:03 PM by marcosdutto

    Identifier of the RuntimeManager in JBPM 6.0

    marcosdutto

      Hi,

       

      I am using JBPM 6 over JBoss7. and i have a problem creating RuntimeManagers. in particular PerRequestRuntimeManager.

      This is my code

       

      RuntimeEnvironmentBuilder envBuilder = RuntimeEnvironmentBuilder.getDefault().userGroupCallback(userGroupCallback)
                      .addAsset(ResourceFactory.newClassPathResource("pruebaBifNuevo.bpmn"), ResourceType.BPMN2);
              RuntimeEnvironment environment = envBuilder.get();
              RuntimeManager manager = RuntimeManagerFactory.Factory.get().newPerRequestRuntimeManager(environment);
      

       

      But i can't create more than one manager at the same time because it make an error and throw this exception at Line 30: AbstractRuntimeManager.java

       

      if (activeManagers.contains(identifier)) {
                  throw new IllegalStateException("RuntimeManager with id " + identifier + " is already active");
              }
      

       

      I can't understand why is throwing that exception, because nobody use the collection activeManagers to get any RuntimeManager. And in particular with a PerRequestRuntimeManager it doesn't have any sense, because I don't care of the identifier, I want only a manager.

       

      Is there something wrong in my code? Where I can submit this bug?

       

      Thanks in advance

       

      Marcos Dutto