When we have a single diagram, everything is OK, i.e.
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration" init-method="init">
<etc…>
<property name="deploymentMode" value="single-resource" />
<property name="deploymentResources" >
<list>
<value>classpath*:/diagrams/Diagram1.bpmn</value>
</list>
</property>
</bean>
Then we add a second diagram:
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration" init-method="init">
<etc…>
<property name="deploymentMode" value="single-resource" />
<property name="deploymentResources" >
<list>
<value>classpath*:/diagrams/Diagram1.bpmn</value>
<value>classpath*:/diagrams/Diagram2.bpmn</value>
</list>
</property>
</bean>
Now, each time we run a unit test file, we get the following error for the first test (only) in the unit test file:
java.lang.AssertionError: DB NOT CLEAN:
ACT_RE_DEPLOYMENT: 1 record(s) ACT_RE_PROCDEF: 1 record(s) ACT_GE_BYTEARRAY: 2 record(s)
at org.junit.Assert.fail(Assert.java:88)
at org.activiti.engine.impl.test.AbstractActivitiTestCase.assertAndEnsureCleanDb(AbstractActivitiTestCase.java:173)
at org.activiti.engine.impl.test.AbstractActivitiTestCase.runBare(AbstractActivitiTestCase.java:127)
at org.activiti.spring.impl.test.SpringActivitiTestCase.runBare(SpringActivitiTestCase.java:54)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
If we change the deployment mode to
<property name="deploymentMode" value="default" />
We do not get the error. That is OK for testing, but my understanding (correct me if I'm wrong) is that a deploymentMode of "default" will cause all diagrams to be redeployed, and for production we would like to be able to add a new diagram without redeploying the existing diagrams.Is there a way to add a new diagram without getting the error? Thank you.