资源简介

activiti流程图高亮显示配置,为了方便别人快速配置,特此编辑此贴,盼同行们多多支持小编,原创不容易!

资源截图

代码片段和文件信息

package cn.vdc.bots.house.activiti.config;

import cn.vdc.bots.house.activiti.diagram.CustomProcessDiagramGeneratorI;
import cn.vdc.bots.house.activiti.service.impl.CustomGroupEntityManagerFactory;
import cn.vdc.bots.house.activiti.service.impl.CustomUserEntityManagerFactory;
import org.activiti.engine.impl.interceptor.SessionFactory;
import org.activiti.spring.SpringProcessEngineConfiguration;
import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;


/**
 * @author fjzha
 * @version 1.0
 * @date 2020/2/26 13:03
 */
@Configuration
public class ActivitiConfiguration implements ProcessEngineConfigurationConfigurer {

    @Autowired
    private CustomUserEntityManagerFactory customUserEntityManagerFactory;

    @Autowired
    private CustomGroupEntityManagerFactory customGroupEntityManagerFactory;

    //@Autowired
   //private ProcessHistoryManagerSessionFactory processHistoryManagerSessionFactory;

    @Autowired
    private CustomProcessDiagramGeneratorI customProcessDiagramGeneratorI;

    @Override
    public void configure(SpringProcessEngineConfiguration processEngineConfiguration) {
        // TODO Auto-generated method stub
        //processEngineConfiguration.setDataSource(dataSource);
        processEngineConfiguration.setDatabaseSchemaUpdate(“none“);// none true
        processEngineConfiguration.setDatabaseType(“oracle“);

        //processEngineConfiguration.setTransactionManager(transactionManager);

        // 流程图字体
        processEngineConfiguration.setActivityFontName(“宋体“);
        processEngineConfiguration.setAnnotationFontName(“宋体“);
        processEngineConfiguration.setLabelFontName(“宋体“);

        processEngineConfiguration.setJpaHandleTransaction(false);
        processEngineConfiguration.setJpaCloseEntityManager(false);
        //
        //processEngineConfiguration.setMailServerHost(mailProperty.getMailServerHost());
        //processEngineConfiguration.setMailServerUsername(mailProperty.getMailServerUsername());
        //processEngineConfiguration.setMailServerPassword(mailProperty.getMailServerPassword());
        //processEngineConfiguration.setMailServerPort(mailProperty.getMailServerPort());
        //
        //processEngineConfiguration.setJobExecutorActivate(false);
        processEngineConfiguration.setAsyncExecutorEnabled(false);
        processEngineConfiguration.setAsyncExecutorActivate(false);
        //自定义用户和组
        List customSessionFactories = new ArrayList<>();
        customSessionFactories.add(customUserEntityManagerFactory);
        customSessionFactories.add(customGroupEntityManagerFactory);
        // customSessionFactories.add(processHistoryManagerSessionFactory);
        processEngineConfiguration.setCustomSessionFactories(custo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-04-21 16:57  流程打包\
     文件        3200  2020-04-21 15:58  流程打包\ActivitiConfiguration.java
     文件       12949  2020-04-21 14:52  流程打包\CustomProcessDiagramCanvas.java
     文件       17743  2020-04-21 14:54  流程打包\CustomProcessDiagramGenerator.java
     文件         754  2020-04-21 14:44  流程打包\CustomProcessDiagramGeneratorI.java
     文件        5638  2020-04-21 14:55  流程打包\WorkflowConstants.java

评论

共有 条评论