我的Spring应用程序与Alfresco Activity工作流程集成

时间:2016-05-25 17:23:44

标签: spring alfresco

我用Spring框架和PostgreSQL开发了web应用程序, 在我的应用程序中,需要工作流程。 对于我的应用数据库是不同的。 我想在may应用程序中集成Alfresco Activity工作流程,

任何机构都可以提供如何在may web应用程序中集成Alfresco Activity工作流程吗?

1 个答案:

答案 0 :(得分:1)

您可以通过以下方式整合露天活动:

maven依赖:

<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配置文件:

<?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>

使用activity eclipse插件编辑你的bpmn2.0文件

并使用api来使用引擎。

如何使用api我可以建议阅读活动中的活动。

我希望这可以帮到你