parent
29a0fbfc43
commit
559bab571a
@ -1,19 +0,0 @@ |
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.config; |
||||
|
||||
import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventPublisher; |
||||
import org.springframework.context.ApplicationEventPublisher; |
||||
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.Configuration; |
||||
|
||||
/** |
||||
* BPM 通用的 Configuration 配置类,提供给 Activiti 和 Flowable |
||||
*/ |
||||
@Configuration(proxyBeanMethods = false) |
||||
public class BpmCommonConfiguration { |
||||
|
||||
@Bean |
||||
public BpmProcessInstanceResultEventPublisher processInstanceResultEventPublisher(ApplicationEventPublisher publisher) { |
||||
return new BpmProcessInstanceResultEventPublisher(publisher); |
||||
} |
||||
|
||||
} |
@ -1,6 +0,0 @@ |
||||
/** |
||||
* 自定义 Event 实现,提供方便业务接入的 Listener! |
||||
* |
||||
* @author 芋道源码 |
||||
*/ |
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.core.event; |
@ -1,4 +0,0 @@ |
||||
/** |
||||
* 占位 |
||||
*/ |
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.core; |
@ -1,6 +0,0 @@ |
||||
/** |
||||
* 提供给 Activiti 和 Flowable 的通用封装 |
||||
* |
||||
* @author 芋道源码 |
||||
*/ |
||||
package cn.iocoder.yudao.module.bpm.framework.bpm; |
2
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/BpmProcessInstanceResultEventPublisher.java → yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java
2
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/core/event/BpmProcessInstanceResultEventPublisher.java → yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/event/BpmProcessInstanceResultEventPublisher.java
@ -1,4 +1,4 @@ |
||||
package cn.iocoder.yudao.module.bpm.framework.bpm.core.event; |
||||
package cn.iocoder.yudao.module.bpm.framework.flowable.core.event; |
||||
|
||||
import cn.iocoder.yudao.module.bpm.event.BpmProcessInstanceResultEvent; |
||||
import lombok.AllArgsConstructor; |
@ -1,4 +1,4 @@ |
||||
package cn.iocoder.yudao.framework.flowable.core.util; |
||||
package cn.iocoder.yudao.module.bpm.framework.flowable.core.util; |
||||
|
||||
import cn.hutool.core.collection.CollUtil; |
||||
import cn.hutool.core.util.ArrayUtil; |
@ -1,16 +1,17 @@ |
||||
package cn.iocoder.yudao.framework.flowable.core.web; |
||||
package cn.iocoder.yudao.module.bpm.framework.web.core; |
||||
|
||||
import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils; |
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; |
||||
import org.springframework.web.filter.OncePerRequestFilter; |
||||
|
||||
import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; |
||||
import jakarta.servlet.FilterChain; |
||||
import jakarta.servlet.ServletException; |
||||
import jakarta.servlet.http.HttpServletRequest; |
||||
import jakarta.servlet.http.HttpServletResponse; |
||||
import org.springframework.web.filter.OncePerRequestFilter; |
||||
|
||||
import java.io.IOException; |
||||
|
||||
/** |
||||
* flowable Web 过滤器,将 userId 设置到 {@link org.flowable.common.engine.impl.identity.Authentication} 中 |
||||
* Flowable Web 过滤器,将 userId 设置到 {@link org.flowable.common.engine.impl.identity.Authentication} 中 |
||||
* |
||||
* @author jason |
||||
*/ |
File diff suppressed because one or more lines are too long
@ -1,37 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<parent> |
||||
<groupId>cn.iocoder.boot</groupId> |
||||
<artifactId>yudao-module-bpm</artifactId> |
||||
<version>${revision}</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<artifactId>yudao-spring-boot-starter-flowable</artifactId> |
||||
|
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>cn.iocoder.boot</groupId> |
||||
<artifactId>yudao-common</artifactId> |
||||
</dependency> |
||||
|
||||
<!-- Web 相关 --> |
||||
<dependency> |
||||
<groupId>cn.iocoder.boot</groupId> |
||||
<artifactId>yudao-spring-boot-starter-security</artifactId> |
||||
</dependency> |
||||
|
||||
<!-- flowable 工作流相关 --> |
||||
<dependency> |
||||
<groupId>org.flowable</groupId> |
||||
<artifactId>flowable-spring-boot-starter-process</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.flowable</groupId> |
||||
<artifactId>flowable-spring-boot-starter-actuator</artifactId> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
</project> |
@ -1,46 +0,0 @@ |
||||
package cn.iocoder.yudao.framework.flowable.config; |
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; |
||||
import cn.iocoder.yudao.framework.flowable.core.web.FlowableWebFilter; |
||||
import org.springframework.boot.autoconfigure.AutoConfiguration; |
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean; |
||||
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.core.task.AsyncListenableTaskExecutor; |
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
||||
|
||||
@AutoConfiguration |
||||
public class YudaoFlowableConfiguration { |
||||
|
||||
/** |
||||
* 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean |
||||
* |
||||
* 如果不创建,会导致项目启动时,Flowable 报错的问题 |
||||
*/ |
||||
@Bean(name = "applicationTaskExecutor") |
||||
@ConditionalOnMissingBean(name = "applicationTaskExecutor") |
||||
public AsyncListenableTaskExecutor taskExecutor() { |
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); |
||||
executor.setCorePoolSize(8); |
||||
executor.setMaxPoolSize(8); |
||||
executor.setQueueCapacity(100); |
||||
executor.setThreadNamePrefix("flowable-task-Executor-"); |
||||
executor.setAwaitTerminationSeconds(30); |
||||
executor.setWaitForTasksToCompleteOnShutdown(true); |
||||
executor.setAllowCoreThreadTimeOut(true); |
||||
executor.initialize(); |
||||
return executor; |
||||
} |
||||
|
||||
/** |
||||
* 配置 flowable Web 过滤器 |
||||
*/ |
||||
@Bean |
||||
public FilterRegistrationBean<FlowableWebFilter> flowableWebFilter() { |
||||
FilterRegistrationBean<FlowableWebFilter> registrationBean = new FilterRegistrationBean<>(); |
||||
registrationBean.setFilter(new FlowableWebFilter()); |
||||
registrationBean.setOrder(WebFilterOrderEnum.FLOWABLE_FILTER); |
||||
return registrationBean; |
||||
} |
||||
|
||||
} |
@ -1 +0,0 @@ |
||||
cn.iocoder.yudao.framework.flowable.config.YudaoFlowableConfiguration |
Loading…
Reference in new issue