1 Reply Latest reply on Feb 22, 2011 10:21 PM by Tihomir Surdilovic

    Null process version (JBPM5 + Guvnor)

    Pavel Sknar Newbie

      I have simple test. It is using knowladge agent. Knowledge agent load process from ChangeSet resources.

      But processe do not have version.

       

      Java code:

              KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("Guvnor default");

              kagent.applyChangeSet(ResourceFactory.newClassPathResource("definitions/ChangeSet.xml"));

              kagent.monitorResourceChangeEvents(false);

              KnowledgeBase kbase = kagent.getKnowledgeBase();

              for (Process process : kbase.getProcesses()) {

                  System.out.println("Loading process from Guvnor: " + process.getName()+ ", version: " + process.getVersion());

              }

       

      ChangeSet:

      <change-set xmlns='http://drools.org/drools-5.0/change-set'

                  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'

                  xs:schemaLocation='http://drools.org/drools-5.0/change-set http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd' >

          <add>

              <resource source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST' type='PKG' basicAuthentication="enabled" username="admin" password="admin" />

          </add>

      </change-set>

       

      Result:

          [junit] Loading process from Guvnor: User Task, version: null

          [junit] Loading process from Guvnor: Evaluation, version: null