03-23-2011 05:37 AM
<bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
<property name="targetDataSource">
<bean class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/activity" />
<property name="username" value="activity" />
<property name="password" value="activity" />
<property name="defaultAutoCommit" value="false" />
</bean>
</property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="false" />
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="databaseType" value="mysql" />
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="true" />
<property name="history" value="full" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</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" />
<bean id="activitiRule" class="org.activiti.engine.test.ActivitiRule">
<property name="processEngine" ref="processEngine" />
</bean>
My code:
@Test
@Deployment(resources = {"example.bpmn20.xml"})
public void simpleProcessTest() {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("foo", "bar");
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("activateProcess", variables);
Assert.assertTrue(processInstance.isEnded());
}
The process is quite long but I cannot see anything in history neither in runtime database. I would like to see the progress in Probe but it also display nothing, it does not see any task… What am I doing wrong?03-23-2011 05:39 AM
03-23-2011 05:46 AM
03-23-2011 06:09 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.