04-29-2016 01:46 PM
<!– Activiti related beans–>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="true" />
<property name="enableDatabaseEventLogging" value="true" />
<!– <property name="customFormTypes">
<list>
<bean class="org.activiti.explorer.form.UserFormType" />
<bean class="org.activiti.explorer.form.ProcessDefinitionFormType" />
<bean class="org.activiti.explorer.form.MonthFormType" />
</list>
</property> –>
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean" destroy-method="destroy">
<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="formService" factory-bean="processEngine"
factory-method="getFormService" />
<bean id="historyService" factory-bean="processEngine"
factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine"
factory-method="getManagementService" />
<bean id="identityService" factory-bean="processEngine"
factory-method="getIdentityService" />
@Autowired
private RuntimeService runtimeService;
@Autowired
private RepositoryService repositoryService;
public void startProcess(EmEntity emEntity){
repositoryService.createDeployment().name("Em Test").addInputStream("em-test.bpmn20.xml", ReflectUtil.getResourceAsStream("diagrams/em-test.bpmn")).deploy();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("em-test");
runtimeService.setVariable(processInstance.getId(), "emitraEntity", emitraEntity);
}
04-29-2016 01:53 PM
05-02-2016 12:46 AM
05-02-2016 02:49 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.