We're very excited with the Spring integration in Activiti. You can configure your process engine in a Spring context like this:
<bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
...
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="databaseType" value="h2" />
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="dbSchemaStrategy" value="drop-create" />
<property name="deploymentResources" value="classpath*:/org/activiti/spring/test/autodeploy.*.bpmn20.xml" />
</bean>
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
Beans can then be referenced just like process variables from expressions --even with parameters-- in the process like this:
<serviceTask id="createLoanRequest"
activiti:expression="${loanRequestBean.newLoanRequest(customerName, amount)}"
activiti:resultVariableName="loanRequest"/>
Highlights of this release:
- Activiti Probe added Job and Deployment management
- Event listeners
- Query for process instances based on variable values
- Parameterized method expressions
- History details and audit capabilities
- Extracted FormService and improved flexible form handling
- Activiti config file from properties to xml
- PostgreSQL en Oracle support
- Improved DB performance by fine tuning indexes
- Check out all 62 Jira issues of this release
Check out the 10 minute Getting Started tutorial, the comprehansive 60+ page User Guide documentation or the Javadocs.
By now, you should be as excited as we are about the release. I won't keep you longer in suspension and share the download link now: Go get it!