yan-master项目集成Activiti 6.0.0

  1. yan-service模块pom.xml文件中添加Activiti 6.0.0依赖

    pom.xml
    
    
    
        org.activiti
        activiti-engine
        6.0.0
    
    
    
    
        org.activiti
        activiti-spring
        6.0.0
    
  2. yan-service\src\main\resources\META-INF\spring目录下添加Activiti配置文件spring-activiti-context.xml

    
    
    
       
       
          
          
          
          
          
          
       
       
       
          
       
       
       
       
       
       
       
       
       
       
    
    
  3. yan-api\src\main\java\com\yan\api新建activiti目录并创建工作流服务WorkflowService.java

    package com.yan.api.activiti;
    
    /**
     * 工作流服务接口
     */
    public interface WorkflowService {
    
    }
  4. yan-service\src\main\java\com\yan\service新建activiti目录实现yan-api中的WorkflowService 服务接口WorkflowServiceImpl.java 

    package com.yan.service.activiti;
    
    import com.yan.api.activiti.WorkflowService;
    import org.activiti.engine.*;
    import org.springframework.beans.factory.annotation.Autowired;
    
    /**
     * 工作流服务接口实现类
     */
    public class WorkflowServiceImpl implements WorkflowService {
    
        @Autowired
        private RepositoryService repositoryService;
    
        @Autowired
        private RuntimeService runtimeService;
    
        @Autowired
        private TaskService taskService;
    
        @Autowired
        private FormService formService;
    
        @Autowired
        private HistoryService historyService;
    
    
    
    } 
  5. 在yan-service\src\main\resources\META-INF\spring\spring-dubbo-provider.xml 中对WorkflowService服务接口进行注册

    spring-dubbo-provider.xml
    
    
    
    
  6.  重启 yan-service模块中的 com.yan.service.ServiceApp.main() 方法

  7. 重启yan-web

你可能感兴趣的:(yan-master项目集成Activiti 6.0.0)