Skip to content

Commit

Permalink
!212 工作流支持会签、或签,可自定义任务分配方式
Browse files Browse the repository at this point in the history
Merge pull request !212 from 芋道源码/feature/bpm-back
  • Loading branch information
YunaiV authored and gitee-org committed Jul 8, 2022
2 parents 8de74dc + fceec9f commit 6d30d56
Show file tree
Hide file tree
Showing 248 changed files with 1,076 additions and 5,396 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ nbdist/

### JRebel ###
rebel.xml

application-my.yaml
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* 权限认证使用 Spring Security & Token & Redis,支持多终端、多种用户的认证系统。
* 支持加载动态权限菜单,按钮级别权限控制,本地缓存提升性能。
* 支持 SaaS 多租户系统,可自定义每个租户的权限,提供透明化的多租户底层封装。
* 工作流使用 Activiti + Flowable,支持动态表单、在线设计流程、多种任务分配方式。
* 工作流使用 Flowable,支持动态表单、在线设计流程、会签 / 或签、多种任务分配方式。
* 高效率开发,使用代码生成器可以一键生成前后端代码 + 单元测试 + Swagger 接口文档 + Validator 参数校验。
* 集成微信小程序、微信公众号、企业微信、钉钉等三方登陆,集成支付宝、微信等支付与退款。
* 集成阿里云、腾讯云、云片等短信渠道,集成 MinIO、阿里云、腾讯云、七牛云等云存储服务。
Expand Down Expand Up @@ -167,7 +167,7 @@ ps:核心功能已经实现,正在对接微信小程序中...
| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 5.3.20 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao) |
| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 5.6.5 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) |
| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 6.2.3 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) |
| [Activiti](https://github.com/Activiti/Activiti) | 工作流引擎 | 7.1.0.M6 | [文档](TODO) |
| [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 6.7.0 | [文档](https://doc.iocoder.cn/bpm/) |
| [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) |
| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 3.0.3 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) |
| [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.1 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) |
Expand Down
1 change: 0 additions & 1 deletion yudao-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,6 @@
<artifactId>justauth-spring-boot-starter</artifactId> <!-- 社交登陆(例如说,个人微信、企业微信等等) -->
<version>${justauth.version}</version>
</dependency>

</dependencies>
</dependencyManagement>

Expand Down
1 change: 0 additions & 1 deletion yudao-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
<module>yudao-spring-boot-starter-biz-data-permission</module>
<module>yudao-spring-boot-starter-biz-error-code</module>

<module>yudao-spring-boot-starter-activiti</module>
<module>yudao-spring-boot-starter-flowable</module>
</modules>

Expand Down
48 changes: 0 additions & 48 deletions yudao-framework/yudao-spring-boot-starter-activiti/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@
import java.util.Arrays;
import java.util.List;

/**
* Flowable 相关的工具方法
*
* @author 芋道源码
*/
public class FlowableUtils {

// ========== User 相关的工具方法 ==========

public static void setAuthenticatedUserId(Long userId) {
Authentication.setAuthenticatedUserId(String.valueOf(userId));
}
Expand All @@ -19,6 +26,8 @@ public static void clearAuthenticatedUserId() {
Authentication.setAuthenticatedUserId(null);
}

// ========== BPMN 相关的工具方法 ==========

/**
* 获得 BPMN 流程中,指定的元素们
*
Expand Down Expand Up @@ -59,4 +68,15 @@ public static byte[] getBpmnBytes(BpmnModel model) {
BpmnXMLConverter converter = new BpmnXMLConverter();
return converter.convertToXML(model);
}

// ========== Execution 相关的工具方法 ==========

public static String formatCollectionVariable(String activityId) {
return activityId + "_assignees";
}

public static String formatCollectionElementVariable(String activityId) {
return activityId + "_assignee";
}

}
9 changes: 2 additions & 7 deletions yudao-module-bpm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<modules>
<module>yudao-module-bpm-api</module>
<module>yudao-module-bpm-base</module>
<module>yudao-module-bpm-biz-flowable</module>
<module>yudao-module-bpm-biz-activiti</module>
<module>yudao-module-bpm-biz</module>
</modules>
<artifactId>yudao-module-bpm</artifactId>
<packaging>pom</packaging>
Expand All @@ -23,10 +21,7 @@
例如说:流程定义、表单配置、审核中心(我的申请、我的待办、我的已办)等等
bpm 解释:https://baike.baidu.com/item/BPM/1933

目前提供两套实现方案:
1. 基于 Activiti 7 实现的 yudao-module-bpm-biz-activiti
2. 基于 Flowable 6 实现的 yudao-module-bpm-biz-flowable
两套实现会存在共享的逻辑,所以会继承 yudao-module-bpm-base
工作流基于 Flowable 6 实现,分成流程定义、流程表单、流程实例、流程任务等功能模块。
</description>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
public enum BpmTaskAssignRuleTypeEnum {

ROLE(10, "角色"),

DEPT_MEMBER(20, "部门的成员"), // 包括负责人
DEPT_LEADER(21, "部门的负责人"),
POST(22, "岗位"),

USER(30, "用户"),

USER_GROUP(40, "用户组"),

SCRIPT(50, "自定义脚本"), // 例如说,发起人所在部门的领导、发起人所在部门的领导的领导
;

Expand Down
Loading

0 comments on commit 6d30d56

Please sign in to comment.