欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

springboot2.5.2與 flowable6.6.0整合流程引擎應(yīng)用分析

 更新時(shí)間:2021年07月27日 15:02:21   作者:m17193095294  
這篇文章主要介紹了springboot2.5.2與 flowable6.6.0整合流程引擎應(yīng)用分析,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

1.pom

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.2</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <flowable.version>6.6.0</flowable.version>
    </properties>

         <!--flowable工作流依賴-->
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-spring-boot-starter</artifactId>
            <version>${flowable.version}</version>
        </dependency>
         <!-- https://mvnrepository.com/artifact/org.flowable/flowable-json-converter -->
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-json-converter</artifactId>
            <version>${flowable.version}</version>
        </dependency>
        <!-- app 依賴 包含 rest,logic,conf -->
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-ui-modeler-rest</artifactId>
            <version>${flowable.version}</version>
        </dependency>
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-ui-modeler-logic</artifactId>
            <version>${flowable.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-slf4j-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-ui-modeler-conf</artifactId>
            <version>${flowable.version}</version>
        </dependency>

2.FlowableConfig配置類

package org.fh.config;

import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;

/**
 * 說(shuō)明:Flowable配置
 * 作者:FH Admin
 * from:fhadmin.cn
 */
@Controller
@Configuration
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
    
    @Override
    public void configure(SpringProcessEngineConfiguration engineConfiguration) {
        engineConfiguration.setActivityFontName("宋體");
        engineConfiguration.setLabelFontName("宋體");
        engineConfiguration.setAnnotationFontName("宋體");
    }
    
}
3.重寫(xiě) SecurityUtils 重構(gòu)流程編輯器獲取用戶信息

package org.flowable.ui.common.security;

import org.fh.util.Jurisdiction;
import org.flowable.common.engine.api.FlowableIllegalStateException;
import org.flowable.idm.api.User;
import org.flowable.ui.common.model.RemoteUser;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;

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

/**
 * 說(shuō)明:重構(gòu)流程編輯器獲取用戶信息
 * 作者:FH Admin
 * from:fhadmin.cn
 */
public class SecurityUtils {

    private static User assumeUser;
    
    private static SecurityScopeProvider securityScopeProvider = new FlowableSecurityScopeProvider();

    private SecurityUtils() {
    }

    /**
     * Get the login of the current user.
     */
    public static String getCurrentUserId() {
        User user = getCurrentUserObject();
        if (user != null) {
            return user.getId();
        }
        return null;
    }

    /**
     * @return the {@link User} object associated with the current logged in user.
     */
    public static User getCurrentUserObject() {
        if (assumeUser != null) {
            return assumeUser;
        }

        RemoteUser user = new RemoteUser();
        user.setId(Jurisdiction.getUsername());
        user.setDisplayName(Jurisdiction.getName());
        user.setFirstName(Jurisdiction.getName());
        user.setLastName(Jurisdiction.getName());
        user.setEmail("admin@flowable.com");
        user.setPassword("123456");
        List<String> pris = new ArrayList<>();
        pris.add(DefaultPrivileges.ACCESS_MODELER);
        pris.add(DefaultPrivileges.ACCESS_IDM);
        pris.add(DefaultPrivileges.ACCESS_ADMIN);
        pris.add(DefaultPrivileges.ACCESS_TASK);
        pris.add(DefaultPrivileges.ACCESS_REST_API);
        user.setPrivileges(pris);
        return user;
    }
    
    public static void setSecurityScopeProvider(SecurityScopeProvider securityScopeProvider) {
        SecurityUtils.securityScopeProvider = securityScopeProvider;
    }

    public static SecurityScope getCurrentSecurityScope() {
        SecurityContext securityContext = SecurityContextHolder.getContext();
        if (securityContext != null && securityContext.getAuthentication() != null) {
            return getSecurityScope(securityContext.getAuthentication());
        }
        return null;
    }

    public static SecurityScope getSecurityScope(Authentication authentication) {
        return securityScopeProvider.getSecurityScope(authentication);
    }

    public static SecurityScope getAuthenticatedSecurityScope() {
        SecurityScope currentSecurityScope = getCurrentSecurityScope();
        if (currentSecurityScope != null) {
            return currentSecurityScope;
        }
        throw new FlowableIllegalStateException("User is not authenticated");
    }

    public static void assumeUser(User user) {
        assumeUser = user;
    }

    public static void clearAssumeUser() {
        assumeUser = null;
    }
}

工作流模塊----------------www.fhadmin.cn---------------

1.模型管理:web在線流程設(shè)計(jì)器、導(dǎo)入導(dǎo)出xml、復(fù)制流程、部署流程

2.流程管理:導(dǎo)入導(dǎo)出流程資源文件、查看流程圖、根據(jù)流程實(shí)例反射出流程模型、激活掛起

3.運(yùn)行中流程:查看流程信息、當(dāng)前任務(wù)節(jié)點(diǎn)、當(dāng)前流程圖、作廢暫停流程、指派待辦人、自由跳轉(zhuǎn)

4.歷史的流程:查看流程信息、流程用時(shí)、流程狀態(tài)、查看任務(wù)發(fā)起人信息

5.待辦任務(wù):查看本人個(gè)人任務(wù)以及本角色下的任務(wù)、辦理、駁回、作廢、指派一下代理人

6.已辦任務(wù):查看自己辦理過(guò)的任務(wù)以及流程信息、流程圖、流程狀態(tài)(作廢 駁回 正常完成)

辦理任務(wù)時(shí)候可以選擇用戶進(jìn)行抄送,就是給被抄送人發(fā)送站內(nèi)信通知當(dāng)前審批意見(jiàn)以及備注信息

注:當(dāng)辦理完當(dāng)前任務(wù)時(shí),下一任務(wù)待辦人會(huì)即時(shí)通訊收到新任務(wù)消息提醒,當(dāng)作廢和完結(jié)任務(wù)時(shí),任務(wù)發(fā)起人會(huì)收到站內(nèi)信消息通知

到此這篇關(guān)于springboot2.5.2與 flowable6.6.0整合流程引擎應(yīng)用分析的文章就介紹到這了,更多相關(guān)springboot整合 flowable內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • mybatis?selectKey賦值未生效的原因分析

    mybatis?selectKey賦值未生效的原因分析

    這篇文章主要介紹了mybatis?selectKey賦值未生效的原因分析,selectKey 會(huì)將 SELECT LAST_INSERT_ID()的結(jié)果放入到傳入的實(shí)體類的主鍵里面,文中通過(guò)代碼示例給大家講解非常詳細(xì),需要的朋友可以參考下
    2024-02-02
  • Spring中@Transactional(rollbackFor=Exception.class)屬性用法介紹

    Spring中@Transactional(rollbackFor=Exception.class)屬性用法介紹

    這篇文章介紹了Spring中@Transactional(rollbackFor=Exception.class)屬性的用法,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2021-12-12
  • 深入探究Java原型模式的魅力

    深入探究Java原型模式的魅力

    Java原型模式是一種創(chuàng)建型設(shè)計(jì)模式,它通過(guò)復(fù)制現(xiàn)有對(duì)象的實(shí)例來(lái)創(chuàng)建新的對(duì)象實(shí)例,在本篇博客中,我們將詳細(xì)介紹Java原型模式的原理、實(shí)現(xiàn)方式、優(yōu)缺點(diǎn)以及適用場(chǎng)景等方面,需要的朋友可以參考下
    2023-05-05
  • Spring Boot2中如何優(yōu)雅地個(gè)性化定制Jackson實(shí)現(xiàn)示例

    Spring Boot2中如何優(yōu)雅地個(gè)性化定制Jackson實(shí)現(xiàn)示例

    這篇文章主要為大家介紹了Spring Boot2中如何優(yōu)雅地個(gè)性化定制Jackson實(shí)現(xiàn)示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-05-05
  • 基于java SSM springboot實(shí)現(xiàn)抗疫物質(zhì)信息管理系統(tǒng)

    基于java SSM springboot實(shí)現(xiàn)抗疫物質(zhì)信息管理系統(tǒng)

    這篇文章主要介紹了基于JAVA SSM springboot實(shí)現(xiàn)的抗疫物質(zhì)信息管理系統(tǒng),本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-08-08
  • 使用MultipartFile來(lái)上傳單個(gè)及多個(gè)文件代碼示例

    使用MultipartFile來(lái)上傳單個(gè)及多個(gè)文件代碼示例

    這篇文章主要介紹了使用MultipartFile來(lái)上傳單個(gè)及多個(gè)文件代碼示例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2024-01-01
  • Java Swing JLabel標(biāo)簽的使用方法

    Java Swing JLabel標(biāo)簽的使用方法

    這篇文章主要介紹了Java Swing JLabel標(biāo)簽的使用方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-12-12
  • 淺談Java泛型讓聲明方法返回子類型的方法

    淺談Java泛型讓聲明方法返回子類型的方法

    下面小編就為大家?guī)?lái)一篇淺談Java泛型讓聲明方法返回子類型的方法。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-02-02
  • JavaWeb實(shí)現(xiàn)表單提交的示例詳解

    JavaWeb實(shí)現(xiàn)表單提交的示例詳解

    這篇文章主要介紹了如何利用JavaWeb實(shí)現(xiàn)表單提交功能,文中的示例代碼講解詳細(xì),對(duì)我們學(xué)習(xí)JavaWeb有一定幫助,感興趣的可以了解一下
    2022-03-03
  • java實(shí)現(xiàn)水波紋擴(kuò)散效果

    java實(shí)現(xiàn)水波紋擴(kuò)散效果

    這篇文章主要為大家詳細(xì)介紹了java實(shí)現(xiàn)水波紋擴(kuò)散效果,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2019-01-01

最新評(píng)論