[jboss-user] [JBoss jBPM] - Re: deploy from code problem

simonbaker do-not-reply at jboss.com
Tue May 15 13:12:43 EDT 2007


Thanks Ed for the reference, each little piece sheds some light (and more questions as well).  

For the heck of it, I blindly threw in a "JbpmConfiguration.createSchema()" statement in my code because, hey, it sounds promising...

Guess what, my errors went away and my logging shows a lot of insert statements into what appear to be tables with names like JBPM_NODE, JBPM_EVENT, etc.

Did I do good?

Now, when I look at the (outdated?) jBPM 2.0 Deployment Doc, under Configuration it describes 4 configuration mechanisms and some properties.  One of the properties is "jbpm.create.tables" and a possible value is "only-if-not-present". The description is anonymous wrote : If applicable, jbpm will create the the JBPM_ tables at startup if they are not present. The generated ddl starts with dropping the tables and contraints, then creates the tables, then adds the constraints.

Q: If I had had this property in my "jbpm.cfg.xml" file, would the schema have been created automatically at first access?

To continue the discussion:

For my bare-bones test, my "jbpm.cfg.xml" file is empty, and the comment in it says anonymous wrote :     The default configurations can be found in org/jbpm/default.jbpm.cfg.xml 
  |     Those configurations can be overwritten by putting this file called 
  |     jbpm.cfg.xml on the root of the classpath and put in the customized values.
  | 

Q: Does that mean that jBPM first reads the default file, then reads the "jbpm.cfg.xml" file and overrides any repeated settings, or does it mean that if the "jbpm.cfg.xml" file is present, the default file is ignored?

Also, when I look in that default file, there is a comment in it that says anonymous wrote :     This configuration is used when there is no jbpm.cfg.xml file found in the root of the classpath.  It is a very basic configuration without persistence and message services.  Only the authorization service installed.
  | You can parse and create processes, but when you try to use one of the unavailable services, you'll get an exception.
  | 

Two issues: 1) The first sentence seems to imply that the default file is completely ignored when the "jbpm.cfg.xml" file is present -- implying you need to copy any settings from the default file to the "jbpm.cfg.xml" if you want to use them, and 2) the comment says "without persistence", but the file has entries for persistence service and hibernate (see below).  

Q: Is the comment correct that there is no persistence set up?


  | <jbpm-configuration>
  | 
  |   <!-- 
  |     This configuration is used when there is no jbpm.cfg.xml file found in the 
  |     root of the classpath.  It is a very basic configuration without persistence
  |     and message services.  Only the authorization service installed.
  |     You can parse and create processes, but when you try to use one of the 
  |     unavailable services, you'll get an exception.
  |   -->
  |   
  |   <jbpm-context>
  |     <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
  |     <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
  |     <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
  |     <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
  |     <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
  |   </jbpm-context>
  | 
  |   <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
  |   <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
  |   <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
  |   <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
  |   <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
  |   <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
  |   <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
  |   <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
  |   <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
  | 
  |   <long   name="jbpm.msg.wait.timout" value="5000" singleton="true" />
  |   <int    name="jbpm.byte.block.size" value="1024" singleton="true" />
  |   <string name="mail.smtp.host" value="localhost" />
  |   <bean   name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
  |   <bean   name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
  |   <bean   name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
  | 
  | </jbpm-configuration>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045876#4045876

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045876



More information about the jboss-user mailing list