In my project ,i use SpringProcessEngineConfiguration to init my engine,and use org.springframework.orm.hibernate4.HibernateTransactionManager as a Transaction tool,but it has no effect when I throw new RuntimeException manually ,what is strange is that my own data has been roll back,just the data that has been inserted by the engine didn’t roll back ,it confused me a few days.
Thank you very much for this awesome support!
<bean id="processEngineConfiguration"
class="org.flowable.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="masterDataSource"/>
<property name="databaseSchemaUpdate" value="true"/>
<property name="deploymentMode" value="single-resource"/>
<property name="asyncExecutorActivate" value="false"/>
<property name="customPreCommandInterceptors" >
<list>
<ref bean="taskValidateCommandInterceptor"/>
</list>
</property>
<property name="activityFontName" value="宋体"/>
<property name="labelFontName" value="宋体"/>
<property name="annotationFontName" value="宋体"/>
<property name="processDiagramGenerator" ref="jlpayProcessDiagramGenetator"/>
<property name="transactionManager" ref="masterTransactionManager"/>
<property name="disableIdmEngine" value="true"/>
<property name="idBlockSize" value="10"/>
</bean>
<bean id="processEngine" class="org.flowable.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="masterTransactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>