亚洲免费在线视频-亚洲啊v-久久免费精品视频-国产精品va-看片地址-成人在线视频网

您的位置:首頁技術文章
文章詳情頁

springboot2.5.2與 flowable6.6.0整合流程引擎應用分析

瀏覽:5日期:2023-02-22 14:47:20

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;/** * 說明:Flowable配置 * 作者:FH Admin * from:fhadmin.cn */@Controller@Configurationpublic class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {@Override public void configure(SpringProcessEngineConfiguration engineConfiguration) {engineConfiguration.setActivityFontName('宋體');engineConfiguration.setLabelFontName('宋體');engineConfiguration.setAnnotationFontName('宋體'); } }3.重寫 SecurityUtils 重構流程編輯器獲取用戶信息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;/** * 說明:重構流程編輯器獲取用戶信息 * 作者: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在線流程設計器、導入導出xml、復制流程、部署流程

2.流程管理:導入導出流程資源文件、查看流程圖、根據流程實例反射出流程模型、激活掛起

3.運行中流程:查看流程信息、當前任務節點、當前流程圖、作廢暫停流程、指派待辦人、自由跳轉

4.歷史的流程:查看流程信息、流程用時、流程狀態、查看任務發起人信息

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

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

辦理任務時候可以選擇用戶進行抄送,就是給被抄送人發送站內信通知當前審批意見以及備注信息

注:當辦理完當前任務時,下一任務待辦人會即時通訊收到新任務消息提醒,當作廢和完結任務時,任務發起人會收到站內信消息通知

到此這篇關于springboot2.5.2與 flowable6.6.0整合流程引擎應用分析的文章就介紹到這了,更多相關springboot整合 flowable內容請搜索好吧啦網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持好吧啦網!

標簽: Spring
相關文章:
主站蜘蛛池模板: 成人69视频在线观看免费 | 免费高清不卡毛片在线看 | 亚洲女视频 | 亚洲六月丁香六月婷婷蜜芽 | 美女拍拍拍爽爽爽爽爽爽 | 天天碰夜夜操 | 国产精品成人影院 | 日本在线免费播放 | 99热在线获取最新地址 | 国产三级视频网站 | 国产精品外围在线观看 | 亚洲 欧美 激情 另类 自拍 | 久久国产精品-久久精品 | 在线视频久 | 精品国产福利 | 国产真实自拍 | 毛片在线看免费 | 欧美一区二区三区久久综合 | 国产黄色a三级三级三级 | 俺来也欧美亚洲a∨在线 | 久久精品免费全国观看国产 | 国产精品亚洲欧美日韩区 | 国产精品一久久香蕉国产线看 | 99久久99久久精品免费看子伦 | 久久久久久久性高清毛片 | 日本免费人成黄页网观看视频 | 亚洲精品自产拍在线观看 | 香蕉tv亚洲专区在线观看 | 精品精品国产自在久久高清 | 色天使色婷婷在线影院亚洲 | 一级黄色香蕉视频 | 国产性自爱拍偷在在线播放 | 亚洲a级在线观看 | 国产欧美另类性视频 | 成 人 黄 色 大 片 | 国产成人免费视频精品一区二区 | 亚洲综合亚洲 | 国产在线精品一区二区三区不卡 | 亚洲人成毛片线播放 | 一级特黄aaa大片 | 日韩中文在线观看 |