This content has been marked as final.
Show 2 replies
-
1. Re: Can't get value of field property in my ActionHandler
michaelholtzman Dec 7, 2005 1:47 PM (in response to michaelholtzman)Problem solved (replaced by new problem).
The process instance was being created with the wrong process definition, because my process definitions are not being properly versioned when they are imported like this:public void initProcessDefinitions() { JbpmSession jbpmSession; // For now, only load up our sample process. String processName = "example_process.par/processdefinition.xml"; console("Loading process definitions"); // begin a transaction on the persistence session jbpmSession = jbpmSessionFactory.openJbpmSession(); console("initProcessDefinitions: Reading xml file"); ProcessDefinition definition = ProcessDefinition.parseXmlResource(processName); console("initProcessDefinitions: Loaded process definition '" + definition.getName()+ "' from xml"); jbpmSession.beginTransaction(); // Save the process definition in the database console("initProcessDefinitions: Saving to database"); jbpmSession.getGraphSession().saveProcessDefinition(definition); // Commit the transaction console("initProcessDefinitions: Committing"); jbpmSession.commitTransaction(); // List out the stored process definitions java.util.List defs = jbpmSession.getGraphSession().findAllProcessDefinitions(); console("Found " + defs.size() + " process definitions in database:"); for (Iterator it = defs.iterator(); it.hasNext();) { ProcessDefinition def = (ProcessDefinition)it.next(); console("Process definition: " + def.getName() + " / " + def.getVersion()); } jbpmSession.close(); console("initProcessDefinitions: Done");
causing this to return the wrong process definitionlaunchJbpmSession.getGraphSession().findLatestProcessDefinition(processName);
See http://www.jboss.com/index.html?module=bb&op=viewtopic&t=73631 -
2. Re: Can't get value of field property in my ActionHandler
koen.aers Dec 7, 2005 5:31 PM (in response to michaelholtzman)Great, thanks for reporting back!
Regards,
Koen