Reputation: 13
I have developed web application with spring framework and PostgreSQL, In my application there is requirement of workflow. For my application database is different. I want to integrate Alfresco Activity workflow in may application,
Could any body give how can I integrate Alfresco Activity workflow in may web application?
Upvotes: 0
Views: 435
Reputation: 4532
You may integrate alfresco activity in this way:
maven dependency:
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>${activiti-version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring</artifactId>
<version>${activiti-version}</version>
</dependency>
spring configuration file like this:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<bean id="activitiTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="activitiEngineDataSource" />
</bean>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="activitiEngineDataSource" />
<property name="transactionManager" ref="activitiTransactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="deploymentResources" value="classpath:/bpm/*.bpmn20.xml"/>
<property name="history" value="full" />
<property name="jobExecutorActivate" value="false" />
<property name="mailServerUsername" value="valerio.vaudi@localhost"/>
<property name="mailServerPassword" value="pass"/>
<property name="mailServerHost" value="localhost"/>
<property name="mailServerPort" value="25"/>
<property name="mailServerUseTLS" value="true"/>
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="formService" factory-bean="processEngine" factory-method="getFormService"/>
<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="itentitiService" factory-bean="processEngine" factory-method="getIdentityService" />
<jdbc:embedded-database id="activitiEngineDataSource" type="H2">
<jdbc:script location="classpath:org/activiti/db/create/activiti.h2.create.engine.sql" />
<jdbc:script location="classpath:org/activiti/db/create/activiti.h2.create.history.sql" />
<jdbc:script location="classpath:org/activiti/db/create/activiti.h2.create.identity.sql" />
</jdbc:embedded-database>
</beans>
use activity eclipse plug-in for editing your bpmn2.0 file
and use the api for use the engine.
how use the api I can suggest to read Activity in action.
I Hope that this can help you
Upvotes: 1