springboot 2.5.2 와 flowable 6.6.0 통합 프로 세 스 엔진 응용 분석
                                            
 8044 단어  springbootflowable엔진.
                    
<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
@Configuration
public 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("[email protected]");
        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.모델 관리:웹 온라인 프로 세 스 디자이너,내 보 내기 xml 가 져 오기,복제 프로 세 스,배치 프로 세 스
2.프로 세 스 관리:프로 세 스 자원 파일 내 보 내기,프로 세 스 그림 보기,프로 세 스 인 스 턴 스 에 따라 프로 세 스 모델 반사,활성화 걸 기
3.실행 중 프로 세 스:프로 세 스 정보 보기,현재 작업 노드,현재 프로 세 스 맵,일시 정지 프로 세 스 폐기,대기 자 할당,자유 이동
4.역사의 흐름:흐름 정보,흐름 사용 시간,흐름 상태,임무 발기인 정보 보기
5.대기 임무:본인 의 개인 임무 와 본 역할 하의 임무,처리,기각,폐기,대리인 파견
6.이미 처 리 된 임무:자신 이 처 리 했 던 임무 와 절차 정보,절차 도,절차 상 태 를 조회(폐기 기각 정상 완성)
임 무 를 처리 할 때 사용 자 를 선택 하여 베 끼 기 를 할 수 있 는데,바로 베 낀 사람 에 게 역 내 편 지 를 보 내 현재 심사 의견 과 비고 정 보 를 통지 하 는 것 이다.
주의:현재 임 무 를 다 처리 할 때 다음 임 무 를 수행 할 사람 은 즉시 통신 으로 새로운 임무 소식 알림 을 받 습 니 다.임 무 를 폐기 하고 완료 할 때 임무 발기인 은 역 내 편지 소식 통 지 를 받 습 니 다.
springboot 2.5.2 와 flowable 6.6.0 통합 프로 세 스 엔진 응용 분석 에 관 한 이 글 은 여기까지 소개 되 었 습 니 다.더 많은 springboot 통합 flowable 내용 은 우리 의 이전 글 을 검색 하거나 아래 의 관련 글 을 계속 조회 하 시기 바 랍 니 다.앞으로 많은 응원 바 랍 니 다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Kotlin Springboot -- 파트 14 사용 사례 REST로 전환하여 POST로 JSON으로 전환前回 前回 前回 記事 の は は で で で で で で を 使っ 使っ 使っ て て て て て リクエスト を を 受け取り 、 reqeustbody で 、 その リクエスト の ボディ ボディ を を 受け取り 、 関数 内部 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.