Hi,
I have a jBPM environment with Postgres that works perfectly.
I have a jUnit test suite set up to use hsql in memory and can't get that to work, specifically, the jbpm calls bomb out with:
org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.id.DbidGenerator
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:203)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:196)
at org.jbpm.pvm.internal.task.ParticipationImpl.<init>(ParticipationImpl.java:52)
at org.jbpm.pvm.internal.task.TaskImpl.addParticipation(TaskImpl.java:167)
at org.jbpm.pvm.internal.task.TaskImpl.addCandidateGroup(TaskImpl.java:159)
There is absolutely no documentation in the user or developer guides on how I could change the DbidGenerator, e.g. to make use of the packaged Memory Id Composer. I found some reference to <id-generator> tag, but I no specifics.
What am I missing here? The jbpm.cfb.xml is shared between the app and the test suite, the test suite has its own hibernate config:
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.hbm2ddl.auto">create-drop</property>
<property name="hibernate.format_sql">true</property>
<mapping resource="jbpm.repository.hbm.xml" />
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
</hibernate-configuration>
I read somewhere that the jbpm4_property table might not be initialized this way? True? If so, is there a known work-around?
Thanks