Compare commits
78 Commits
lims_dev
...
85ef3b75fe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85ef3b75fe | ||
|
|
0943dbbe05 | ||
|
|
ae26e14aa2 | ||
|
|
af6553698b | ||
|
|
631189d538 | ||
|
|
faa6de5965 | ||
|
|
98d585a9ae | ||
|
|
234ab78ba9 | ||
|
|
8d23ba8504 | ||
|
|
a693c2d91e | ||
|
|
9ad0b03b6b | ||
|
|
1e404a9ef2 | ||
|
|
09cb51bcdf | ||
|
|
1697575bf5 | ||
|
|
5cbc445cf7 | ||
|
|
3e3cc502e3 | ||
|
|
c4968d1aea | ||
|
|
5aa83d739e | ||
|
|
5ba7f5753c | ||
|
|
dd1e1790db | ||
|
|
85e5bae08e | ||
|
|
28df5a8896 | ||
|
|
ea9474895c | ||
|
|
46e42cf41d | ||
|
|
d6fe76db44 | ||
|
|
3211dbe2b5 | ||
|
|
0eff938f9e | ||
|
|
f87a7af8e4 | ||
|
|
30f182828a | ||
|
|
92f60e7132 | ||
|
|
c44d798e68 | ||
|
|
6ecfcf2a09 | ||
|
|
32bb22d6b6 | ||
|
|
f16243441e | ||
|
|
0740da8559 | ||
|
|
f06e0a4d5c | ||
|
|
39ff226c9b | ||
|
|
b4805414c5 | ||
|
|
aa918d5cc0 | ||
|
|
bd602cb3cd | ||
|
|
d8882188ef | ||
|
|
6dace51774 | ||
|
|
23b716a843 | ||
|
|
ae451f9062 | ||
|
|
224a83f7e7 | ||
|
|
e909649eac | ||
|
|
f5f06f503b | ||
|
|
b3b324e0d9 | ||
|
|
c327678aa4 | ||
|
|
3e88f2a647 | ||
|
|
b1920b7b47 | ||
|
|
cea6ff4a52 | ||
|
|
f7af0cad09 | ||
|
|
947c867526 | ||
|
|
8e43f3e2a3 | ||
|
|
bac1c4d322 | ||
|
|
10df09b9bb | ||
|
|
606186aadc | ||
|
|
7ac2e4dcbd | ||
|
|
bd6ffa6217 | ||
|
|
edb686174d | ||
|
|
703414ef8c | ||
|
|
00e445c80d | ||
|
|
2f73f98c7c | ||
|
|
e43e5f5caf | ||
|
|
95b775a16d | ||
|
|
285e0ab17d | ||
|
|
c53b24be05 | ||
|
|
af60a8c020 | ||
|
|
a8780089f1 | ||
|
|
b4b538365c | ||
|
|
5b3b1e4f66 | ||
|
|
fc24ab91fa | ||
|
|
3b8fb98eeb | ||
|
|
6e90e8168b | ||
|
|
7cbcd15399 | ||
|
|
8ca9ac7ce8 | ||
|
|
ce7c25f6a2 |
@@ -27,6 +27,13 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: Asia/Shanghai
|
value: Asia/Shanghai
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- "/bin/sh"
|
||||||
|
- "-c"
|
||||||
|
- "sleep 35"
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /actuator/health
|
path: /actuator/health
|
||||||
@@ -48,7 +55,7 @@ spec:
|
|||||||
limits:
|
limits:
|
||||||
cpu: "1"
|
cpu: "1"
|
||||||
memory: "2048Mi"
|
memory: "2048Mi"
|
||||||
terminationGracePeriodSeconds: 30
|
terminationGracePeriodSeconds: 40
|
||||||
strategy:
|
strategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
|
|||||||
40
pom.xml
40
pom.xml
@@ -12,19 +12,18 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<name>${project.artifactId}</name>
|
<name>${project.artifactId}</name>
|
||||||
<description>芋道项目基础脚手架</description>
|
<description>项目基础脚手架</description>
|
||||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>3.0.45</revision>
|
<revision>3.0.47-SNAPSHOT</revision>
|
||||||
<business.supply.version>3.0.44</business.supply.version>
|
<business.supply.version>3.0.47-SNAPSHOT</business.supply.version>
|
||||||
<business.base.version>3.0.44</business.base.version>
|
<business.base.version>3.0.47-SNAPSHOT</business.base.version>
|
||||||
<business.logistic.version>3.0.44</business.logistic.version>
|
<business.logistic.version>3.0.47-SNAPSHOT</business.logistic.version>
|
||||||
<business.manage.version>3.0.44</business.manage.version>
|
<business.manage.version>3.0.47-SNAPSHOT</business.manage.version>
|
||||||
<business.qms.version>3.0.44</business.qms.version>
|
<business.qms.version>3.0.47-SNAPSHOT</business.qms.version>
|
||||||
<business.mes.version>3.0.44</business.mes.version>
|
<business.mes.version>3.0.47-SNAPSHOT</business.mes.version>
|
||||||
<business.capital.version>3.0.44</business.capital.version>
|
<business.capital.version>3.0.47-SNAPSHOT</business.capital.version>
|
||||||
<business.product.version>3.0.44</business.product.version>
|
<business.product.version>3.0.47-SNAPSHOT</business.product.version>
|
||||||
<!-- Maven 相关 -->
|
<!-- Maven 相关 -->
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
@@ -195,7 +194,7 @@
|
|||||||
<repository>
|
<repository>
|
||||||
<id>ZT</id>
|
<id>ZT</id>
|
||||||
<name>中铜 ZStack 私服</name>
|
<name>中铜 ZStack 私服</name>
|
||||||
<url>http://172.16.46.63:30708/repository/test/</url>
|
<url>http://172.16.46.63:30708/repository/zt-cloud/</url>
|
||||||
<releases>
|
<releases>
|
||||||
<updatePolicy>always</updatePolicy>
|
<updatePolicy>always</updatePolicy>
|
||||||
<checksumPolicy>warn</checksumPolicy>
|
<checksumPolicy>warn</checksumPolicy>
|
||||||
@@ -213,11 +212,11 @@
|
|||||||
<name>中铜 ZStack 私服</name>
|
<name>中铜 ZStack 私服</name>
|
||||||
<url>http://172.16.46.63:30708/repository/test/</url>
|
<url>http://172.16.46.63:30708/repository/test/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<!-- <snapshotRepository>-->
|
<snapshotRepository>
|
||||||
<!-- <id>ZT</id>-->
|
<id>ZT-snap</id>
|
||||||
<!-- <name>中铜 ZStack 私服</name>-->
|
<name>中铜 ZStack 私服</name>
|
||||||
<!-- <url>https://your-nexus.example.com/repository/maven-snapshots/</url>-->
|
<url>http://172.16.46.63:30708/repository/test-snap/</url>
|
||||||
<!-- </snapshotRepository>-->
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
@@ -269,7 +268,14 @@
|
|||||||
<profile>
|
<profile>
|
||||||
<id>qsj</id>
|
<id>qsj</id>
|
||||||
<properties>
|
<properties>
|
||||||
|
<env.name>dev</env.name>
|
||||||
|
<!--Nacos 配置-->
|
||||||
|
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||||
<config.namespace>qsj</config.namespace>
|
<config.namespace>qsj</config.namespace>
|
||||||
|
<config.group>DEFAULT_GROUP</config.group>
|
||||||
|
<config.username>nacos</config.username>
|
||||||
|
<config.password>P@ssword25</config.password>
|
||||||
|
<config.version>1.0.0</config.version>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import lombok.ToString;
|
|||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class BpmFormPageReqDTO extends PageParam {
|
public class BpmFormPageReqDTO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "表单名称", example = "芋道")
|
@Schema(description = "表单名称", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ public class BpmFormRespDTO {
|
|||||||
@Schema(description = "表单编号", example = "1024")
|
@Schema(description = "表单编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "表单名", example = "芋艿")
|
@Schema(description = "表单名", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "表单状态", example = "1")
|
@Schema(description = "表单状态", example = "1")
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class BpmFormSaveReqDTO {
|
|||||||
@Schema(description = "表单编号", example = "1024")
|
@Schema(description = "表单编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "表单名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
@Schema(description = "表单名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
@NotEmpty(message = "表单名不能为空")
|
@NotEmpty(message = "表单名不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ public class BpmUserGroupRespDTO {
|
|||||||
@Schema(description = "编号", example = "1024")
|
@Schema(description = "编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "组名", example = "芋艿")
|
@Schema(description = "组名", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "描述", example = "芋艿")
|
@Schema(description = "描述", example = "ZT")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Schema(description = "成员用户编号数组", example = "1,2,3")
|
@Schema(description = "成员用户编号数组", example = "1,2,3")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
@FeignClient(name = ApiConstants.NAME) // TODO ZT:fallbackFactory =
|
||||||
@Tag(name = "RPC 服务 - 流程实例")
|
@Tag(name = "RPC 服务 - 流程实例")
|
||||||
public interface BpmProcessInstanceApi {
|
public interface BpmProcessInstanceApi {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class BpmApprovalDetailReqDTO {
|
|||||||
@Schema(description = "流程实例的编号", example = "1024")
|
@Schema(description = "流程实例的编号", example = "1024")
|
||||||
private String processInstanceId; // 使用场景:流程已发起时候传流程实例 ID
|
private String processInstanceId; // 使用场景:流程已发起时候传流程实例 ID
|
||||||
|
|
||||||
// TODO @芋艿:如果未来 BPMN 增加流程图,它没有发起人节点,会有问题。
|
// TODO @ZT:如果未来 BPMN 增加流程图,它没有发起人节点,会有问题。
|
||||||
@Schema(description = "流程活动编号", example = "StartUserNode")
|
@Schema(description = "流程活动编号", example = "StartUserNode")
|
||||||
private String activityId; // 用于获取表单权限。1)发起流程时,传"发起人节点" activityId 可获取发起人的表单权限;2)从抄送列表界面进来时,传抄送的 activityId 可获取抄送人的表单权限;
|
private String activityId; // 用于获取表单权限。1)发起流程时,传"发起人节点" activityId 可获取发起人的表单权限;2)从抄送列表界面进来时,传抄送的 activityId 可获取抄送人的表单权限;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class BpmProcessInstancePageReqDTO extends PageParam {
|
|||||||
@Schema(description = "流程实例的编号", example = "1024")
|
@Schema(description = "流程实例的编号", example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程实例的名字", example = "芋艿")
|
@Schema(description = "流程实例的名字", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程定义的编号", example = "2048")
|
@Schema(description = "流程定义的编号", example = "2048")
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class BpmProcessInstanceRespDTO {
|
|||||||
@Schema(description = "流程实例的编号", example = "1024")
|
@Schema(description = "流程实例的编号", example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程实例的名字", example = "芋艿")
|
@Schema(description = "流程实例的名字", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程摘要")
|
@Schema(description = "流程摘要")
|
||||||
@@ -49,7 +49,7 @@ public class BpmProcessInstanceRespDTO {
|
|||||||
@Schema(description = "持续时间", example = "1000")
|
@Schema(description = "持续时间", example = "1000")
|
||||||
private Long durationInMillis;
|
private Long durationInMillis;
|
||||||
|
|
||||||
@Schema(description = "提交的表单值", example = "{\"name\": \"芋艿\"}")
|
@Schema(description = "提交的表单值", example = "{\"name\": \"ZT\"}")
|
||||||
private Map<String, Object> formVariables;
|
private Map<String, Object> formVariables;
|
||||||
|
|
||||||
@Schema(description = "业务的唯一标识", example = "1")
|
@Schema(description = "业务的唯一标识", example = "1")
|
||||||
@@ -77,7 +77,7 @@ public class BpmProcessInstanceRespDTO {
|
|||||||
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "任务分配人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048")
|
@Schema(description = "任务分配人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class BpmTaskPageReqDTO extends PageParam {
|
public class BpmTaskPageReqDTO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "流程任务名", example = "芋艿")
|
@Schema(description = "流程任务名", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程定义的编号", example = "2048")
|
@Schema(description = "流程定义的编号", example = "2048")
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class BpmTaskRespDTO {
|
|||||||
@Schema(description = "任务编号", example = "1024")
|
@Schema(description = "任务编号", example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "任务名字", example = "芋艿")
|
@Schema(description = "任务名字", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "接收人的用户编号", example = "1")
|
@Schema(description = "接收人的用户编号", example = "1")
|
||||||
@@ -60,7 +60,7 @@ public class BpmTaskRespDTO {
|
|||||||
@Schema(description = "表单项的数组", example = "[]")
|
@Schema(description = "表单项的数组", example = "[]")
|
||||||
private List<String> formFields;
|
private List<String> formFields;
|
||||||
|
|
||||||
@Schema(description = "提交的表单值", example = "{\"name\": \"芋艿\"}")
|
@Schema(description = "提交的表单值", example = "{\"name\": \"ZT\"}")
|
||||||
private Map<String, Object> formVariables;
|
private Map<String, Object> formVariables;
|
||||||
|
|
||||||
@Schema(description = "任务负责人编号", example = "2048")
|
@Schema(description = "任务负责人编号", example = "2048")
|
||||||
@@ -103,7 +103,7 @@ public class BpmTaskRespDTO {
|
|||||||
@Schema(description = "流程实例编号", example = "1024")
|
@Schema(description = "流程实例编号", example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程实例名称", example = "芋道")
|
@Schema(description = "流程实例名称", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "提交时间")
|
@Schema(description = "提交时间")
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class UserSimpleDTO {
|
|||||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String nickname;
|
private String nickname;
|
||||||
|
|
||||||
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
|
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||||
|
|
||||||
ARG BASE_IMAGE=172.16.46.66:10043/base-service/skywalking-agent-jre:9.7.0
|
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||||
FROM ${BASE_IMAGE}
|
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /zt-module-bpm-server
|
RUN mkdir -p /zt-module-bpm-server
|
||||||
@@ -11,15 +10,10 @@ COPY ./target/zt-module-bpm-server.jar app.jar
|
|||||||
|
|
||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx512m"
|
||||||
ENV JAVA_OPTS="-Xms512m -Xmx512m"
|
|
||||||
ENV SW_AGENT_HOME=/opt/skywalking/agent
|
|
||||||
ENV SW_AGENT_NAME=zt-module-bpm-server
|
|
||||||
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES=172.16.46.63:30201
|
|
||||||
ENV AGENT_JAVA_OPTS="-javaagent:${SW_AGENT_HOME}/skywalking-agent.jar -Dskywalking.agent.service_name=${SW_AGENT_NAME} -Dskywalking.collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES}"
|
|
||||||
|
|
||||||
## 暴露后端项目的 48080 端口
|
## 暴露后端项目的 48080 端口
|
||||||
EXPOSE 48083
|
EXPOSE 48083
|
||||||
|
|
||||||
## 启动后端项目
|
## 启动后端项目
|
||||||
CMD java ${AGENT_JAVA_OPTS} ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
|
CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 服务保障相关 TODO 芋艿:暂时去掉 -->
|
<!-- 服务保障相关 TODO ZT:暂时去掉 -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>com.zt.plat</groupId>-->
|
<!-- <groupId>com.zt.plat</groupId>-->
|
||||||
<!-- <artifactId>zt-spring-boot-starter-protection</artifactId>-->
|
<!-- <artifactId>zt-spring-boot-starter-protection</artifactId>-->
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import jakarta.annotation.Resource;
|
|||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import org.flowable.engine.history.HistoricProcessInstance;
|
import org.flowable.engine.history.HistoricProcessInstance;
|
||||||
import org.flowable.engine.repository.ProcessDefinition;
|
import org.flowable.engine.repository.ProcessDefinition;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@@ -41,7 +40,7 @@ import static com.zt.plat.framework.web.core.util.WebFrameworkUtils.getLoginUser
|
|||||||
* @author jason
|
* @author jason
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@Validated
|
@Valid
|
||||||
public class BpmProcessInstanceApiImpl implements BpmProcessInstanceApi {
|
public class BpmProcessInstanceApiImpl implements BpmProcessInstanceApi {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public class UserSimpleBaseVO {
|
|||||||
|
|
||||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private Long id;
|
private Long id;
|
||||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String nickname;
|
private String nickname;
|
||||||
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
|
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class BpmModelController {
|
|||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@Operation(summary = "获得模型分页")
|
@Operation(summary = "获得模型分页")
|
||||||
@Parameter(name = "name", description = "模型名称", example = "芋艿")
|
@Parameter(name = "name", description = "模型名称", example = "ZT")
|
||||||
public CommonResult<List<BpmModelRespVO>> getModelList(@RequestParam(value = "name", required = false) String name) {
|
public CommonResult<List<BpmModelRespVO>> getModelList(@RequestParam(value = "name", required = false) String name) {
|
||||||
List<Model> list = modelService.getModelList(name);
|
List<Model> list = modelService.getModelList(name);
|
||||||
if (CollUtil.isEmpty(list)) {
|
if (CollUtil.isEmpty(list)) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class BpmFormPageReqVO extends PageParam {
|
public class BpmFormPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "表单名称", example = "芋道")
|
@Schema(description = "表单名称", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class BpmFormRespVO {
|
|||||||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
@NotNull(message = "表单名称不能为空")
|
@NotNull(message = "表单名称不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class BpmFormSaveReqVO {
|
|||||||
@Schema(description = "表单编号", example = "1024")
|
@Schema(description = "表单编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
@NotNull(message = "表单名称不能为空")
|
@NotNull(message = "表单名称不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class BpmUserGroupPageReqVO extends PageParam {
|
|||||||
@Schema(description = "编号", example = "1024")
|
@Schema(description = "编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "组名", example = "芋道")
|
@Schema(description = "组名", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "状态", example = "1")
|
@Schema(description = "状态", example = "1")
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ public class BpmUserGroupRespVO {
|
|||||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ public class BpmUserGroupSaveReqVO {
|
|||||||
@Schema(description = "编号", example = "1024")
|
@Schema(description = "编号", example = "1024")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
@NotNull(message = "组名不能为空")
|
@NotNull(message = "组名不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "描述", example = "芋道源码")
|
@Schema(description = "描述", example = "ZT源码")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ public class BpmModelMetaInfoVO {
|
|||||||
@NotNull(message = "是否可见不能为空")
|
@NotNull(message = "是否可见不能为空")
|
||||||
private Boolean visible;
|
private Boolean visible;
|
||||||
|
|
||||||
|
@Schema(description = "是否允许重新发起", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||||
|
@NotNull(message = "是否允许重新发起不能为空")
|
||||||
|
private Boolean restart;
|
||||||
|
|
||||||
@Schema(description = "可发起用户编号数组", example = "[1,2,3]")
|
@Schema(description = "可发起用户编号数组", example = "[1,2,3]")
|
||||||
private List<Long> startUserIds;
|
private List<Long> startUserIds;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
|||||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
|
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
|
||||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
|
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -20,7 +21,7 @@ public class BpmModelRespVO extends BpmModelMetaInfoVO {
|
|||||||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_zt")
|
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_zt")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程图标", example = "https://www.iocoder.cn/zt.jpg")
|
@Schema(description = "流程图标", example = "https://www.iocoder.cn/zt.jpg")
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSim
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 流程模型的保存 Request VO")
|
@Schema(description = "管理后台 - 流程模型的保存 Request VO")
|
||||||
@@ -17,7 +18,7 @@ public class BpmModelSaveReqVO extends BpmModelMetaInfoVO {
|
|||||||
@NotEmpty(message = "流程标识不能为空")
|
@NotEmpty(message = "流程标识不能为空")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
@NotEmpty(message = "流程名称不能为空")
|
@NotEmpty(message = "流程名称不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple;
|
package com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.zt.plat.framework.common.core.KeyValue;
|
import com.zt.plat.framework.common.core.KeyValue;
|
||||||
import com.zt.plat.framework.common.validation.InEnum;
|
import com.zt.plat.framework.common.validation.InEnum;
|
||||||
import com.zt.plat.module.bpm.enums.definition.*;
|
import com.zt.plat.module.bpm.enums.definition.*;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
|
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
@@ -35,7 +35,7 @@ public class BpmSimpleModelNodeVO {
|
|||||||
@Schema(description = "模型节点名称", example = "领导审批")
|
@Schema(description = "模型节点名称", example = "领导审批")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "节点展示内容", example = "指定成员: 芋道源码")
|
@Schema(description = "节点展示内容", example = "指定成员: ZT源码")
|
||||||
private String showText;
|
private String showText;
|
||||||
|
|
||||||
@Schema(description = "子节点")
|
@Schema(description = "子节点")
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class BpmProcessDefinitionRespVO extends BpmModelMetaInfoVO {
|
|||||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private Integer version;
|
private Integer version;
|
||||||
|
|
||||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "youdao")
|
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "youdao")
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class BpmOALeaveCreateReqVO {
|
|||||||
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
|
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读ZT源码")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
@Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
|
@Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class BpmOALeavePageReqVO extends PageParam {
|
|||||||
@Schema(description = "请假类型,参见 bpm_oa_type", example = "1")
|
@Schema(description = "请假类型,参见 bpm_oa_type", example = "1")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
@Schema(description = "原因,模糊匹配", example = "阅读芋道源码")
|
@Schema(description = "原因,模糊匹配", example = "阅读ZT源码")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class BpmOALeaveRespVO {
|
|||||||
@Schema(description = "请假类型,参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "请假类型,参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
|
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读ZT源码")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
@Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.bpm.controller.admin.task;
|
package com.zt.plat.module.bpm.controller.admin.task;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.zt.plat.framework.business.core.util.DeptUtil;
|
import com.zt.plat.framework.business.core.util.DeptUtil;
|
||||||
@@ -11,8 +12,10 @@ import com.zt.plat.module.bpm.controller.admin.task.vo.instance.*;
|
|||||||
import com.zt.plat.module.bpm.convert.task.BpmProcessInstanceConvert;
|
import com.zt.plat.module.bpm.convert.task.BpmProcessInstanceConvert;
|
||||||
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmCategoryDO;
|
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmCategoryDO;
|
||||||
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
|
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
|
||||||
|
import com.zt.plat.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO;
|
||||||
import com.zt.plat.module.bpm.service.definition.BpmCategoryService;
|
import com.zt.plat.module.bpm.service.definition.BpmCategoryService;
|
||||||
import com.zt.plat.module.bpm.service.definition.BpmProcessDefinitionService;
|
import com.zt.plat.module.bpm.service.definition.BpmProcessDefinitionService;
|
||||||
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceCopyService;
|
||||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||||
import com.zt.plat.module.bpm.service.task.BpmTaskService;
|
import com.zt.plat.module.bpm.service.task.BpmTaskService;
|
||||||
import com.zt.plat.module.system.api.dept.DeptApi;
|
import com.zt.plat.module.system.api.dept.DeptApi;
|
||||||
@@ -24,6 +27,8 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.collections4.list.SetUniqueList;
|
||||||
import org.flowable.engine.history.HistoricProcessInstance;
|
import org.flowable.engine.history.HistoricProcessInstance;
|
||||||
import org.flowable.engine.repository.ProcessDefinition;
|
import org.flowable.engine.repository.ProcessDefinition;
|
||||||
import org.flowable.task.api.Task;
|
import org.flowable.task.api.Task;
|
||||||
@@ -31,6 +36,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -53,6 +60,8 @@ public class BpmProcessInstanceController {
|
|||||||
private BpmProcessDefinitionService processDefinitionService;
|
private BpmProcessDefinitionService processDefinitionService;
|
||||||
@Resource
|
@Resource
|
||||||
private BpmCategoryService categoryService;
|
private BpmCategoryService categoryService;
|
||||||
|
@Resource
|
||||||
|
private BpmProcessInstanceCopyService processInstanceCopyService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private AdminUserApi adminUserApi;
|
private AdminUserApi adminUserApi;
|
||||||
@@ -181,6 +190,32 @@ public class BpmProcessInstanceController {
|
|||||||
return success(processInstanceService.getApprovalDetail(getLoginUserId(), reqVO));
|
return success(processInstanceService.getApprovalDetail(getLoginUserId(), reqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/copy-list-by-process-instance-id")
|
||||||
|
@Operation(summary = "根据流程实例编号获取抄送列表")
|
||||||
|
@Parameter(name = "id", description = "流程实例的编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
|
||||||
|
public CommonResult<List<BpmProcessInstanceCopyVO>> getCopyListByProcessInstanceId(@RequestParam("processInstanceId") String processInstanceId) {
|
||||||
|
List<BpmProcessInstanceCopyDO> copyDOList = processInstanceCopyService.getByProcessInstanceId(processInstanceId);
|
||||||
|
if (CollectionUtils.isEmpty(copyDOList)) {
|
||||||
|
return success(new ArrayList<>(0));
|
||||||
|
}
|
||||||
|
List<BpmProcessInstanceCopyVO> copyVOList = new ArrayList<>(copyDOList.size());
|
||||||
|
SetUniqueList<Long> userIdList = SetUniqueList.setUniqueList(new ArrayList<>());
|
||||||
|
for (BpmProcessInstanceCopyDO copyDO : copyDOList) {
|
||||||
|
BpmProcessInstanceCopyVO copyVO = new BpmProcessInstanceCopyVO();
|
||||||
|
BeanUtil.copyProperties(copyDO, copyVO);
|
||||||
|
copyVOList.add(copyVO);
|
||||||
|
userIdList.add(copyDO.getStartUserId());
|
||||||
|
userIdList.add(copyDO.getUserId());
|
||||||
|
}
|
||||||
|
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(userIdList);
|
||||||
|
for (BpmProcessInstanceCopyVO copyVO : copyVOList) {
|
||||||
|
copyVO.setStartUserName(userMap.get(copyVO.getStartUserId()).getNickname());
|
||||||
|
copyVO.setUserName(userMap.get(copyVO.getUserId()).getNickname());
|
||||||
|
}
|
||||||
|
return success(copyVOList);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/get-next-approval-nodes")
|
@GetMapping("/get-next-approval-nodes")
|
||||||
@Operation(summary = "获取下一个执行的流程节点")
|
@Operation(summary = "获取下一个执行的流程节点")
|
||||||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
|
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class BpmApprovalDetailReqVO {
|
|||||||
@Schema(description = "流程实例的编号", example = "1024")
|
@Schema(description = "流程实例的编号", example = "1024")
|
||||||
private String processInstanceId; // 使用场景:流程已发起时候传流程实例 ID
|
private String processInstanceId; // 使用场景:流程已发起时候传流程实例 ID
|
||||||
|
|
||||||
// TODO @芋艿:如果未来 BPMN 增加流程图,它没有发起人节点,会有问题。
|
// TODO @ZT:如果未来 BPMN 增加流程图,它没有发起人节点,会有问题。
|
||||||
@Schema(description = "流程活动编号", example = "StartUserNode")
|
@Schema(description = "流程活动编号", example = "StartUserNode")
|
||||||
private String activityId; // 用于获取表单权限。1)发起流程时,传“发起人节点” activityId 可获取发起人的表单权限;2)从抄送列表界面进来时,传抄送的 activityId 可获取抄送人的表单权限;
|
private String activityId; // 用于获取表单权限。1)发起流程时,传“发起人节点” activityId 可获取发起人的表单权限;2)从抄送列表界面进来时,传抄送的 activityId 可获取抄送人的表单权限;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.zt.plat.module.bpm.controller.admin.task.vo.instance;
|
package com.zt.plat.module.bpm.controller.admin.task.vo.instance;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
||||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
|
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
|
||||||
import com.zt.plat.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
|
import com.zt.plat.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class BpmProcessInstanceCopyPageReqVO extends PageParam {
|
public class BpmProcessInstanceCopyPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "流程名称", example = "芋道")
|
@Schema(description = "流程名称", example = "ZT")
|
||||||
private String processInstanceName;
|
private String processInstanceName;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.zt.plat.module.bpm.controller.admin.task.vo.instance;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程抄送 VO
|
||||||
|
*
|
||||||
|
* @author kr
|
||||||
|
* @since 2025-12-31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class BpmProcessInstanceCopyVO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起人 Id
|
||||||
|
*/
|
||||||
|
@Schema(description ="发起人 Id")
|
||||||
|
private Long startUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发起人 姓名
|
||||||
|
*/
|
||||||
|
@Schema(description ="发起人 姓名")
|
||||||
|
private String startUserName;
|
||||||
|
/**
|
||||||
|
* 流程名
|
||||||
|
*/
|
||||||
|
@Schema(description ="流程名")
|
||||||
|
private String processInstanceName;
|
||||||
|
/**
|
||||||
|
* 流程实例的编号
|
||||||
|
*/
|
||||||
|
@Schema(description ="流程实例的编号")
|
||||||
|
private String processInstanceId;
|
||||||
|
/**
|
||||||
|
* 流程实例的流程定义编号
|
||||||
|
*/
|
||||||
|
@Schema(description ="流程实例的流程定义编号")
|
||||||
|
private String processDefinitionId;
|
||||||
|
/**
|
||||||
|
* 流程分类
|
||||||
|
*/
|
||||||
|
@Schema(description ="流程分类")
|
||||||
|
private String category;
|
||||||
|
/**
|
||||||
|
* 流程活动的编号
|
||||||
|
*/
|
||||||
|
@Schema(description ="流程活动的编号")
|
||||||
|
private String activityId;
|
||||||
|
/**
|
||||||
|
* 流程活动的名字
|
||||||
|
*/
|
||||||
|
@Schema(description ="流程活动的名字")
|
||||||
|
private String activityName;
|
||||||
|
/**
|
||||||
|
* 流程活动的编号
|
||||||
|
*/
|
||||||
|
@Schema(description ="流程活动的编号")
|
||||||
|
private String taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户编号(被抄送的用户编号)
|
||||||
|
*/
|
||||||
|
@Schema(description ="用户编号(被抄送的用户编号)")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户姓名(被抄送的用户姓名)
|
||||||
|
*/
|
||||||
|
@Schema(description ="用户姓名(被抄送的用户姓名)")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抄送意见
|
||||||
|
*/
|
||||||
|
@Schema(description ="抄送意见")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
@Data
|
@Data
|
||||||
public class BpmProcessInstancePageReqVO extends PageParam {
|
public class BpmProcessInstancePageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "流程名称", example = "芋道")
|
@Schema(description = "流程名称", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程定义的标识", example = "2048")
|
@Schema(description = "流程定义的标识", example = "2048")
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.zt.plat.module.bpm.controller.admin.task.vo.instance;
|
package com.zt.plat.module.bpm.controller.admin.task.vo.instance;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.zt.plat.framework.common.core.KeyValue;
|
import com.zt.plat.framework.common.core.KeyValue;
|
||||||
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
||||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
|
import com.zt.plat.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ public class BpmProcessInstanceRespVO {
|
|||||||
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程摘要")
|
@Schema(description = "流程摘要")
|
||||||
@@ -71,7 +71,7 @@ public class BpmProcessInstanceRespVO {
|
|||||||
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "任务分配人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048")
|
@Schema(description = "任务分配人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "2048")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class BpmTaskPageReqVO extends PageParam {
|
public class BpmTaskPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "流程任务名", example = "芋道")
|
@Schema(description = "流程任务名", example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "流程分类", example = "1")
|
@Schema(description = "流程分类", example = "1")
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.zt.plat.module.bpm.controller.admin.task.vo.task;
|
package com.zt.plat.module.bpm.controller.admin.task.vo.task;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.zt.plat.framework.common.core.KeyValue;
|
import com.zt.plat.framework.common.core.KeyValue;
|
||||||
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
import com.zt.plat.module.bpm.controller.admin.base.user.UserSimpleBaseVO;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ public class BpmTaskRespVO {
|
|||||||
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@@ -97,7 +97,7 @@ public class BpmTaskRespVO {
|
|||||||
@Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
@Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
|||||||
@@ -87,9 +87,16 @@ public interface BpmProcessInstanceConvert {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 摘要
|
BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionInfoMap.get(respVO.getProcessDefinitionId());
|
||||||
respVO.setSummary(FlowableUtils.getSummary(processDefinitionInfoMap.get(respVO.getProcessDefinitionId()),
|
if (processDefinitionInfo != null) {
|
||||||
pageResult.getList().get(i).getProcessVariables()));
|
// 摘要
|
||||||
|
respVO.setSummary(FlowableUtils.getSummary(processDefinitionInfo,
|
||||||
|
pageResult.getList().get(i).getProcessVariables()));
|
||||||
|
// 是否可见
|
||||||
|
respVO.getProcessDefinition().setVisible(processDefinitionInfo.getVisible());
|
||||||
|
// 是否可以重新发起流程
|
||||||
|
respVO.getProcessDefinition().setRestart(processDefinitionInfo.getRestart());
|
||||||
|
}
|
||||||
// 表单
|
// 表单
|
||||||
respVO.setFormVariables(pageResult.getList().get(i).getProcessVariables());
|
respVO.setFormVariables(pageResult.getList().get(i).getProcessVariables());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
import com.zt.plat.framework.mybatis.core.type.LongListTypeHandler;
|
import com.zt.plat.framework.mybatis.core.type.LongListTypeHandler;
|
||||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.BpmModelMetaInfoVO;
|
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.BpmModelMetaInfoVO;
|
||||||
@@ -9,6 +7,8 @@ import com.zt.plat.module.bpm.enums.definition.BpmAutoApproveTypeEnum;
|
|||||||
import com.zt.plat.module.bpm.enums.definition.BpmModelFormTypeEnum;
|
import com.zt.plat.module.bpm.enums.definition.BpmModelFormTypeEnum;
|
||||||
import com.zt.plat.module.bpm.enums.definition.BpmModelTypeEnum;
|
import com.zt.plat.module.bpm.enums.definition.BpmModelTypeEnum;
|
||||||
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -129,6 +129,13 @@ public class BpmProcessDefinitionInfoDO extends BaseDO {
|
|||||||
* 目的:如果 false 不可见,则不展示在“发起流程”的列表里
|
* 目的:如果 false 不可见,则不展示在“发起流程”的列表里
|
||||||
*/
|
*/
|
||||||
private Boolean visible;
|
private Boolean visible;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否允许重新发起
|
||||||
|
*
|
||||||
|
* 目的:如果 false 则不可以重新发起流程
|
||||||
|
*/
|
||||||
|
private Boolean restart;
|
||||||
/**
|
/**
|
||||||
* 排序值
|
* 排序值
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.zt.plat.module.bpm.enums.definition.BpmProcessListenerTypeEnum;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
|
||||||
import com.zt.plat.module.bpm.enums.definition.BpmProcessListenerTypeEnum;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
package com.zt.plat.module.bpm.dal.dataobject.definition;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
|
||||||
import com.zt.plat.framework.common.enums.CommonStatusEnum;
|
import com.zt.plat.framework.common.enums.CommonStatusEnum;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.zt.plat.module.bpm.dal.dataobject.oa;
|
package com.zt.plat.module.bpm.dal.dataobject.oa;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.zt.plat.module.bpm.enums.task.BpmTaskStatusEnum;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
|
||||||
import com.zt.plat.module.bpm.enums.task.BpmTaskStatusEnum;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.zt.plat.module.bpm.dal.dataobject.task;
|
package com.zt.plat.module.bpm.dal.dataobject.task;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import com.zt.plat.module.bpm.controller.admin.task.vo.instance.BpmProcessInstan
|
|||||||
import com.zt.plat.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO;
|
import com.zt.plat.module.bpm.dal.dataobject.task.BpmProcessInstanceCopyDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface BpmProcessInstanceCopyMapper extends BaseMapperX<BpmProcessInstanceCopyDO> {
|
public interface BpmProcessInstanceCopyMapper extends BaseMapperX<BpmProcessInstanceCopyDO> {
|
||||||
|
|
||||||
@@ -22,4 +24,8 @@ public interface BpmProcessInstanceCopyMapper extends BaseMapperX<BpmProcessInst
|
|||||||
delete(BpmProcessInstanceCopyDO::getProcessInstanceId, processInstanceId);
|
delete(BpmProcessInstanceCopyDO::getProcessInstanceId, processInstanceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<BpmProcessInstanceCopyDO> getByProcessInstanceId(String processInstanceId) {
|
||||||
|
return selectList(BpmProcessInstanceCopyDO::getProcessInstanceId, processInstanceId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ import org.springframework.stereotype.Repository;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import static cn.hutool.core.date.DatePattern.PURE_DATETIME_PATTERN;
|
import static cn.hutool.core.date.DatePattern.*;
|
||||||
import static cn.hutool.core.date.DatePattern.PURE_DATE_PATTERN;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BPM 流程 Id 编码的 Redis DAO
|
* BPM 流程 Id 编码的 Redis DAO
|
||||||
|
|||||||
@@ -8,17 +8,25 @@ import com.zt.plat.module.bpm.framework.flowable.core.event.BpmProcessInstanceEv
|
|||||||
import com.zt.plat.module.system.api.user.AdminUserApi;
|
import com.zt.plat.module.system.api.user.AdminUserApi;
|
||||||
import org.flowable.common.engine.api.delegate.FlowableFunctionDelegate;
|
import org.flowable.common.engine.api.delegate.FlowableFunctionDelegate;
|
||||||
import org.flowable.common.engine.api.delegate.event.FlowableEventListener;
|
import org.flowable.common.engine.api.delegate.event.FlowableEventListener;
|
||||||
|
import org.flowable.engine.ProcessEngineConfiguration;
|
||||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||||
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.ObjectProvider;
|
import org.springframework.beans.factory.ObjectProvider;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.task.AsyncListenableTaskExecutor;
|
import org.springframework.core.task.AsyncListenableTaskExecutor;
|
||||||
|
import org.springframework.jdbc.datasource.DataSourceUtils;
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DatabaseMetaData;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BPM 模块的 Flowable 配置类
|
* BPM 模块的 Flowable 配置类
|
||||||
@@ -28,6 +36,8 @@ import java.util.List;
|
|||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class BpmFlowableConfiguration {
|
public class BpmFlowableConfiguration {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(BpmFlowableConfiguration.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean
|
* 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean
|
||||||
*
|
*
|
||||||
@@ -69,6 +79,37 @@ public class BpmFlowableConfiguration {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public EngineConfigurationConfigurer<SpringProcessEngineConfiguration> dmProcessEngineConfigurationConfigurer(DataSource dataSource) {
|
||||||
|
return configuration -> {
|
||||||
|
try {
|
||||||
|
configureDmCompatibility(configuration, dataSource);
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
log.warn("Failed to inspect datasource for DM compatibility; Flowable will keep default settings", ex);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configureDmCompatibility(SpringProcessEngineConfiguration configuration, DataSource dataSource) throws SQLException {
|
||||||
|
Connection connection = null;
|
||||||
|
try {
|
||||||
|
connection = DataSourceUtils.getConnection(dataSource);
|
||||||
|
DatabaseMetaData metaData = connection.getMetaData();
|
||||||
|
String productName = metaData.getDatabaseProductName();
|
||||||
|
String jdbcUrl = metaData.getURL();
|
||||||
|
boolean dmProduct = productName != null && productName.toLowerCase().contains("dm");
|
||||||
|
boolean dmUrl = jdbcUrl != null && jdbcUrl.toLowerCase().startsWith("jdbc:dm");
|
||||||
|
if (!dmProduct && !dmUrl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
log.info("Detected DM database (product='{}'); enabling Flowable Oracle compatibility with automatic schema updates", productName);
|
||||||
|
configuration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
|
||||||
|
configuration.setDatabaseType("oracle");
|
||||||
|
} finally {
|
||||||
|
DataSourceUtils.releaseConnection(connection, dataSource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// =========== 审批人相关的 Bean ==========
|
// =========== 审批人相关的 Bean ==========
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import cn.hutool.core.lang.Assert;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
|
||||||
import com.zt.plat.framework.common.enums.CommonStatusEnum;
|
import com.zt.plat.framework.common.enums.CommonStatusEnum;
|
||||||
import com.zt.plat.framework.common.util.object.ObjectUtils;
|
import com.zt.plat.framework.common.util.object.ObjectUtils;
|
||||||
import com.zt.plat.framework.datapermission.core.annotation.DataPermission;
|
import com.zt.plat.framework.datapermission.core.annotation.DataPermission;
|
||||||
@@ -17,6 +16,7 @@ import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
|
|||||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||||
import com.zt.plat.module.system.api.user.AdminUserApi;
|
import com.zt.plat.module.system.api.user.AdminUserApi;
|
||||||
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.bpmn.model.BpmnModel;
|
import org.flowable.bpmn.model.BpmnModel;
|
||||||
import org.flowable.bpmn.model.CallActivity;
|
import org.flowable.bpmn.model.CallActivity;
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ package com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.dept;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.user.BpmTaskCandidateUserStrategy;
|
import com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.user.BpmTaskCandidateUserStrategy;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
|
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
|
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
|
||||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.flowable.bpmn.model.BpmnModel;
|
import org.flowable.bpmn.model.BpmnModel;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.engine.delegate.DelegateExecution;
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ package com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.dept;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.user.BpmTaskCandidateUserStrategy;
|
import com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.user.BpmTaskCandidateUserStrategy;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
|
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
|
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
|
||||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.flowable.bpmn.model.BpmnModel;
|
import org.flowable.bpmn.model.BpmnModel;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.engine.delegate.DelegateExecution;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.other;
|
package com.zt.plat.module.bpm.framework.flowable.core.candidate.strategy.other;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import com.zt.plat.framework.common.util.collection.CollectionUtils;
|
import com.zt.plat.framework.common.util.collection.CollectionUtils;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy;
|
import com.zt.plat.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
|
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
|
import com.zt.plat.module.bpm.framework.flowable.core.util.FlowableUtils;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.bpmn.model.BpmnModel;
|
import org.flowable.bpmn.model.BpmnModel;
|
||||||
import org.flowable.common.engine.api.FlowableException;
|
import org.flowable.common.engine.api.FlowableException;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.zt.plat.module.bpm.framework.flowable.core.listener;
|
package com.zt.plat.module.bpm.framework.flowable.core.listener;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent;
|
import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent;
|
||||||
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
|
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ package com.zt.plat.module.bpm.framework.flowable.core.listener;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.zt.plat.framework.common.util.number.NumberUtils;
|
import com.zt.plat.framework.common.util.number.NumberUtils;
|
||||||
import com.zt.plat.module.bpm.enums.definition.BpmBoundaryEventTypeEnum;
|
import com.zt.plat.module.bpm.enums.definition.BpmBoundaryEventTypeEnum;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmnModelConstants;
|
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmnModelConstants;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils;
|
import com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils;
|
||||||
import com.zt.plat.module.bpm.service.definition.BpmModelService;
|
import com.zt.plat.module.bpm.service.definition.BpmModelService;
|
||||||
import com.zt.plat.module.bpm.service.task.BpmTaskService;
|
import com.zt.plat.module.bpm.service.task.BpmTaskService;
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.bpmn.model.BoundaryEvent;
|
import org.flowable.bpmn.model.BoundaryEvent;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.zt.plat.module.bpm.framework.flowable.core.util;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.zt.plat.framework.common.core.KeyValue;
|
import com.zt.plat.framework.common.core.KeyValue;
|
||||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
import com.zt.plat.framework.common.util.json.JsonUtils;
|
import com.zt.plat.framework.common.util.json.JsonUtils;
|
||||||
@@ -10,6 +9,7 @@ import com.zt.plat.framework.common.util.spring.SpringUtils;
|
|||||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
|
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
|
||||||
import com.zt.plat.module.bpm.enums.definition.BpmHttpRequestParamTypeEnum;
|
import com.zt.plat.module.bpm.enums.definition.BpmHttpRequestParamTypeEnum;
|
||||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.engine.runtime.ProcessInstance;
|
import org.flowable.engine.runtime.ProcessInstance;
|
||||||
import org.springframework.http.HttpEntity;
|
import org.springframework.http.HttpEntity;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import cn.hutool.core.map.MapUtil;
|
|||||||
import cn.hutool.core.util.ArrayUtil;
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import cn.hutool.core.util.ObjUtil;
|
import cn.hutool.core.util.ObjUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
import com.zt.plat.framework.common.util.collection.CollectionUtils;
|
import com.zt.plat.framework.common.util.collection.CollectionUtils;
|
||||||
import com.zt.plat.framework.common.util.json.JsonUtils;
|
import com.zt.plat.framework.common.util.json.JsonUtils;
|
||||||
import com.zt.plat.framework.common.util.number.NumberUtils;
|
import com.zt.plat.framework.common.util.number.NumberUtils;
|
||||||
@@ -16,10 +15,11 @@ import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSim
|
|||||||
import com.zt.plat.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
|
import com.zt.plat.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
|
||||||
import com.zt.plat.module.bpm.enums.definition.*;
|
import com.zt.plat.module.bpm.enums.definition.*;
|
||||||
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmnModelConstants;
|
import com.zt.plat.module.bpm.framework.flowable.core.enums.BpmnModelConstants;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.bpmn.converter.BpmnXMLConverter;
|
import org.flowable.bpmn.converter.BpmnXMLConverter;
|
||||||
import org.flowable.bpmn.model.*;
|
|
||||||
import org.flowable.bpmn.model.Process;
|
import org.flowable.bpmn.model.Process;
|
||||||
|
import org.flowable.bpmn.model.*;
|
||||||
import org.flowable.common.engine.api.FlowableException;
|
import org.flowable.common.engine.api.FlowableException;
|
||||||
import org.flowable.common.engine.impl.util.io.BytesStreamSource;
|
import org.flowable.common.engine.impl.util.io.BytesStreamSource;
|
||||||
import org.flowable.engine.impl.el.FixedValue;
|
import org.flowable.engine.impl.el.FixedValue;
|
||||||
@@ -123,7 +123,7 @@ public class BpmnModelUtils {
|
|||||||
public static Integer parseCandidateStrategy(FlowElement userTask) {
|
public static Integer parseCandidateStrategy(FlowElement userTask) {
|
||||||
Integer candidateStrategy = NumberUtils.parseInt(userTask.getAttributeValue(
|
Integer candidateStrategy = NumberUtils.parseInt(userTask.getAttributeValue(
|
||||||
BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY));
|
BpmnModelConstants.NAMESPACE, BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY));
|
||||||
// TODO @芋艿 尝试从 ExtensionElement 取. 后续相关扩展是否都可以 存 extensionElement。 如表单权限。 按钮权限
|
// TODO @ZT 尝试从 ExtensionElement 取. 后续相关扩展是否都可以 存 extensionElement。 如表单权限。 按钮权限
|
||||||
if (candidateStrategy == null) {
|
if (candidateStrategy == null) {
|
||||||
ExtensionElement element = CollUtil.getFirst(userTask.getExtensionElements().get(BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY));
|
ExtensionElement element = CollUtil.getFirst(userTask.getExtensionElements().get(BpmnModelConstants.USER_TASK_CANDIDATE_STRATEGY));
|
||||||
candidateStrategy = element != null ? NumberUtils.parseInt(element.getElementText()) : null;
|
candidateStrategy = element != null ? NumberUtils.parseInt(element.getElementText()) : null;
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import com.zt.plat.module.bpm.service.task.listener.BpmCallActivityListener;
|
|||||||
import com.zt.plat.module.bpm.service.task.listener.BpmUserTaskListener;
|
import com.zt.plat.module.bpm.service.task.listener.BpmUserTaskListener;
|
||||||
import org.flowable.bpmn.BpmnAutoLayout;
|
import org.flowable.bpmn.BpmnAutoLayout;
|
||||||
import org.flowable.bpmn.constants.BpmnXMLConstants;
|
import org.flowable.bpmn.constants.BpmnXMLConstants;
|
||||||
import org.flowable.bpmn.model.*;
|
|
||||||
import org.flowable.bpmn.model.Process;
|
import org.flowable.bpmn.model.Process;
|
||||||
|
import org.flowable.bpmn.model.*;
|
||||||
import org.flowable.engine.delegate.ExecutionListener;
|
import org.flowable.engine.delegate.ExecutionListener;
|
||||||
import org.flowable.engine.delegate.TaskListener;
|
import org.flowable.engine.delegate.TaskListener;
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ public class SimpleModelUtils {
|
|||||||
BpmSimpleModelNodeTypeEnum nodeType = BpmSimpleModelNodeTypeEnum.valueOf(node.getType());
|
BpmSimpleModelNodeTypeEnum nodeType = BpmSimpleModelNodeTypeEnum.valueOf(node.getType());
|
||||||
BpmSimpleModelNodeVO childNode = node.getChildNode();
|
BpmSimpleModelNodeVO childNode = node.getChildNode();
|
||||||
List<BpmSimpleModelNodeVO> conditionNodes = node.getConditionNodes();
|
List<BpmSimpleModelNodeVO> conditionNodes = node.getConditionNodes();
|
||||||
// TODO @芋艿 路由分支没有conditionNodes 这里注释会影响吗?@jason:一起帮忙瞅瞅!
|
// TODO @ZT 路由分支没有conditionNodes 这里注释会影响吗?@jason:一起帮忙瞅瞅!
|
||||||
// Assert.notEmpty(conditionNodes, "分支节点的条件节点不能为空");
|
// Assert.notEmpty(conditionNodes, "分支节点的条件节点不能为空");
|
||||||
// 分支终点节点 ID
|
// 分支终点节点 ID
|
||||||
String branchEndNodeId = null;
|
String branchEndNodeId = null;
|
||||||
@@ -277,8 +277,8 @@ public class SimpleModelUtils {
|
|||||||
String conditionExpression) {
|
String conditionExpression) {
|
||||||
Assert.notEmpty(sourceId, "sourceId 不能为空");
|
Assert.notEmpty(sourceId, "sourceId 不能为空");
|
||||||
Assert.notEmpty(targetId, "targetId 不能为空");
|
Assert.notEmpty(targetId, "targetId 不能为空");
|
||||||
// TODO @jason:如果 sequenceFlowId 不存在的时候,是不是要生成一个默认的 sequenceFlowId? @芋艿: 貌似不需要,Flowable 会默认生成;TODO @jason:建议还是搞一个,主要是后续好排查问题。
|
// TODO @jason:如果 sequenceFlowId 不存在的时候,是不是要生成一个默认的 sequenceFlowId? @ZT: 貌似不需要,Flowable 会默认生成;TODO @jason:建议还是搞一个,主要是后续好排查问题。
|
||||||
// TODO @jason:如果 name 不存在的时候,是不是要生成一个默认的 name? @芋艿: 不需要生成默认的吧? 这个会在流程图展示的, 一般用户填写的。不好生成默认的吧;TODO @jason:建议还是搞一个,主要是后续好排查问题。
|
// TODO @jason:如果 name 不存在的时候,是不是要生成一个默认的 name? @ZT: 不需要生成默认的吧? 这个会在流程图展示的, 一般用户填写的。不好生成默认的吧;TODO @jason:建议还是搞一个,主要是后续好排查问题。
|
||||||
SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId);
|
SequenceFlow sequenceFlow = new SequenceFlow(sourceId, targetId);
|
||||||
if (StrUtil.isNotEmpty(sequenceFlowId)) {
|
if (StrUtil.isNotEmpty(sequenceFlowId)) {
|
||||||
sequenceFlow.setId(sequenceFlowId);
|
sequenceFlow.setId(sequenceFlowId);
|
||||||
@@ -341,7 +341,7 @@ public class SimpleModelUtils {
|
|||||||
EndEvent endEvent = new EndEvent();
|
EndEvent endEvent = new EndEvent();
|
||||||
endEvent.setId(node.getId());
|
endEvent.setId(node.getId());
|
||||||
endEvent.setName(node.getName());
|
endEvent.setName(node.getName());
|
||||||
// TODO @芋艿 + jason:要不要加一个终止定义?
|
// TODO @ZT + jason:要不要加一个终止定义?
|
||||||
return endEvent;
|
return endEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,7 +369,7 @@ public class SimpleModelUtils {
|
|||||||
// 添加操作按钮配置属性元素
|
// 添加操作按钮配置属性元素
|
||||||
addButtonsSetting(node.getButtonsSetting(), userTask);
|
addButtonsSetting(node.getButtonsSetting(), userTask);
|
||||||
// 使用自动通过策略
|
// 使用自动通过策略
|
||||||
// TODO @芋艿 复用了SKIP, 是否需要新加一个策略;TODO @芋艿:【回复】是不是应该类似飞书,搞个草稿状态。待定;还有一种策略,不标记自动通过,而是首次发起后,第一个节点,自动通过;
|
// TODO @ZT 复用了SKIP, 是否需要新加一个策略;TODO @ZT:【回复】是不是应该类似飞书,搞个草稿状态。待定;还有一种策略,不标记自动通过,而是首次发起后,第一个节点,自动通过;
|
||||||
addAssignStartUserHandlerType(BpmUserTaskAssignStartUserHandlerTypeEnum.SKIP.getType(), userTask);
|
addAssignStartUserHandlerType(BpmUserTaskAssignStartUserHandlerTypeEnum.SKIP.getType(), userTask);
|
||||||
return userTask;
|
return userTask;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class SecurityConfiguration {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
|
public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
|
||||||
// TODO 芋艿:这个每个项目都需要重复配置,得捉摸有没通用的方案
|
// TODO ZT:这个每个项目都需要重复配置,得捉摸有没通用的方案
|
||||||
// Swagger 接口文档
|
// Swagger 接口文档
|
||||||
registry.requestMatchers("/v3/api-docs/**").permitAll()
|
registry.requestMatchers("/v3/api-docs/**").permitAll()
|
||||||
.requestMatchers("/webjars/**").permitAll()
|
.requestMatchers("/webjars/**").permitAll()
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.zt.plat.module.bpm.framework.web.config;
|
package com.zt.plat.module.bpm.framework.web.config;
|
||||||
|
|
||||||
import com.zt.plat.framework.common.enums.WebFilterOrderEnum;
|
import com.zt.plat.framework.common.enums.WebFilterOrderEnum;
|
||||||
|
import com.zt.plat.framework.swagger.config.ZtSwaggerAutoConfiguration;
|
||||||
import com.zt.plat.module.bpm.framework.web.core.FlowableWebFilter;
|
import com.zt.plat.module.bpm.framework.web.core.FlowableWebFilter;
|
||||||
|
import org.springdoc.core.models.GroupedOpenApi;
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class BpmFormServiceImpl implements BpmFormService {
|
|||||||
* @param fields field 数组
|
* @param fields field 数组
|
||||||
*/
|
*/
|
||||||
private void validateFields(List<String> fields) {
|
private void validateFields(List<String> fields) {
|
||||||
if (true) { // TODO 芋艿:兼容 Vue3 工作流:因为采用了新的表单设计器,所以暂时不校验
|
if (true) { // TODO ZT:兼容 Vue3 工作流:因为采用了新的表单设计器,所以暂时不校验
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Map<String, String> fieldMap = new HashMap<>(); // key 是 vModel,value 是 label
|
Map<String, String> fieldMap = new HashMap<>(); // key 是 vModel,value 是 label
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ import com.zt.plat.module.bpm.service.task.BpmProcessInstanceCopyService;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.bpmn.model.BpmnModel;
|
import org.flowable.bpmn.model.*;
|
||||||
import org.flowable.bpmn.model.StartEvent;
|
|
||||||
import org.flowable.bpmn.model.UserTask;
|
|
||||||
import org.flowable.common.engine.impl.db.SuspensionState;
|
import org.flowable.common.engine.impl.db.SuspensionState;
|
||||||
import org.flowable.engine.HistoryService;
|
import org.flowable.engine.HistoryService;
|
||||||
import org.flowable.engine.RepositoryService;
|
import org.flowable.engine.RepositoryService;
|
||||||
@@ -42,9 +40,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertMap;
|
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertMap;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import jakarta.validation.Valid;
|
|||||||
/**
|
/**
|
||||||
* BPM 消息 Service 接口
|
* BPM 消息 Service 接口
|
||||||
*
|
*
|
||||||
* TODO 芋艿:未来支持消息的可配置;不同的流程,在什么场景下,需要发送什么消息,消息的内容是什么;
|
* TODO ZT:未来支持消息的可配置;不同的流程,在什么场景下,需要发送什么消息,消息的内容是什么;
|
||||||
*
|
*
|
||||||
* @author ZT
|
* @author ZT
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,9 +10,11 @@ import jakarta.annotation.Resource;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.bpmn.model.FieldExtension;
|
import org.flowable.bpmn.model.FieldExtension;
|
||||||
import org.flowable.bpmn.model.FlowableListener;
|
import org.flowable.bpmn.model.FlowableListener;
|
||||||
|
import org.flowable.engine.HistoryService;
|
||||||
import org.flowable.engine.RuntimeService;
|
import org.flowable.engine.RuntimeService;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.engine.delegate.DelegateExecution;
|
||||||
import org.flowable.engine.delegate.JavaDelegate;
|
import org.flowable.engine.delegate.JavaDelegate;
|
||||||
|
import org.flowable.engine.history.HistoricActivityInstance;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -33,14 +35,28 @@ public class QmsExecutionListener implements JavaDelegate {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private QmsApi qmsApi;
|
private QmsApi qmsApi;
|
||||||
@Resource private RuntimeService runtimeService;
|
@Resource private RuntimeService runtimeService;
|
||||||
|
@Resource private HistoryService historyService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void execute(DelegateExecution execution) {
|
public void execute(DelegateExecution execution) {
|
||||||
log.info("[QmsExecutionListener][execution({}) 被调用!变量有:{}]", execution.getId(), execution.getCurrentFlowableListener().getFieldExtensions());
|
// log.info("[QmsExecutionListener][execution({}) 被调用!变量有:{}]", execution.getId(), execution.getCurrentFlowableListener().getFieldExtensions());
|
||||||
Map<String, Object> variables = execution.getVariables();
|
|
||||||
JSONObject jsonObject = new JSONObject(variables);
|
|
||||||
String insId = execution.getProcessInstanceId();
|
String insId = execution.getProcessInstanceId();
|
||||||
|
Map<String, Object> variables = execution.getVariables();
|
||||||
|
String activityId = execution.getCurrentActivityId();
|
||||||
|
|
||||||
|
List<HistoricActivityInstance> instances = historyService.createHistoricActivityInstanceQuery()
|
||||||
|
.processInstanceId(insId)
|
||||||
|
.activityId(activityId)
|
||||||
|
.orderByHistoricActivityInstanceStartTime().desc()
|
||||||
|
.list();
|
||||||
|
String currentActivityInsId = "";
|
||||||
|
if(instances != null && !instances.isEmpty())
|
||||||
|
currentActivityInsId = instances.get(0).getId();
|
||||||
|
variables.put("currentActivityInsId", currentActivityInsId);
|
||||||
|
variables.put("processInstanceId", insId);
|
||||||
|
JSONObject jsonObject = new JSONObject(variables);
|
||||||
|
// log.error("============[QmsExecutionListener][execution({})] 参数有:{}", execution.getId(), JSONObject.toJSONString(variables));
|
||||||
String businessKey = execution.getProcessInstanceBusinessKey();
|
String businessKey = execution.getProcessInstanceBusinessKey();
|
||||||
FlowableListener listener = execution.getCurrentFlowableListener();
|
FlowableListener listener = execution.getCurrentFlowableListener();
|
||||||
List<FieldExtension> fieldExtensions = listener.getFieldExtensions(); //节点执行监听里配置的扩展字段
|
List<FieldExtension> fieldExtensions = listener.getFieldExtensions(); //节点执行监听里配置的扩展字段
|
||||||
|
|||||||
@@ -5,13 +5,18 @@ import com.zt.plat.framework.common.pojo.CommonResult;
|
|||||||
import com.zt.plat.module.qms.api.task.QmsApi;
|
import com.zt.plat.module.qms.api.task.QmsApi;
|
||||||
import com.zt.plat.module.qms.api.task.dto.QmsBpmDTO;
|
import com.zt.plat.module.qms.api.task.dto.QmsBpmDTO;
|
||||||
import com.zt.plat.module.qms.enums.ErrorCodeConstants;
|
import com.zt.plat.module.qms.enums.ErrorCodeConstants;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.flowable.engine.HistoryService;
|
||||||
|
import org.flowable.engine.RuntimeService;
|
||||||
import org.flowable.engine.delegate.TaskListener;
|
import org.flowable.engine.delegate.TaskListener;
|
||||||
|
import org.flowable.engine.history.HistoricActivityInstance;
|
||||||
import org.flowable.task.service.delegate.DelegateTask;
|
import org.flowable.task.service.delegate.DelegateTask;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
||||||
@@ -23,21 +28,53 @@ import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.e
|
|||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class QmsTaskListener implements TaskListener {
|
public class QmsTaskListener implements TaskListener {
|
||||||
@Autowired
|
@Autowired private QmsApi qmsApi;
|
||||||
private QmsApi qmsApi;
|
@Resource private RuntimeService runtimeService;
|
||||||
|
@Resource private HistoryService historyService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void notify(DelegateTask delegateTask) {
|
public void notify(DelegateTask delegateTask) {
|
||||||
log.info("[QmsTaskListener][delegateTask({})]", delegateTask);
|
// log.info("[QmsTaskListener][delegateTask({})]", delegateTask);
|
||||||
String state = delegateTask.getState();
|
String state = delegateTask.getState();
|
||||||
Map<String, Object> variables = delegateTask.getVariables();
|
Map<String, Object> variables = delegateTask.getVariables();
|
||||||
|
String processInsId = delegateTask.getProcessInstanceId();
|
||||||
|
String activityId = delegateTask.getTaskDefinitionKey();
|
||||||
|
String currentActivityInsId = "";
|
||||||
|
List<HistoricActivityInstance> instances = historyService.createHistoricActivityInstanceQuery()
|
||||||
|
.processInstanceId(processInsId)
|
||||||
|
.activityId(activityId)
|
||||||
|
.orderByHistoricActivityInstanceStartTime().desc()
|
||||||
|
.list();
|
||||||
|
if(instances != null && !instances.isEmpty())
|
||||||
|
currentActivityInsId = instances.get(0).getId();
|
||||||
|
variables.put("currentActivityInsId", currentActivityInsId);
|
||||||
|
variables.put("processInstanceId", processInsId);
|
||||||
|
|
||||||
|
String rejectToFirstActivity = checkFirstActivityReject(activityId, instances);
|
||||||
|
|
||||||
|
//todo 判断退回
|
||||||
|
Map<String, Object> execVariables = runtimeService.getVariables(delegateTask.getExecutionId());
|
||||||
|
variables.put("rejectToFirstActivity", rejectToFirstActivity);
|
||||||
|
// log.error("================[QmsTaskListener][delegateTask({})] 参数有:{}", delegateTask.getId(), JSONObject.toJSONString(variables));
|
||||||
JSONObject jsonObject = new JSONObject(variables);
|
JSONObject jsonObject = new JSONObject(variables);
|
||||||
String insId = delegateTask.getProcessInstanceId();
|
QmsBpmDTO qmsBpmDTO = new QmsBpmDTO(processInsId, "", jsonObject, state);
|
||||||
QmsBpmDTO qmsBpmDTO = new QmsBpmDTO(insId, "", jsonObject, state);
|
|
||||||
CommonResult<JSONObject> result = qmsApi.bpmCallback(qmsBpmDTO);
|
CommonResult<JSONObject> result = qmsApi.bpmCallback(qmsBpmDTO);
|
||||||
if (!result.isSuccess()) {
|
if (!result.isSuccess()) {
|
||||||
log.error("[QmsExecutionListener][execution({}) 回调失败!错误码:{},错误信息:{}]", delegateTask.getId(), result.getCode(), result.getMsg());
|
log.error("[QmsExecutionListener][execution({}) 回调失败!错误码:{},错误信息:{}]", delegateTask.getId(), result.getCode(), result.getMsg());
|
||||||
throw exception0(ErrorCodeConstants.ERROR_CODE_MODULE_QMS_BPM, result.getMsg());
|
throw exception0(ErrorCodeConstants.ERROR_CODE_MODULE_QMS_BPM, result.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 判断是否退回发起节点
|
||||||
|
* */
|
||||||
|
private String checkFirstActivityReject(String activityId, List<HistoricActivityInstance> instances){
|
||||||
|
if(!activityId.contains("001"))
|
||||||
|
return "0";
|
||||||
|
if(instances == null || instances.isEmpty())
|
||||||
|
return "0";
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import jakarta.validation.constraints.NotEmpty;
|
|||||||
import org.flowable.bpmn.model.FlowNode;
|
import org.flowable.bpmn.model.FlowNode;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程抄送 Service 接口
|
* 流程抄送 Service 接口
|
||||||
@@ -57,4 +58,12 @@ public interface BpmProcessInstanceCopyService {
|
|||||||
*/
|
*/
|
||||||
void deleteProcessInstanceCopy(String processInstanceId);
|
void deleteProcessInstanceCopy(String processInstanceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得流程的抄送列表
|
||||||
|
*
|
||||||
|
* @param processInstanceId 流程实例 ID
|
||||||
|
* @return 抄送流程列表
|
||||||
|
*/
|
||||||
|
List<BpmProcessInstanceCopyDO> getByProcessInstanceId(String processInstanceId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,4 +93,9 @@ public class BpmProcessInstanceCopyServiceImpl implements BpmProcessInstanceCopy
|
|||||||
processInstanceCopyMapper.deleteByProcessInstanceId(processInstanceId);
|
processInstanceCopyMapper.deleteByProcessInstanceId(processInstanceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BpmProcessInstanceCopyDO> getByProcessInstanceId(String processInstanceId) {
|
||||||
|
return processInstanceCopyMapper.getByProcessInstanceId(processInstanceId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
|||||||
for (HistoricActivityInstance activity : taskActivities) {
|
for (HistoricActivityInstance activity : taskActivities) {
|
||||||
HistoricTaskInstance task = taskMap.get(activity.getTaskId());
|
HistoricTaskInstance task = taskMap.get(activity.getTaskId());
|
||||||
// 特殊情况:子流程节点 ChildProcess 仅存在于 activity 中,并且没有自身的 task,需要跳过执行
|
// 特殊情况:子流程节点 ChildProcess 仅存在于 activity 中,并且没有自身的 task,需要跳过执行
|
||||||
// TODO @芋艿:后续看看怎么优化!
|
// TODO @ZT:后续看看怎么优化!
|
||||||
if (task == null) {
|
if (task == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -535,7 +535,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
|||||||
BpmProcessDefinitionInfoDO processDefinitionInfo,
|
BpmProcessDefinitionInfoDO processDefinitionInfo,
|
||||||
Map<String, Object> processVariables,
|
Map<String, Object> processVariables,
|
||||||
List<HistoricActivityInstance> activities) {
|
List<HistoricActivityInstance> activities) {
|
||||||
// TODO @芋艿:【可优化】在驳回场景下,未来的预测准确性不高。原因是,驳回后,HistoricActivityInstance
|
// TODO @ZT:【可优化】在驳回场景下,未来的预测准确性不高。原因是,驳回后,HistoricActivityInstance
|
||||||
// 包括了历史的操作,不是只有 startEvent 到当前节点的记录
|
// 包括了历史的操作,不是只有 startEvent 到当前节点的记录
|
||||||
Set<String> runActivityIds = convertSet(activities, HistoricActivityInstance::getActivityId);
|
Set<String> runActivityIds = convertSet(activities, HistoricActivityInstance::getActivityId);
|
||||||
// 情况一:BPMN 设计器
|
// 情况一:BPMN 设计器
|
||||||
@@ -558,7 +558,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
|||||||
private ActivityNode buildNotRunApproveNodeForSimple(Long startUserId, BpmnModel bpmnModel,
|
private ActivityNode buildNotRunApproveNodeForSimple(Long startUserId, BpmnModel bpmnModel,
|
||||||
BpmProcessDefinitionInfoDO processDefinitionInfo, Map<String, Object> processVariables,
|
BpmProcessDefinitionInfoDO processDefinitionInfo, Map<String, Object> processVariables,
|
||||||
BpmSimpleModelNodeVO node, Set<String> runActivityIds) {
|
BpmSimpleModelNodeVO node, Set<String> runActivityIds) {
|
||||||
// TODO @芋艿:【可优化】在驳回场景下,未来的预测准确性不高。原因是,驳回后,HistoricActivityInstance
|
// TODO @ZT:【可优化】在驳回场景下,未来的预测准确性不高。原因是,驳回后,HistoricActivityInstance
|
||||||
// 包括了历史的操作,不是只有 startEvent 到当前节点的记录
|
// 包括了历史的操作,不是只有 startEvent 到当前节点的记录
|
||||||
if (runActivityIds.contains(node.getId())) {
|
if (runActivityIds.contains(node.getId())) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -1008,7 +1008,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||||||
.changeState();
|
.changeState();
|
||||||
|
|
||||||
// 3. 特殊:如果跳转到 EndEvent 流程还未结束, 执行 deleteProcessInstance 方法
|
// 3. 特殊:如果跳转到 EndEvent 流程还未结束, 执行 deleteProcessInstance 方法
|
||||||
// TODO 芋艿:目前发现并行分支情况下,会存在这个情况,后续看看有没更好的方案;
|
// TODO ZT:目前发现并行分支情况下,会存在这个情况,后续看看有没更好的方案;
|
||||||
List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstanceId).list();
|
List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstanceId).list();
|
||||||
if (CollUtil.isNotEmpty(executions)) {
|
if (CollUtil.isNotEmpty(executions)) {
|
||||||
log.warn("[moveTaskToEnd][执行跳转到 EndEvent 后, 流程实例未结束,强制执行 deleteProcessInstance 方法]");
|
log.warn("[moveTaskToEnd][执行跳转到 EndEvent 后, 流程实例未结束,强制执行 deleteProcessInstance 方法]");
|
||||||
@@ -1331,7 +1331,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自动去重,通过自动审批的方式 TODO @芋艿 驳回的情况得考虑一下;@lesan:驳回后,又自动审批么?
|
// 自动去重,通过自动审批的方式 TODO @ZT 驳回的情况得考虑一下;@lesan:驳回后,又自动审批么?
|
||||||
BpmProcessDefinitionInfoDO processDefinitionInfo = bpmProcessDefinitionService.getProcessDefinitionInfo(task.getProcessDefinitionId());
|
BpmProcessDefinitionInfoDO processDefinitionInfo = bpmProcessDefinitionService.getProcessDefinitionInfo(task.getProcessDefinitionId());
|
||||||
if (processDefinitionInfo == null) {
|
if (processDefinitionInfo == null) {
|
||||||
log.error("[processTaskAssigned][taskId({}) 没有找到流程定义({})]", task.getId(), task.getProcessDefinitionId());
|
log.error("[processTaskAssigned][taskId({}) 没有找到流程定义({})]", task.getId(), task.getProcessDefinitionId());
|
||||||
@@ -1374,7 +1374,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||||||
}
|
}
|
||||||
FlowElement userTaskElement = BpmnModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey());
|
FlowElement userTaskElement = BpmnModelUtils.getFlowElementById(bpmnModel, task.getTaskDefinitionKey());
|
||||||
// 判断是否为退回或者驳回:如果是退回或者驳回不走这个策略
|
// 判断是否为退回或者驳回:如果是退回或者驳回不走这个策略
|
||||||
// TODO 芋艿:【优化】未来有没更好的判断方式?!另外,还要考虑清理机制。就是说,下次处理了之后,就移除这个标识
|
// TODO ZT:【优化】未来有没更好的判断方式?!另外,还要考虑清理机制。就是说,下次处理了之后,就移除这个标识
|
||||||
Boolean returnTaskFlag = runtimeService.getVariable(processInstance.getProcessInstanceId(),
|
Boolean returnTaskFlag = runtimeService.getVariable(processInstance.getProcessInstanceId(),
|
||||||
String.format(PROCESS_INSTANCE_VARIABLE_RETURN_FLAG, task.getTaskDefinitionKey()), Boolean.class);
|
String.format(PROCESS_INSTANCE_VARIABLE_RETURN_FLAG, task.getTaskDefinitionKey()), Boolean.class);
|
||||||
Boolean skipStartUserNodeFlag = Convert.toBool(runtimeService.getVariable(processInstance.getProcessInstanceId(),
|
Boolean skipStartUserNodeFlag = Convert.toBool(runtimeService.getVariable(processInstance.getProcessInstanceId(),
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
import static com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils.parseListenerConfig;
|
import static com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils.parseListenerConfig;
|
||||||
|
|
||||||
// TODO @芋艿:可能会想换个包地址
|
// TODO @ZT:可能会想换个包地址
|
||||||
/**
|
/**
|
||||||
* BPM 用户任务通用监听器
|
* BPM 用户任务通用监听器
|
||||||
*
|
*
|
||||||
@@ -42,7 +42,7 @@ public class BpmUserTaskListener implements TaskListener {
|
|||||||
BpmSimpleModelNodeVO.ListenerHandler listenerHandler = parseListenerConfig(listenerConfig);
|
BpmSimpleModelNodeVO.ListenerHandler listenerHandler = parseListenerConfig(listenerConfig);
|
||||||
|
|
||||||
// 2. 发起请求
|
// 2. 发起请求
|
||||||
// TODO @芋艿:哪些默认参数,后续再调研下;感觉可以搞个 task 字段,把整个 delegateTask 放进去;
|
// TODO @ZT:哪些默认参数,后续再调研下;感觉可以搞个 task 字段,把整个 delegateTask 放进去;
|
||||||
listenerHandler.getBody().add(new BpmSimpleModelNodeVO.HttpRequestParam().setKey("processInstanceId")
|
listenerHandler.getBody().add(new BpmSimpleModelNodeVO.HttpRequestParam().setKey("processInstanceId")
|
||||||
.setType(BpmHttpRequestParamTypeEnum.FIXED_VALUE.getType()).setValue(delegateTask.getProcessInstanceId()));
|
.setType(BpmHttpRequestParamTypeEnum.FIXED_VALUE.getType()).setValue(delegateTask.getProcessInstanceId()));
|
||||||
listenerHandler.getBody().add(new BpmSimpleModelNodeVO.HttpRequestParam().setKey("assignee")
|
listenerHandler.getBody().add(new BpmSimpleModelNodeVO.HttpRequestParam().setKey("assignee")
|
||||||
@@ -54,6 +54,6 @@ public class BpmUserTaskListener implements TaskListener {
|
|||||||
BpmHttpRequestUtils.executeBpmHttpRequest(processInstance,
|
BpmHttpRequestUtils.executeBpmHttpRequest(processInstance,
|
||||||
listenerHandler.getPath(), listenerHandler.getHeader(), listenerHandler.getBody(), false, null);
|
listenerHandler.getPath(), listenerHandler.getHeader(), listenerHandler.getBody(), false, null);
|
||||||
|
|
||||||
// 3. 是否需要后续操作?TODO 芋艿:待定!
|
// 3. 是否需要后续操作?TODO ZT:待定!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ package com.zt.plat.module.bpm.service.task.trigger;
|
|||||||
|
|
||||||
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
|
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
|
||||||
|
|
||||||
// TODO @芋艿:可能会想换个包地址
|
// TODO @ZT:可能会想换个包地址
|
||||||
/**
|
/**
|
||||||
* BPM 触发器接口
|
* BPM 触发器接口
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.zt.plat.module.bpm.service.task.trigger.form;
|
package com.zt.plat.module.bpm.service.task.trigger.form;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.zt.plat.framework.common.util.json.JsonUtils;
|
import com.zt.plat.framework.common.util.json.JsonUtils;
|
||||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
|
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO;
|
||||||
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
|
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
|
||||||
@@ -9,6 +8,7 @@ import com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils;
|
|||||||
import com.zt.plat.module.bpm.framework.flowable.core.util.SimpleModelUtils;
|
import com.zt.plat.module.bpm.framework.flowable.core.util.SimpleModelUtils;
|
||||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||||
import com.zt.plat.module.bpm.service.task.trigger.BpmTrigger;
|
import com.zt.plat.module.bpm.service.task.trigger.BpmTrigger;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.zt.plat.module.bpm.service.task.trigger.form;
|
package com.zt.plat.module.bpm.service.task.trigger.form;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.zt.plat.framework.common.util.json.JsonUtils;
|
import com.zt.plat.framework.common.util.json.JsonUtils;
|
||||||
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO.TriggerSetting.FormTriggerSetting;
|
import com.zt.plat.module.bpm.controller.admin.definition.vo.model.simple.BpmSimpleModelNodeVO.TriggerSetting.FormTriggerSetting;
|
||||||
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
|
import com.zt.plat.module.bpm.enums.definition.BpmTriggerTypeEnum;
|
||||||
@@ -9,6 +8,7 @@ import com.zt.plat.module.bpm.framework.flowable.core.util.BpmnModelUtils;
|
|||||||
import com.zt.plat.module.bpm.framework.flowable.core.util.SimpleModelUtils;
|
import com.zt.plat.module.bpm.framework.flowable.core.util.SimpleModelUtils;
|
||||||
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
import com.zt.plat.module.bpm.service.task.BpmProcessInstanceService;
|
||||||
import com.zt.plat.module.bpm.service.task.trigger.BpmTrigger;
|
import com.zt.plat.module.bpm.service.task.trigger.BpmTrigger;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import jakarta.annotation.Resource;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.engine.runtime.ProcessInstance;
|
import org.flowable.engine.runtime.ProcessInstance;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BPM HTTP 回调触发器
|
* BPM HTTP 回调触发器
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import jakarta.annotation.Resource;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.flowable.engine.runtime.ProcessInstance;
|
import org.flowable.engine.runtime.ProcessInstance;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BPM 发送同步 HTTP 请求触发器
|
* BPM 发送同步 HTTP 请求触发器
|
||||||
|
|||||||
@@ -5,6 +5,25 @@
|
|||||||
|
|
||||||
package liquibase.database.core;
|
package liquibase.database.core;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DatabaseMetaData;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Statement;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
import liquibase.CatalogAndSchema;
|
import liquibase.CatalogAndSchema;
|
||||||
import liquibase.GlobalConfiguration;
|
import liquibase.GlobalConfiguration;
|
||||||
import liquibase.Scope;
|
import liquibase.Scope;
|
||||||
@@ -23,17 +42,15 @@ import liquibase.statement.UniqueConstraint;
|
|||||||
import liquibase.statement.core.RawCallStatement;
|
import liquibase.statement.core.RawCallStatement;
|
||||||
import liquibase.statement.core.RawParameterizedSqlStatement;
|
import liquibase.statement.core.RawParameterizedSqlStatement;
|
||||||
import liquibase.structure.DatabaseObject;
|
import liquibase.structure.DatabaseObject;
|
||||||
import liquibase.structure.core.*;
|
import liquibase.structure.core.Catalog;
|
||||||
|
import liquibase.structure.core.Column;
|
||||||
|
import liquibase.structure.core.Index;
|
||||||
|
import liquibase.structure.core.PrimaryKey;
|
||||||
|
import liquibase.structure.core.Schema;
|
||||||
import liquibase.util.JdbcUtil;
|
import liquibase.util.JdbcUtil;
|
||||||
import liquibase.util.StringUtil;
|
import liquibase.util.StringUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.sql.*;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
public class DmDatabase extends AbstractJdbcDatabase {
|
public class DmDatabase extends AbstractJdbcDatabase {
|
||||||
private static final String PROXY_USER_REGEX = ".*(?:thin|oci)\\:(.+)/@.*";
|
private static final String PROXY_USER_REGEX = ".*(?:thin|oci)\\:(.+)/@.*";
|
||||||
public static final Pattern PROXY_USER_PATTERN = Pattern.compile(".*(?:thin|oci)\\:(.+)/@.*");
|
public static final Pattern PROXY_USER_PATTERN = Pattern.compile(".*(?:thin|oci)\\:(.+)/@.*");
|
||||||
@@ -98,6 +115,7 @@ public class DmDatabase extends AbstractJdbcDatabase {
|
|||||||
public void setConnection(DatabaseConnection conn) {
|
public void setConnection(DatabaseConnection conn) {
|
||||||
this.reservedWords.addAll(Arrays.asList("GROUP", "USER", "SESSION", "PASSWORD", "RESOURCE", "START", "SIZE", "UID", "DESC", "ORDER"));
|
this.reservedWords.addAll(Arrays.asList("GROUP", "USER", "SESSION", "PASSWORD", "RESOURCE", "START", "SIZE", "UID", "DESC", "ORDER"));
|
||||||
Connection sqlConn = null;
|
Connection sqlConn = null;
|
||||||
|
boolean dmDatabase = false;
|
||||||
if (!(conn instanceof OfflineConnection)) {
|
if (!(conn instanceof OfflineConnection)) {
|
||||||
try {
|
try {
|
||||||
if (conn instanceof JdbcConnection) {
|
if (conn instanceof JdbcConnection) {
|
||||||
@@ -124,26 +142,42 @@ public class DmDatabase extends AbstractJdbcDatabase {
|
|||||||
Scope.getCurrentScope().getLog(this.getClass()).info("Could not set remarks reporting on OracleDatabase: " + e.getMessage());
|
Scope.getCurrentScope().getLog(this.getClass()).info("Could not set remarks reporting on OracleDatabase: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
CallableStatement statement = null;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
statement = sqlConn.prepareCall("{call DBMS_UTILITY.DB_VERSION(?,?)}");
|
DatabaseMetaData metaData = sqlConn.getMetaData();
|
||||||
statement.registerOutParameter(1, 12);
|
if (metaData != null) {
|
||||||
statement.registerOutParameter(2, 12);
|
String productName = metaData.getDatabaseProductName();
|
||||||
statement.execute();
|
dmDatabase = productName != null && PRODUCT_NAME.equalsIgnoreCase(productName);
|
||||||
String compatibleVersion = statement.getString(2);
|
if (dmDatabase) {
|
||||||
if (compatibleVersion != null) {
|
this.databaseMajorVersion = metaData.getDatabaseMajorVersion();
|
||||||
Matcher majorVersionMatcher = VERSION_PATTERN.matcher(compatibleVersion);
|
this.databaseMinorVersion = metaData.getDatabaseMinorVersion();
|
||||||
if (majorVersionMatcher.matches()) {
|
|
||||||
this.databaseMajorVersion = Integer.valueOf(majorVersionMatcher.group(1));
|
|
||||||
this.databaseMinorVersion = Integer.valueOf(majorVersionMatcher.group(2));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
String message = "Cannot read from DBMS_UTILITY.DB_VERSION: " + e.getMessage();
|
Scope.getCurrentScope().getLog(this.getClass()).info("Unable to inspect database metadata for DM version detection: " + e.getMessage());
|
||||||
Scope.getCurrentScope().getLog(this.getClass()).info("Could not set check compatibility mode on OracleDatabase, assuming not running in any sort of compatibility mode: " + message);
|
}
|
||||||
} finally {
|
|
||||||
JdbcUtil.closeStatement(statement);
|
if (!dmDatabase) {
|
||||||
|
CallableStatement statement = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
statement = sqlConn.prepareCall("{call DBMS_UTILITY.DB_VERSION(?,?)}");
|
||||||
|
statement.registerOutParameter(1, 12);
|
||||||
|
statement.registerOutParameter(2, 12);
|
||||||
|
statement.execute();
|
||||||
|
String compatibleVersion = statement.getString(2);
|
||||||
|
if (compatibleVersion != null) {
|
||||||
|
Matcher majorVersionMatcher = VERSION_PATTERN.matcher(compatibleVersion);
|
||||||
|
if (majorVersionMatcher.matches()) {
|
||||||
|
this.databaseMajorVersion = Integer.valueOf(majorVersionMatcher.group(1));
|
||||||
|
this.databaseMinorVersion = Integer.valueOf(majorVersionMatcher.group(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
String message = "Cannot read from DBMS_UTILITY.DB_VERSION: " + e.getMessage();
|
||||||
|
Scope.getCurrentScope().getLog(this.getClass()).info("Could not set check compatibility mode on OracleDatabase, assuming not running in any sort of compatibility mode: " + message);
|
||||||
|
} finally {
|
||||||
|
JdbcUtil.closeStatement(statement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GlobalConfiguration.DDL_LOCK_TIMEOUT.getCurrentValue() != null) {
|
if (GlobalConfiguration.DDL_LOCK_TIMEOUT.getCurrentValue() != null) {
|
||||||
@@ -250,7 +284,15 @@ public class DmDatabase extends AbstractJdbcDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException {
|
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException {
|
||||||
return "oracle".equalsIgnoreCase(conn.getDatabaseProductName());
|
String databaseProductName = conn == null ? null : conn.getDatabaseProductName();
|
||||||
|
if (databaseProductName == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (PRODUCT_NAME.equalsIgnoreCase(databaseProductName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Flowable 历史上将 DM 映射为 Oracle 元数据,因此这里同样接受 Oracle 以保持兼容
|
||||||
|
return "oracle".equalsIgnoreCase(databaseProductName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDefaultDriver(String url) {
|
public String getDefaultDriver(String url) {
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package liquibase.datatype.core;
|
||||||
|
|
||||||
|
import liquibase.database.Database;
|
||||||
|
import liquibase.database.core.DmDatabase;
|
||||||
|
import liquibase.datatype.DataTypeInfo;
|
||||||
|
import liquibase.datatype.DatabaseDataType;
|
||||||
|
|
||||||
|
@DataTypeInfo(
|
||||||
|
name = "boolean",
|
||||||
|
aliases = {"java.sql.Types.BOOLEAN", "java.lang.Boolean", "bit", "bool"},
|
||||||
|
minParameters = 0,
|
||||||
|
maxParameters = 0,
|
||||||
|
priority = 2
|
||||||
|
)
|
||||||
|
public class DmBooleanType extends BooleanType {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(Database database) {
|
||||||
|
if (database instanceof DmDatabase) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.supports(database);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DatabaseDataType toDatabaseDataType(Database database) {
|
||||||
|
if (database instanceof DmDatabase) {
|
||||||
|
return new DatabaseDataType("NUMBER", 1);
|
||||||
|
}
|
||||||
|
return super.toDatabaseDataType(database);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,354 @@
|
|||||||
|
/* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.flowable.common.engine.impl.db;
|
||||||
|
|
||||||
|
import org.apache.ibatis.session.SqlSessionFactory;
|
||||||
|
import org.flowable.common.engine.api.FlowableException;
|
||||||
|
import org.flowable.common.engine.impl.context.Context;
|
||||||
|
import org.flowable.common.engine.impl.interceptor.CommandContext;
|
||||||
|
import org.flowable.common.engine.impl.interceptor.Session;
|
||||||
|
import org.flowable.common.engine.impl.interceptor.SessionFactory;
|
||||||
|
import org.flowable.common.engine.impl.persistence.cache.EntityCache;
|
||||||
|
import org.flowable.common.engine.impl.persistence.entity.Entity;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Tom Baeyens
|
||||||
|
* @author Joram Barrez
|
||||||
|
*/
|
||||||
|
public class DbSqlSessionFactory implements SessionFactory {
|
||||||
|
|
||||||
|
protected Map<String, Map<String, String>> databaseSpecificStatements = new HashMap<>();
|
||||||
|
|
||||||
|
protected String databaseType;
|
||||||
|
protected String databaseTablePrefix = "";
|
||||||
|
protected boolean tablePrefixIsSchema;
|
||||||
|
|
||||||
|
protected String databaseCatalog;
|
||||||
|
protected String databaseSchema;
|
||||||
|
protected SqlSessionFactory sqlSessionFactory;
|
||||||
|
protected Map<String, String> statementMappings;
|
||||||
|
|
||||||
|
protected Map<Class<?>, String> insertStatements = new ConcurrentHashMap<>();
|
||||||
|
protected Map<Class<?>, String> updateStatements = new ConcurrentHashMap<>();
|
||||||
|
protected Map<Class<?>, String> deleteStatements = new ConcurrentHashMap<>();
|
||||||
|
protected Map<Class<?>, String> selectStatements = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
protected List<Class<? extends Entity>> insertionOrder = new ArrayList<>();
|
||||||
|
protected List<Class<? extends Entity>> deletionOrder = new ArrayList<>();
|
||||||
|
|
||||||
|
protected boolean isDbHistoryUsed = true;
|
||||||
|
|
||||||
|
protected Set<Class<? extends Entity>> bulkInserteableEntityClasses = new HashSet<>();
|
||||||
|
protected Map<Class<?>, String> bulkInsertStatements = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
protected int maxNrOfStatementsInBulkInsert = 100;
|
||||||
|
|
||||||
|
protected Map<String, Class<?>> logicalNameToClassMapping = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
protected boolean usePrefixId;
|
||||||
|
|
||||||
|
public DbSqlSessionFactory(boolean usePrefixId) {
|
||||||
|
this.usePrefixId = usePrefixId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getSessionType() {
|
||||||
|
return DbSqlSession.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Session openSession(CommandContext commandContext) {
|
||||||
|
DbSqlSession dbSqlSession = createDbSqlSession();
|
||||||
|
// 当前系统适配 dm,如果存在 schema 为空的情况,从 connection 获取
|
||||||
|
try {
|
||||||
|
if (getDatabaseSchema() == null || getDatabaseSchema().length() == 0){
|
||||||
|
setDatabaseSchema(dbSqlSession.getSqlSession().getConnection().getSchema());
|
||||||
|
}
|
||||||
|
dbSqlSession.getSqlSession().getConnection().getSchema();
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getDatabaseSchema() != null && getDatabaseSchema().length() > 0) {
|
||||||
|
try {
|
||||||
|
dbSqlSession.getSqlSession().getConnection().setSchema(getDatabaseSchema());
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new FlowableException("Could not set database schema on connection", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (getDatabaseCatalog() != null && getDatabaseCatalog().length() > 0) {
|
||||||
|
try {
|
||||||
|
dbSqlSession.getSqlSession().getConnection().setCatalog(getDatabaseCatalog());
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new FlowableException("Could not set database catalog on connection", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (dbSqlSession.getSqlSession().getConnection() == null) {
|
||||||
|
throw new FlowableException("Invalid dbSqlSession: no active connection found");
|
||||||
|
}
|
||||||
|
return dbSqlSession;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected DbSqlSession createDbSqlSession() {
|
||||||
|
return new DbSqlSession(this, Context.getCommandContext().getSession(EntityCache.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
// insert, update and delete statements
|
||||||
|
// /////////////////////////////////////
|
||||||
|
|
||||||
|
public String getInsertStatement(Entity object) {
|
||||||
|
return getStatement(object.getClass(), insertStatements, "insert");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInsertStatement(Class<? extends Entity> clazz) {
|
||||||
|
return getStatement(clazz, insertStatements, "insert");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateStatement(Entity object) {
|
||||||
|
return getStatement(object.getClass(), updateStatements, "update");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeleteStatement(Class<?> entityClass) {
|
||||||
|
return getStatement(entityClass, deleteStatements, "delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSelectStatement(Class<?> entityClass) {
|
||||||
|
return getStatement(entityClass, selectStatements, "select");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getStatement(Class<?> entityClass, Map<Class<?>, String> cachedStatements, String prefix) {
|
||||||
|
String statement = cachedStatements.get(entityClass);
|
||||||
|
if (statement != null) {
|
||||||
|
return statement;
|
||||||
|
}
|
||||||
|
statement = prefix + entityClass.getSimpleName();
|
||||||
|
if (statement.endsWith("Impl")) {
|
||||||
|
statement = statement.substring(0, statement.length() - 10); // removing 'entityImpl'
|
||||||
|
} else {
|
||||||
|
statement = statement.substring(0, statement.length() - 6); // removing 'entity'
|
||||||
|
}
|
||||||
|
cachedStatements.put(entityClass, statement);
|
||||||
|
return statement;
|
||||||
|
}
|
||||||
|
|
||||||
|
// db specific mappings
|
||||||
|
// /////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
protected void addDatabaseSpecificStatement(String databaseType, String activitiStatement, String ibatisStatement) {
|
||||||
|
Map<String, String> specificStatements = databaseSpecificStatements.get(databaseType);
|
||||||
|
if (specificStatements == null) {
|
||||||
|
specificStatements = new HashMap<>();
|
||||||
|
databaseSpecificStatements.put(databaseType, specificStatements);
|
||||||
|
}
|
||||||
|
specificStatements.put(activitiStatement, ibatisStatement);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String mapStatement(String statement) {
|
||||||
|
if (statementMappings == null) {
|
||||||
|
return statement;
|
||||||
|
}
|
||||||
|
String mappedStatement = statementMappings.get(statement);
|
||||||
|
return (mappedStatement != null ? mappedStatement : statement);
|
||||||
|
}
|
||||||
|
|
||||||
|
// customized getters and setters
|
||||||
|
// ///////////////////////////////////////////
|
||||||
|
|
||||||
|
public void setDatabaseType(String databaseType) {
|
||||||
|
this.databaseType = databaseType;
|
||||||
|
this.statementMappings = databaseSpecificStatements.get(databaseType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMysql() {
|
||||||
|
return "mysql".equals(getDatabaseType());
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOracle() {
|
||||||
|
return "oracle".equals(getDatabaseType());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean isBulkInsertable(Class<? extends Entity> entityClass) {
|
||||||
|
return bulkInserteableEntityClasses != null && bulkInserteableEntityClasses.contains(entityClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
|
public String getBulkInsertStatement(Class clazz) {
|
||||||
|
return getStatement(clazz, bulkInsertStatements, "bulkInsert");
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<Class<? extends Entity>> getBulkInserteableEntityClasses() {
|
||||||
|
return bulkInserteableEntityClasses;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBulkInserteableEntityClasses(Set<Class<? extends Entity>> bulkInserteableEntityClasses) {
|
||||||
|
this.bulkInserteableEntityClasses = bulkInserteableEntityClasses;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxNrOfStatementsInBulkInsert() {
|
||||||
|
return maxNrOfStatementsInBulkInsert;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxNrOfStatementsInBulkInsert(int maxNrOfStatementsInBulkInsert) {
|
||||||
|
this.maxNrOfStatementsInBulkInsert = maxNrOfStatementsInBulkInsert;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Class<?>, String> getBulkInsertStatements() {
|
||||||
|
return bulkInsertStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBulkInsertStatements(Map<Class<?>, String> bulkInsertStatements) {
|
||||||
|
this.bulkInsertStatements = bulkInsertStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
// getters and setters //////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
public SqlSessionFactory getSqlSessionFactory() {
|
||||||
|
return sqlSessionFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
|
||||||
|
this.sqlSessionFactory = sqlSessionFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDatabaseType() {
|
||||||
|
return databaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Map<String, String>> getDatabaseSpecificStatements() {
|
||||||
|
return databaseSpecificStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatabaseSpecificStatements(Map<String, Map<String, String>> databaseSpecificStatements) {
|
||||||
|
this.databaseSpecificStatements = databaseSpecificStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getStatementMappings() {
|
||||||
|
return statementMappings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatementMappings(Map<String, String> statementMappings) {
|
||||||
|
this.statementMappings = statementMappings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Class<?>, String> getInsertStatements() {
|
||||||
|
return insertStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInsertStatements(Map<Class<?>, String> insertStatements) {
|
||||||
|
this.insertStatements = insertStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Class<?>, String> getUpdateStatements() {
|
||||||
|
return updateStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateStatements(Map<Class<?>, String> updateStatements) {
|
||||||
|
this.updateStatements = updateStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Class<?>, String> getDeleteStatements() {
|
||||||
|
return deleteStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteStatements(Map<Class<?>, String> deleteStatements) {
|
||||||
|
this.deleteStatements = deleteStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Class<?>, String> getSelectStatements() {
|
||||||
|
return selectStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectStatements(Map<Class<?>, String> selectStatements) {
|
||||||
|
this.selectStatements = selectStatements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDbHistoryUsed() {
|
||||||
|
return isDbHistoryUsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDbHistoryUsed(boolean isDbHistoryUsed) {
|
||||||
|
this.isDbHistoryUsed = isDbHistoryUsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatabaseTablePrefix(String databaseTablePrefix) {
|
||||||
|
this.databaseTablePrefix = databaseTablePrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDatabaseTablePrefix() {
|
||||||
|
return databaseTablePrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDatabaseCatalog() {
|
||||||
|
return databaseCatalog;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatabaseCatalog(String databaseCatalog) {
|
||||||
|
this.databaseCatalog = databaseCatalog;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDatabaseSchema() {
|
||||||
|
return databaseSchema;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatabaseSchema(String databaseSchema) {
|
||||||
|
this.databaseSchema = databaseSchema;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTablePrefixIsSchema(boolean tablePrefixIsSchema) {
|
||||||
|
this.tablePrefixIsSchema = tablePrefixIsSchema;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTablePrefixIsSchema() {
|
||||||
|
return tablePrefixIsSchema;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Class<? extends Entity>> getInsertionOrder() {
|
||||||
|
return insertionOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInsertionOrder(List<Class<? extends Entity>> insertionOrder) {
|
||||||
|
this.insertionOrder = insertionOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Class<? extends Entity>> getDeletionOrder() {
|
||||||
|
return deletionOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeletionOrder(List<Class<? extends Entity>> deletionOrder) {
|
||||||
|
this.deletionOrder = deletionOrder;
|
||||||
|
}
|
||||||
|
public void addLogicalEntityClassMapping(String logicalName, Class<?> entityClass) {
|
||||||
|
logicalNameToClassMapping.put(logicalName, entityClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Class<?>> getLogicalNameToClassMapping() {
|
||||||
|
return logicalNameToClassMapping;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLogicalNameToClassMapping(Map<String, Class<?>> logicalNameToClassMapping) {
|
||||||
|
this.logicalNameToClassMapping = logicalNameToClassMapping;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isUsePrefixId() {
|
||||||
|
return usePrefixId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsePrefixId(boolean usePrefixId) {
|
||||||
|
this.usePrefixId = usePrefixId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ liquibase.database.core.MariaDBDatabase
|
|||||||
liquibase.database.core.MockDatabase
|
liquibase.database.core.MockDatabase
|
||||||
liquibase.database.core.MySQLDatabase
|
liquibase.database.core.MySQLDatabase
|
||||||
liquibase.database.core.OracleDatabase
|
liquibase.database.core.OracleDatabase
|
||||||
|
liquibase.database.core.DmDatabase
|
||||||
liquibase.database.core.PostgresDatabase
|
liquibase.database.core.PostgresDatabase
|
||||||
liquibase.database.core.SQLiteDatabase
|
liquibase.database.core.SQLiteDatabase
|
||||||
liquibase.database.core.SybaseASADatabase
|
liquibase.database.core.SybaseASADatabase
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
liquibase.datatype.core.DmBooleanType
|
||||||
@@ -89,6 +89,6 @@ spring:
|
|||||||
instance:
|
instance:
|
||||||
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
--- #################### ZT相关配置 ####################
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,14 +39,14 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://172.16.46.247:4787/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:dm://172.16.46.247:1050?schema=BPM
|
||||||
username: jygk-test
|
username: SYSDBA
|
||||||
password: Zgty@0527
|
password: pgbsci6ddJ6Sqj@e
|
||||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://172.16.46.247:4787/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:dm://172.16.46.247:1050?schema=BPM
|
||||||
username: jygk-test
|
username: SYSDBA
|
||||||
password: Zgty@0527
|
password: pgbsci6ddJ6Sqj@e
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||||
data:
|
data:
|
||||||
@@ -56,6 +56,11 @@ spring:
|
|||||||
database: 0 # 数据库索引
|
database: 0 # 数据库索引
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
# password: 123456 # 密码,建议生产环境开启
|
||||||
|
|
||||||
|
# Flowable 在 DM 场景下需要识别为 Oracle 并自动升级表结构
|
||||||
|
flowable:
|
||||||
|
database-schema-update: true
|
||||||
|
database-type: oracle
|
||||||
|
|
||||||
--- #################### MQ 消息队列相关配置 ####################
|
--- #################### MQ 消息队列相关配置 ####################
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
--- #################### 定时任务相关配置 ####################
|
||||||
@@ -97,11 +102,11 @@ logging:
|
|||||||
level:
|
level:
|
||||||
# 配置自己写的 MyBatis Mapper 打印日志
|
# 配置自己写的 MyBatis Mapper 打印日志
|
||||||
com.zt.plat.module.bpm.dal.mysql: debug
|
com.zt.plat.module.bpm.dal.mysql: debug
|
||||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO ZT:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
--- #################### ZT相关配置 ####################
|
||||||
|
|
||||||
# 芋道配置项,设置当前项目所有自定义的配置
|
# ZT配置项,设置当前项目所有自定义的配置
|
||||||
zt:
|
zt:
|
||||||
env: # 多环境的配置项
|
env: # 多环境的配置项
|
||||||
tag: ${HOSTNAME}
|
tag: ${HOSTNAME}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ springdoc:
|
|||||||
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
|
||||||
|
|
||||||
knife4j:
|
knife4j:
|
||||||
enable: false # TODO 芋艿:需要关闭增强,具体原因见:https://github.com/xiaoymin/knife4j/issues/874
|
enable: false # TODO ZT:需要关闭增强,具体原因见:https://github.com/xiaoymin/knife4j/issues/874
|
||||||
setting:
|
setting:
|
||||||
language: zh_cn
|
language: zh_cn
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ xxl:
|
|||||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
||||||
accessToken: default_token # 执行器通讯TOKEN
|
accessToken: default_token # 执行器通讯TOKEN
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
--- #################### ZT相关配置 ####################
|
||||||
|
|
||||||
zt:
|
zt:
|
||||||
info:
|
info:
|
||||||
@@ -141,8 +141,8 @@ zt:
|
|||||||
exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系
|
exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系
|
||||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
||||||
swagger:
|
swagger:
|
||||||
title: Bpm 模块
|
title: 流程模块
|
||||||
description: 提供 Bpm 管理的所有功能
|
description: 提供流程模块功能
|
||||||
version: ${zt.info.version}
|
version: ${zt.info.version}
|
||||||
tenant: # 多租户相关配置项
|
tenant: # 多租户相关配置项
|
||||||
enable: true
|
enable: true
|
||||||
|
|||||||
@@ -73,4 +73,8 @@
|
|||||||
</root>
|
</root>
|
||||||
</springProfile>
|
</springProfile>
|
||||||
|
|
||||||
|
<logger name="com.zt.plat.module.bpm.dal" level="DEBUG" additivity="false">
|
||||||
|
<appender-ref ref="STDOUT"/>
|
||||||
|
</logger>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
create table FLW_RU_BATCH (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
REV_ INTEGER,
|
||||||
|
TYPE_ VARCHAR2(64) not null,
|
||||||
|
SEARCH_KEY_ VARCHAR2(255),
|
||||||
|
SEARCH_KEY2_ VARCHAR2(255),
|
||||||
|
CREATE_TIME_ TIMESTAMP(6) not null,
|
||||||
|
COMPLETE_TIME_ TIMESTAMP(6),
|
||||||
|
STATUS_ VARCHAR2(255),
|
||||||
|
BATCH_DOC_ID_ VARCHAR2(64),
|
||||||
|
TENANT_ID_ VARCHAR2(255) default '',
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table FLW_RU_BATCH_PART (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
REV_ INTEGER,
|
||||||
|
BATCH_ID_ VARCHAR2(64),
|
||||||
|
TYPE_ VARCHAR2(64) not null,
|
||||||
|
SCOPE_ID_ VARCHAR2(64),
|
||||||
|
SUB_SCOPE_ID_ VARCHAR2(64),
|
||||||
|
SCOPE_TYPE_ VARCHAR2(64),
|
||||||
|
SEARCH_KEY_ VARCHAR2(255),
|
||||||
|
SEARCH_KEY2_ VARCHAR2(255),
|
||||||
|
CREATE_TIME_ TIMESTAMP(6) not null,
|
||||||
|
COMPLETE_TIME_ TIMESTAMP(6),
|
||||||
|
STATUS_ VARCHAR2(255),
|
||||||
|
RESULT_DOC_ID_ VARCHAR2(64),
|
||||||
|
TENANT_ID_ VARCHAR2(255) default '',
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
|
||||||
|
|
||||||
|
alter table FLW_RU_BATCH_PART
|
||||||
|
add constraint FLW_FK_BATCH_PART_PARENT
|
||||||
|
foreign key (BATCH_ID_)
|
||||||
|
references FLW_RU_BATCH (ID_);
|
||||||
|
|
||||||
|
insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.0.1.1', 1);
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
drop index FLW_IDX_BATCH_PART;
|
||||||
|
|
||||||
|
drop table FLW_RU_BATCH_PART;
|
||||||
|
drop table FLW_RU_BATCH;
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
create table ACT_GE_PROPERTY (
|
||||||
|
NAME_ VARCHAR2(64),
|
||||||
|
VALUE_ VARCHAR2(300),
|
||||||
|
REV_ INTEGER,
|
||||||
|
primary key (NAME_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_GE_BYTEARRAY (
|
||||||
|
ID_ VARCHAR2(64),
|
||||||
|
REV_ INTEGER,
|
||||||
|
NAME_ VARCHAR2(255),
|
||||||
|
DEPLOYMENT_ID_ VARCHAR2(64),
|
||||||
|
BYTES_ BLOB,
|
||||||
|
GENERATED_ NUMBER(1) CHECK (GENERATED_ IN (1,0)),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
insert into ACT_GE_PROPERTY
|
||||||
|
values ('common.schema.version', '7.0.1.1', 1);
|
||||||
|
|
||||||
|
insert into ACT_GE_PROPERTY
|
||||||
|
values ('next.dbid', '1', 1);
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
drop table ACT_GE_BYTEARRAY;
|
||||||
|
drop table ACT_GE_PROPERTY;
|
||||||
@@ -0,0 +1,355 @@
|
|||||||
|
create table ACT_RE_DEPLOYMENT (
|
||||||
|
ID_ VARCHAR2(64),
|
||||||
|
NAME_ VARCHAR2(255),
|
||||||
|
CATEGORY_ VARCHAR2(255),
|
||||||
|
KEY_ VARCHAR2(255),
|
||||||
|
TENANT_ID_ VARCHAR2(255) DEFAULT '',
|
||||||
|
DEPLOY_TIME_ TIMESTAMP(6),
|
||||||
|
DERIVED_FROM_ VARCHAR2(64),
|
||||||
|
DERIVED_FROM_ROOT_ VARCHAR2(64),
|
||||||
|
PARENT_DEPLOYMENT_ID_ VARCHAR2(255),
|
||||||
|
ENGINE_VERSION_ VARCHAR2(255),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_RE_MODEL (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
REV_ INTEGER,
|
||||||
|
NAME_ VARCHAR2(255),
|
||||||
|
KEY_ VARCHAR2(255),
|
||||||
|
CATEGORY_ VARCHAR2(255),
|
||||||
|
CREATE_TIME_ TIMESTAMP(6),
|
||||||
|
LAST_UPDATE_TIME_ TIMESTAMP(6),
|
||||||
|
VERSION_ INTEGER,
|
||||||
|
META_INFO_ VARCHAR2(2000),
|
||||||
|
DEPLOYMENT_ID_ VARCHAR2(64),
|
||||||
|
EDITOR_SOURCE_VALUE_ID_ VARCHAR2(64),
|
||||||
|
EDITOR_SOURCE_EXTRA_VALUE_ID_ VARCHAR2(64),
|
||||||
|
TENANT_ID_ VARCHAR2(255) DEFAULT '',
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_RU_EXECUTION (
|
||||||
|
ID_ VARCHAR2(64),
|
||||||
|
REV_ INTEGER,
|
||||||
|
PROC_INST_ID_ VARCHAR2(64),
|
||||||
|
BUSINESS_KEY_ VARCHAR2(255),
|
||||||
|
PARENT_ID_ VARCHAR2(64),
|
||||||
|
PROC_DEF_ID_ VARCHAR2(64),
|
||||||
|
SUPER_EXEC_ VARCHAR2(64),
|
||||||
|
ROOT_PROC_INST_ID_ VARCHAR2(64),
|
||||||
|
ACT_ID_ VARCHAR2(255),
|
||||||
|
IS_ACTIVE_ NUMBER(1) CHECK (IS_ACTIVE_ IN (1,0)),
|
||||||
|
IS_CONCURRENT_ NUMBER(1) CHECK (IS_CONCURRENT_ IN (1,0)),
|
||||||
|
IS_SCOPE_ NUMBER(1) CHECK (IS_SCOPE_ IN (1,0)),
|
||||||
|
IS_EVENT_SCOPE_ NUMBER(1) CHECK (IS_EVENT_SCOPE_ IN (1,0)),
|
||||||
|
IS_MI_ROOT_ NUMBER(1) CHECK (IS_MI_ROOT_ IN (1,0)),
|
||||||
|
SUSPENSION_STATE_ INTEGER,
|
||||||
|
CACHED_ENT_STATE_ INTEGER,
|
||||||
|
TENANT_ID_ VARCHAR2(255) DEFAULT '',
|
||||||
|
NAME_ VARCHAR2(255),
|
||||||
|
START_ACT_ID_ VARCHAR2(255),
|
||||||
|
START_TIME_ TIMESTAMP(6),
|
||||||
|
START_USER_ID_ VARCHAR2(255),
|
||||||
|
LOCK_TIME_ TIMESTAMP(6),
|
||||||
|
LOCK_OWNER_ VARCHAR2(255),
|
||||||
|
IS_COUNT_ENABLED_ NUMBER(1) CHECK (IS_COUNT_ENABLED_ IN (1,0)),
|
||||||
|
EVT_SUBSCR_COUNT_ INTEGER,
|
||||||
|
TASK_COUNT_ INTEGER,
|
||||||
|
JOB_COUNT_ INTEGER,
|
||||||
|
TIMER_JOB_COUNT_ INTEGER,
|
||||||
|
SUSP_JOB_COUNT_ INTEGER,
|
||||||
|
DEADLETTER_JOB_COUNT_ INTEGER,
|
||||||
|
EXTERNAL_WORKER_JOB_COUNT_ INTEGER,
|
||||||
|
VAR_COUNT_ INTEGER,
|
||||||
|
ID_LINK_COUNT_ INTEGER,
|
||||||
|
CALLBACK_ID_ VARCHAR2(255),
|
||||||
|
CALLBACK_TYPE_ VARCHAR2(255),
|
||||||
|
REFERENCE_ID_ VARCHAR2(255),
|
||||||
|
REFERENCE_TYPE_ VARCHAR2(255),
|
||||||
|
PROPAGATED_STAGE_INST_ID_ VARCHAR2(255),
|
||||||
|
BUSINESS_STATUS_ VARCHAR2(255),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_RE_PROCDEF (
|
||||||
|
ID_ VARCHAR2(64) NOT NULL,
|
||||||
|
REV_ INTEGER,
|
||||||
|
CATEGORY_ VARCHAR2(255),
|
||||||
|
NAME_ VARCHAR2(255),
|
||||||
|
KEY_ VARCHAR2(255) NOT NULL,
|
||||||
|
VERSION_ INTEGER NOT NULL,
|
||||||
|
DEPLOYMENT_ID_ VARCHAR2(64),
|
||||||
|
RESOURCE_NAME_ VARCHAR2(2000),
|
||||||
|
DGRM_RESOURCE_NAME_ VARCHAR2(4000),
|
||||||
|
DESCRIPTION_ VARCHAR2(2000),
|
||||||
|
HAS_START_FORM_KEY_ NUMBER(1) CHECK (HAS_START_FORM_KEY_ IN (1,0)),
|
||||||
|
HAS_GRAPHICAL_NOTATION_ NUMBER(1) CHECK (HAS_GRAPHICAL_NOTATION_ IN (1,0)),
|
||||||
|
SUSPENSION_STATE_ INTEGER,
|
||||||
|
TENANT_ID_ VARCHAR2(255) DEFAULT '',
|
||||||
|
DERIVED_FROM_ VARCHAR2(64),
|
||||||
|
DERIVED_FROM_ROOT_ VARCHAR2(64),
|
||||||
|
DERIVED_VERSION_ INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
ENGINE_VERSION_ VARCHAR2(255),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_EVT_LOG (
|
||||||
|
LOG_NR_ NUMBER(19),
|
||||||
|
TYPE_ VARCHAR2(64),
|
||||||
|
PROC_DEF_ID_ VARCHAR2(64),
|
||||||
|
PROC_INST_ID_ VARCHAR2(64),
|
||||||
|
EXECUTION_ID_ VARCHAR2(64),
|
||||||
|
TASK_ID_ VARCHAR2(64),
|
||||||
|
TIME_STAMP_ TIMESTAMP(6) not null,
|
||||||
|
USER_ID_ VARCHAR2(255),
|
||||||
|
DATA_ BLOB,
|
||||||
|
LOCK_OWNER_ VARCHAR2(255),
|
||||||
|
LOCK_TIME_ TIMESTAMP(6) null,
|
||||||
|
IS_PROCESSED_ NUMBER(3) default 0,
|
||||||
|
primary key (LOG_NR_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create sequence act_evt_log_seq;
|
||||||
|
|
||||||
|
create table ACT_PROCDEF_INFO (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
PROC_DEF_ID_ VARCHAR2(64) not null,
|
||||||
|
REV_ integer,
|
||||||
|
INFO_JSON_ID_ VARCHAR2(64),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_RU_ACTINST (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
REV_ INTEGER default 1,
|
||||||
|
PROC_DEF_ID_ VARCHAR2(64) not null,
|
||||||
|
PROC_INST_ID_ VARCHAR2(64) not null,
|
||||||
|
EXECUTION_ID_ VARCHAR2(64) not null,
|
||||||
|
ACT_ID_ VARCHAR2(255) not null,
|
||||||
|
TASK_ID_ VARCHAR2(64),
|
||||||
|
CALL_PROC_INST_ID_ VARCHAR2(64),
|
||||||
|
ACT_NAME_ VARCHAR2(255),
|
||||||
|
ACT_TYPE_ VARCHAR2(255) not null,
|
||||||
|
ASSIGNEE_ VARCHAR2(255),
|
||||||
|
START_TIME_ TIMESTAMP(6) not null,
|
||||||
|
END_TIME_ TIMESTAMP(6),
|
||||||
|
DURATION_ NUMBER(19,0),
|
||||||
|
TRANSACTION_ORDER_ INTEGER,
|
||||||
|
DELETE_REASON_ VARCHAR2(2000),
|
||||||
|
TENANT_ID_ VARCHAR2(255) default '',
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_);
|
||||||
|
create index ACT_IDX_EXEC_ROOT on ACT_RU_EXECUTION(ROOT_PROC_INST_ID_);
|
||||||
|
create index ACT_IDX_EXEC_REF_ID_ on ACT_RU_EXECUTION(REFERENCE_ID_);
|
||||||
|
create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_RU_ACTI_START on ACT_RU_ACTINST(START_TIME_);
|
||||||
|
create index ACT_IDX_RU_ACTI_END on ACT_RU_ACTINST(END_TIME_);
|
||||||
|
create index ACT_IDX_RU_ACTI_PROC on ACT_RU_ACTINST(PROC_INST_ID_);
|
||||||
|
create index ACT_IDX_RU_ACTI_PROC_ACT on ACT_RU_ACTINST(PROC_INST_ID_, ACT_ID_);
|
||||||
|
create index ACT_IDX_RU_ACTI_EXEC on ACT_RU_ACTINST(EXECUTION_ID_);
|
||||||
|
create index ACT_IDX_RU_ACTI_EXEC_ACT on ACT_RU_ACTINST(EXECUTION_ID_, ACT_ID_);
|
||||||
|
create index ACT_IDX_RU_ACTI_TASK on ACT_RU_ACTINST(TASK_ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_BYTEAR_DEPL on ACT_GE_BYTEARRAY(DEPLOYMENT_ID_);
|
||||||
|
alter table ACT_GE_BYTEARRAY
|
||||||
|
add constraint ACT_FK_BYTEARR_DEPL
|
||||||
|
foreign key (DEPLOYMENT_ID_)
|
||||||
|
references ACT_RE_DEPLOYMENT (ID_);
|
||||||
|
|
||||||
|
alter table ACT_RE_PROCDEF
|
||||||
|
add constraint ACT_UNIQ_PROCDEF
|
||||||
|
unique (KEY_,VERSION_, DERIVED_VERSION_, TENANT_ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_EXE_PROCINST on ACT_RU_EXECUTION(PROC_INST_ID_);
|
||||||
|
alter table ACT_RU_EXECUTION
|
||||||
|
add constraint ACT_FK_EXE_PROCINST
|
||||||
|
foreign key (PROC_INST_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_EXE_PARENT on ACT_RU_EXECUTION(PARENT_ID_);
|
||||||
|
alter table ACT_RU_EXECUTION
|
||||||
|
add constraint ACT_FK_EXE_PARENT
|
||||||
|
foreign key (PARENT_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_EXE_SUPER on ACT_RU_EXECUTION(SUPER_EXEC_);
|
||||||
|
alter table ACT_RU_EXECUTION
|
||||||
|
add constraint ACT_FK_EXE_SUPER
|
||||||
|
foreign key (SUPER_EXEC_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_EXE_PROCDEF on ACT_RU_EXECUTION(PROC_DEF_ID_);
|
||||||
|
alter table ACT_RU_EXECUTION
|
||||||
|
add constraint ACT_FK_EXE_PROCDEF
|
||||||
|
foreign key (PROC_DEF_ID_)
|
||||||
|
references ACT_RE_PROCDEF (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_TSKASS_TASK on ACT_RU_IDENTITYLINK(TASK_ID_);
|
||||||
|
alter table ACT_RU_IDENTITYLINK
|
||||||
|
add constraint ACT_FK_TSKASS_TASK
|
||||||
|
foreign key (TASK_ID_)
|
||||||
|
references ACT_RU_TASK (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
|
||||||
|
alter table ACT_RU_IDENTITYLINK
|
||||||
|
add constraint ACT_FK_ATHRZ_PROCEDEF
|
||||||
|
foreign key (PROC_DEF_ID_)
|
||||||
|
references ACT_RE_PROCDEF (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_IDL_PROCINST on ACT_RU_IDENTITYLINK(PROC_INST_ID_);
|
||||||
|
alter table ACT_RU_IDENTITYLINK
|
||||||
|
add constraint ACT_FK_IDL_PROCINST
|
||||||
|
foreign key (PROC_INST_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_TASK_EXEC on ACT_RU_TASK(EXECUTION_ID_);
|
||||||
|
alter table ACT_RU_TASK
|
||||||
|
add constraint ACT_FK_TASK_EXE
|
||||||
|
foreign key (EXECUTION_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK(PROC_INST_ID_);
|
||||||
|
alter table ACT_RU_TASK
|
||||||
|
add constraint ACT_FK_TASK_PROCINST
|
||||||
|
foreign key (PROC_INST_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_TASK_PROCDEF on ACT_RU_TASK(PROC_DEF_ID_);
|
||||||
|
alter table ACT_RU_TASK
|
||||||
|
add constraint ACT_FK_TASK_PROCDEF
|
||||||
|
foreign key (PROC_DEF_ID_)
|
||||||
|
references ACT_RE_PROCDEF (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE(EXECUTION_ID_);
|
||||||
|
alter table ACT_RU_VARIABLE
|
||||||
|
add constraint ACT_FK_VAR_EXE
|
||||||
|
foreign key (EXECUTION_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_);
|
||||||
|
alter table ACT_RU_VARIABLE
|
||||||
|
add constraint ACT_FK_VAR_PROCINST
|
||||||
|
foreign key (PROC_INST_ID_)
|
||||||
|
references ACT_RU_EXECUTION(ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_JOB_EXECUTION_ID on ACT_RU_JOB(EXECUTION_ID_);
|
||||||
|
alter table ACT_RU_JOB
|
||||||
|
add constraint ACT_FK_JOB_EXECUTION
|
||||||
|
foreign key (EXECUTION_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_JOB_PROC_INST_ID on ACT_RU_JOB(PROCESS_INSTANCE_ID_);
|
||||||
|
alter table ACT_RU_JOB
|
||||||
|
add constraint ACT_FK_JOB_PROCESS_INSTANCE
|
||||||
|
foreign key (PROCESS_INSTANCE_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_JOB_PROC_DEF_ID on ACT_RU_JOB(PROC_DEF_ID_);
|
||||||
|
alter table ACT_RU_JOB
|
||||||
|
add constraint ACT_FK_JOB_PROC_DEF
|
||||||
|
foreign key (PROC_DEF_ID_)
|
||||||
|
references ACT_RE_PROCDEF (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_TJOB_EXECUTION_ID on ACT_RU_TIMER_JOB(EXECUTION_ID_);
|
||||||
|
alter table ACT_RU_TIMER_JOB
|
||||||
|
add constraint ACT_FK_TJOB_EXECUTION
|
||||||
|
foreign key (EXECUTION_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_TJOB_PROC_INST_ID on ACT_RU_TIMER_JOB(PROCESS_INSTANCE_ID_);
|
||||||
|
alter table ACT_RU_TIMER_JOB
|
||||||
|
add constraint ACT_FK_TJOB_PROCESS_INSTANCE
|
||||||
|
foreign key (PROCESS_INSTANCE_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_TJOB_PROC_DEF_ID on ACT_RU_TIMER_JOB(PROC_DEF_ID_);
|
||||||
|
alter table ACT_RU_TIMER_JOB
|
||||||
|
add constraint ACT_FK_TJOB_PROC_DEF
|
||||||
|
foreign key (PROC_DEF_ID_)
|
||||||
|
references ACT_RE_PROCDEF (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_SJOB_EXECUTION_ID on ACT_RU_SUSPENDED_JOB(EXECUTION_ID_);
|
||||||
|
alter table ACT_RU_SUSPENDED_JOB
|
||||||
|
add constraint ACT_FK_SJOB_EXECUTION
|
||||||
|
foreign key (EXECUTION_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_SJOB_PROC_INST_ID on ACT_RU_SUSPENDED_JOB(PROCESS_INSTANCE_ID_);
|
||||||
|
alter table ACT_RU_SUSPENDED_JOB
|
||||||
|
add constraint ACT_FK_SJOB_PROCESS_INSTANCE
|
||||||
|
foreign key (PROCESS_INSTANCE_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_SJOB_PROC_DEF_ID on ACT_RU_SUSPENDED_JOB(PROC_DEF_ID_);
|
||||||
|
alter table ACT_RU_SUSPENDED_JOB
|
||||||
|
add constraint ACT_FK_SJOB_PROC_DEF
|
||||||
|
foreign key (PROC_DEF_ID_)
|
||||||
|
references ACT_RE_PROCDEF (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_DJOB_EXECUTION_ID on ACT_RU_DEADLETTER_JOB(EXECUTION_ID_);
|
||||||
|
alter table ACT_RU_DEADLETTER_JOB
|
||||||
|
add constraint ACT_FK_DJOB_EXECUTION
|
||||||
|
foreign key (EXECUTION_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_DJOB_PROC_INST_ID on ACT_RU_DEADLETTER_JOB(PROCESS_INSTANCE_ID_);
|
||||||
|
alter table ACT_RU_DEADLETTER_JOB
|
||||||
|
add constraint ACT_FK_DJOB_PROCESS_INSTANCE
|
||||||
|
foreign key (PROCESS_INSTANCE_ID_)
|
||||||
|
references ACT_RU_EXECUTION (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_DJOB_PROC_DEF_ID on ACT_RU_DEADLETTER_JOB(PROC_DEF_ID_);
|
||||||
|
alter table ACT_RU_DEADLETTER_JOB
|
||||||
|
add constraint ACT_FK_DJOB_PROC_DEF
|
||||||
|
foreign key (PROC_DEF_ID_)
|
||||||
|
references ACT_RE_PROCDEF (ID_);
|
||||||
|
|
||||||
|
alter table ACT_RU_EVENT_SUBSCR
|
||||||
|
add constraint ACT_FK_EVENT_EXEC
|
||||||
|
foreign key (EXECUTION_ID_)
|
||||||
|
references ACT_RU_EXECUTION(ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_MODEL_SOURCE on ACT_RE_MODEL(EDITOR_SOURCE_VALUE_ID_);
|
||||||
|
alter table ACT_RE_MODEL
|
||||||
|
add constraint ACT_FK_MODEL_SOURCE
|
||||||
|
foreign key (EDITOR_SOURCE_VALUE_ID_)
|
||||||
|
references ACT_GE_BYTEARRAY (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_MODEL_SOURCE_EXTRA on ACT_RE_MODEL(EDITOR_SOURCE_EXTRA_VALUE_ID_);
|
||||||
|
alter table ACT_RE_MODEL
|
||||||
|
add constraint ACT_FK_MODEL_SOURCE_EXTRA
|
||||||
|
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
|
||||||
|
references ACT_GE_BYTEARRAY (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_MODEL_DEPLOYMENT on ACT_RE_MODEL(DEPLOYMENT_ID_);
|
||||||
|
alter table ACT_RE_MODEL
|
||||||
|
add constraint ACT_FK_MODEL_DEPLOYMENT
|
||||||
|
foreign key (DEPLOYMENT_ID_)
|
||||||
|
references ACT_RE_DEPLOYMENT (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_PROCDEF_INFO_JSON on ACT_PROCDEF_INFO(INFO_JSON_ID_);
|
||||||
|
alter table ACT_PROCDEF_INFO
|
||||||
|
add constraint ACT_FK_INFO_JSON_BA
|
||||||
|
foreign key (INFO_JSON_ID_)
|
||||||
|
references ACT_GE_BYTEARRAY (ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_PROCDEF_INFO_PROC on ACT_PROCDEF_INFO(PROC_DEF_ID_);
|
||||||
|
alter table ACT_PROCDEF_INFO
|
||||||
|
add constraint ACT_FK_INFO_PROCDEF
|
||||||
|
foreign key (PROC_DEF_ID_)
|
||||||
|
references ACT_RE_PROCDEF (ID_);
|
||||||
|
|
||||||
|
alter table ACT_PROCDEF_INFO
|
||||||
|
add constraint ACT_UNIQ_INFO_PROCDEF
|
||||||
|
unique (PROC_DEF_ID_);
|
||||||
|
|
||||||
|
insert into ACT_GE_PROPERTY
|
||||||
|
values ('schema.version', '7.0.1.1', 1);
|
||||||
|
|
||||||
|
insert into ACT_GE_PROPERTY
|
||||||
|
values ('schema.history', 'create(7.0.1.1)', 1);
|
||||||
|
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
create table ACT_HI_PROCINST (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
REV_ INTEGER default 1,
|
||||||
|
PROC_INST_ID_ VARCHAR2(64) not null,
|
||||||
|
BUSINESS_KEY_ VARCHAR2(255),
|
||||||
|
PROC_DEF_ID_ VARCHAR2(64) not null,
|
||||||
|
START_TIME_ TIMESTAMP(6) not null,
|
||||||
|
END_TIME_ TIMESTAMP(6),
|
||||||
|
DURATION_ NUMBER(19,0),
|
||||||
|
START_USER_ID_ VARCHAR2(255),
|
||||||
|
START_ACT_ID_ VARCHAR2(255),
|
||||||
|
END_ACT_ID_ VARCHAR2(255),
|
||||||
|
SUPER_PROCESS_INSTANCE_ID_ VARCHAR2(64),
|
||||||
|
DELETE_REASON_ VARCHAR2(2000),
|
||||||
|
TENANT_ID_ VARCHAR2(255) default '',
|
||||||
|
NAME_ VARCHAR2(255),
|
||||||
|
CALLBACK_ID_ VARCHAR2(255),
|
||||||
|
CALLBACK_TYPE_ VARCHAR2(255),
|
||||||
|
REFERENCE_ID_ VARCHAR2(255),
|
||||||
|
REFERENCE_TYPE_ VARCHAR2(255),
|
||||||
|
PROPAGATED_STAGE_INST_ID_ VARCHAR2(255),
|
||||||
|
BUSINESS_STATUS_ VARCHAR2(255),
|
||||||
|
primary key (ID_),
|
||||||
|
unique (PROC_INST_ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_HI_ACTINST (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
REV_ INTEGER default 1,
|
||||||
|
PROC_DEF_ID_ VARCHAR2(64) not null,
|
||||||
|
PROC_INST_ID_ VARCHAR2(64) not null,
|
||||||
|
EXECUTION_ID_ VARCHAR2(64) not null,
|
||||||
|
ACT_ID_ VARCHAR2(255) not null,
|
||||||
|
TASK_ID_ VARCHAR2(64),
|
||||||
|
CALL_PROC_INST_ID_ VARCHAR2(64),
|
||||||
|
ACT_NAME_ VARCHAR2(255),
|
||||||
|
ACT_TYPE_ VARCHAR2(255) not null,
|
||||||
|
ASSIGNEE_ VARCHAR2(255),
|
||||||
|
START_TIME_ TIMESTAMP(6) not null,
|
||||||
|
END_TIME_ TIMESTAMP(6),
|
||||||
|
TRANSACTION_ORDER_ INTEGER,
|
||||||
|
DURATION_ NUMBER(19,0),
|
||||||
|
DELETE_REASON_ VARCHAR2(2000),
|
||||||
|
TENANT_ID_ VARCHAR2(255) default '',
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_HI_DETAIL (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
TYPE_ VARCHAR2(255) not null,
|
||||||
|
PROC_INST_ID_ VARCHAR2(64),
|
||||||
|
EXECUTION_ID_ VARCHAR2(64),
|
||||||
|
TASK_ID_ VARCHAR2(64),
|
||||||
|
ACT_INST_ID_ VARCHAR2(64),
|
||||||
|
NAME_ VARCHAR2(255) not null,
|
||||||
|
VAR_TYPE_ VARCHAR2(64),
|
||||||
|
REV_ INTEGER,
|
||||||
|
TIME_ TIMESTAMP(6) not null,
|
||||||
|
BYTEARRAY_ID_ VARCHAR2(64),
|
||||||
|
DOUBLE_ NUMBER(38,10),
|
||||||
|
LONG_ NUMBER(19,0),
|
||||||
|
TEXT_ VARCHAR2(2000),
|
||||||
|
TEXT2_ VARCHAR2(2000),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_HI_COMMENT (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
TYPE_ VARCHAR2(255),
|
||||||
|
TIME_ TIMESTAMP(6) not null,
|
||||||
|
USER_ID_ VARCHAR2(255),
|
||||||
|
TASK_ID_ VARCHAR2(64),
|
||||||
|
PROC_INST_ID_ VARCHAR2(64),
|
||||||
|
ACTION_ VARCHAR2(255),
|
||||||
|
MESSAGE_ VARCHAR2(2000),
|
||||||
|
FULL_MSG_ BLOB,
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table ACT_HI_ATTACHMENT (
|
||||||
|
ID_ VARCHAR2(64) not null,
|
||||||
|
REV_ INTEGER,
|
||||||
|
USER_ID_ VARCHAR2(255),
|
||||||
|
NAME_ VARCHAR2(255),
|
||||||
|
DESCRIPTION_ VARCHAR2(2000),
|
||||||
|
TYPE_ VARCHAR2(255),
|
||||||
|
TASK_ID_ VARCHAR2(64),
|
||||||
|
PROC_INST_ID_ VARCHAR2(64),
|
||||||
|
URL_ VARCHAR2(2000),
|
||||||
|
CONTENT_ID_ VARCHAR2(64),
|
||||||
|
TIME_ TIMESTAMP(6),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_);
|
||||||
|
create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_);
|
||||||
|
create index ACT_IDX_HI_PRO_SUPER_PROCINST on ACT_HI_PROCINST(SUPER_PROCESS_INSTANCE_ID_);
|
||||||
|
create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_);
|
||||||
|
create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_);
|
||||||
|
create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_);
|
||||||
|
create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_);
|
||||||
|
create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_);
|
||||||
|
create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_);
|
||||||
|
create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_);
|
||||||
|
create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_);
|
||||||
|
create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_);
|
||||||
|
create index ACT_IDX_HI_PROCVAR_EXE on ACT_HI_VARINST(EXECUTION_ID_);
|
||||||
|
create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_);
|
||||||
|
create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_);
|
||||||
|
|
||||||
|
create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_);
|
||||||
|
create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_);
|
||||||
|
create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_);
|
||||||
|
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
drop index ACT_IDX_BYTEAR_DEPL;
|
||||||
|
drop index ACT_IDX_EXE_PROCINST;
|
||||||
|
drop index ACT_IDX_EXE_PARENT;
|
||||||
|
drop index ACT_IDX_EXE_SUPER;
|
||||||
|
drop index ACT_IDX_TSKASS_TASK;
|
||||||
|
drop index ACT_IDX_TASK_EXEC;
|
||||||
|
drop index ACT_IDX_TASK_PROCINST;
|
||||||
|
drop index ACT_IDX_TASK_PROCDEF;
|
||||||
|
drop index ACT_IDX_VAR_EXE;
|
||||||
|
drop index ACT_IDX_VAR_PROCINST;
|
||||||
|
drop index ACT_IDX_JOB_EXECUTION_ID;
|
||||||
|
drop index ACT_IDX_JOB_PROC_INST_ID;
|
||||||
|
drop index ACT_IDX_JOB_PROC_DEF_ID;
|
||||||
|
drop index ACT_IDX_TJOB_EXECUTION_ID;
|
||||||
|
drop index ACT_IDX_TJOB_PROC_INST_ID;
|
||||||
|
drop index ACT_IDX_TJOB_PROC_DEF_ID;
|
||||||
|
drop index ACT_IDX_SJOB_EXECUTION_ID;
|
||||||
|
drop index ACT_IDX_SJOB_PROC_INST_ID;
|
||||||
|
drop index ACT_IDX_SJOB_PROC_DEF_ID;
|
||||||
|
drop index ACT_IDX_DJOB_EXECUTION_ID;
|
||||||
|
drop index ACT_IDX_DJOB_PROC_INST_ID;
|
||||||
|
drop index ACT_IDX_DJOB_PROC_DEF_ID;
|
||||||
|
drop index ACT_IDX_MODEL_SOURCE;
|
||||||
|
drop index ACT_IDX_MODEL_SOURCE_EXTRA;
|
||||||
|
drop index ACT_IDX_MODEL_DEPLOYMENT;
|
||||||
|
drop index ACT_IDX_PROCDEF_INFO_JSON;
|
||||||
|
|
||||||
|
drop index ACT_IDX_EXEC_BUSKEY;
|
||||||
|
drop index ACT_IDX_VARIABLE_TASK_ID;
|
||||||
|
|
||||||
|
drop index ACT_IDX_RU_ACTI_START;
|
||||||
|
drop index ACT_IDX_RU_ACTI_END;
|
||||||
|
drop index ACT_IDX_RU_ACTI_PROC;
|
||||||
|
drop index ACT_IDX_RU_ACTI_PROC_ACT;
|
||||||
|
drop index ACT_IDX_RU_ACTI_EXEC;
|
||||||
|
drop index ACT_IDX_RU_ACTI_EXEC_ACT;
|
||||||
|
|
||||||
|
alter table ACT_GE_BYTEARRAY
|
||||||
|
drop CONSTRAINT ACT_FK_BYTEARR_DEPL;
|
||||||
|
|
||||||
|
alter table ACT_RU_EXECUTION
|
||||||
|
drop CONSTRAINT ACT_FK_EXE_PROCINST;
|
||||||
|
|
||||||
|
alter table ACT_RU_EXECUTION
|
||||||
|
drop CONSTRAINT ACT_FK_EXE_PARENT;
|
||||||
|
|
||||||
|
alter table ACT_RU_EXECUTION
|
||||||
|
drop CONSTRAINT ACT_FK_EXE_SUPER;
|
||||||
|
|
||||||
|
alter table ACT_RU_EXECUTION
|
||||||
|
drop CONSTRAINT ACT_FK_EXE_PROCDEF;
|
||||||
|
|
||||||
|
alter table ACT_RU_IDENTITYLINK
|
||||||
|
drop CONSTRAINT ACT_FK_TSKASS_TASK;
|
||||||
|
|
||||||
|
alter table ACT_RU_IDENTITYLINK
|
||||||
|
drop CONSTRAINT ACT_FK_IDL_PROCINST;
|
||||||
|
|
||||||
|
alter table ACT_RU_IDENTITYLINK
|
||||||
|
drop CONSTRAINT ACT_FK_ATHRZ_PROCEDEF;
|
||||||
|
|
||||||
|
alter table ACT_RU_TASK
|
||||||
|
drop CONSTRAINT ACT_FK_TASK_EXE;
|
||||||
|
|
||||||
|
alter table ACT_RU_TASK
|
||||||
|
drop CONSTRAINT ACT_FK_TASK_PROCINST;
|
||||||
|
|
||||||
|
alter table ACT_RU_TASK
|
||||||
|
drop CONSTRAINT ACT_FK_TASK_PROCDEF;
|
||||||
|
|
||||||
|
alter table ACT_RU_VARIABLE
|
||||||
|
drop CONSTRAINT ACT_FK_VAR_EXE;
|
||||||
|
|
||||||
|
alter table ACT_RU_VARIABLE
|
||||||
|
drop CONSTRAINT ACT_FK_VAR_PROCINST;
|
||||||
|
|
||||||
|
alter table ACT_RU_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_JOB_EXECUTION;
|
||||||
|
|
||||||
|
alter table ACT_RU_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_JOB_PROCESS_INSTANCE;
|
||||||
|
|
||||||
|
alter table ACT_RU_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_JOB_PROC_DEF;
|
||||||
|
|
||||||
|
alter table ACT_RU_TIMER_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_TJOB_EXECUTION;
|
||||||
|
|
||||||
|
alter table ACT_RU_TIMER_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_TJOB_PROCESS_INSTANCE;
|
||||||
|
|
||||||
|
alter table ACT_RU_TIMER_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_TJOB_PROC_DEF;
|
||||||
|
|
||||||
|
alter table ACT_RU_SUSPENDED_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_SJOB_EXECUTION;
|
||||||
|
|
||||||
|
alter table ACT_RU_SUSPENDED_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_SJOB_PROCESS_INSTANCE;
|
||||||
|
|
||||||
|
alter table ACT_RU_SUSPENDED_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_SJOB_PROC_DEF;
|
||||||
|
|
||||||
|
alter table ACT_RU_DEADLETTER_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_DJOB_EXECUTION;
|
||||||
|
|
||||||
|
alter table ACT_RU_DEADLETTER_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_DJOB_PROCESS_INSTANCE;
|
||||||
|
|
||||||
|
alter table ACT_RU_DEADLETTER_JOB
|
||||||
|
drop CONSTRAINT ACT_FK_DJOB_PROC_DEF;
|
||||||
|
|
||||||
|
alter table ACT_RU_EVENT_SUBSCR
|
||||||
|
drop CONSTRAINT ACT_FK_EVENT_EXEC;
|
||||||
|
|
||||||
|
alter table ACT_RE_PROCDEF
|
||||||
|
drop CONSTRAINT ACT_UNIQ_PROCDEF;
|
||||||
|
|
||||||
|
alter table ACT_RE_MODEL
|
||||||
|
drop CONSTRAINT ACT_FK_MODEL_SOURCE;
|
||||||
|
|
||||||
|
alter table ACT_RE_MODEL
|
||||||
|
drop CONSTRAINT ACT_FK_MODEL_SOURCE_EXTRA;
|
||||||
|
|
||||||
|
alter table ACT_RE_MODEL
|
||||||
|
drop CONSTRAINT ACT_FK_MODEL_DEPLOYMENT;
|
||||||
|
|
||||||
|
alter table ACT_PROCDEF_INFO
|
||||||
|
drop CONSTRAINT ACT_UNIQ_INFO_PROCDEF;
|
||||||
|
|
||||||
|
alter table ACT_PROCDEF_INFO
|
||||||
|
drop CONSTRAINT ACT_FK_INFO_JSON_BA;
|
||||||
|
|
||||||
|
alter table ACT_PROCDEF_INFO
|
||||||
|
drop CONSTRAINT ACT_FK_INFO_PROCDEF;
|
||||||
|
|
||||||
|
drop index ACT_IDX_ATHRZ_PROCEDEF;
|
||||||
|
drop index ACT_IDX_PROCDEF_INFO_PROC;
|
||||||
|
|
||||||
|
drop table ACT_RU_ACTINST;
|
||||||
|
drop table ACT_RE_DEPLOYMENT;
|
||||||
|
drop table ACT_RE_MODEL;
|
||||||
|
drop table ACT_RE_PROCDEF;
|
||||||
|
drop table ACT_RU_EXECUTION;
|
||||||
|
|
||||||
|
drop sequence act_evt_log_seq;
|
||||||
|
drop table ACT_EVT_LOG;
|
||||||
|
drop table ACT_PROCDEF_INFO;
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
drop index ACT_IDX_HI_PRO_INST_END;
|
||||||
|
drop index ACT_IDX_HI_PRO_I_BUSKEY;
|
||||||
|
drop index ACT_IDX_HI_ACT_INST_START;
|
||||||
|
drop index ACT_IDX_HI_ACT_INST_END;
|
||||||
|
drop index ACT_IDX_HI_DETAIL_PROC_INST;
|
||||||
|
drop index ACT_IDX_HI_DETAIL_ACT_INST;
|
||||||
|
drop index ACT_IDX_HI_DETAIL_TIME;
|
||||||
|
drop index ACT_IDX_HI_DETAIL_NAME;
|
||||||
|
drop index ACT_IDX_HI_DETAIL_TASK_ID;
|
||||||
|
drop index ACT_IDX_HI_PROCVAR_PROC_INST;
|
||||||
|
drop index ACT_IDX_HI_PROCVAR_TASK_ID;
|
||||||
|
drop index ACT_IDX_HI_PROCVAR_EXE;
|
||||||
|
drop index ACT_IDX_HI_ACT_INST_PROCINST;
|
||||||
|
drop index ACT_IDX_HI_IDENT_LNK_TASK;
|
||||||
|
drop index ACT_IDX_HI_IDENT_LNK_PROCINST;
|
||||||
|
drop index ACT_IDX_HI_TASK_INST_PROCINST;
|
||||||
|
|
||||||
|
drop table ACT_HI_PROCINST;
|
||||||
|
drop table ACT_HI_ACTINST;
|
||||||
|
drop table ACT_HI_DETAIL;
|
||||||
|
drop table ACT_HI_COMMENT;
|
||||||
|
drop table ACT_HI_ATTACHMENT;
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
create table ACT_HI_ENTITYLINK (
|
||||||
|
ID_ VARCHAR2(64),
|
||||||
|
LINK_TYPE_ VARCHAR2(255),
|
||||||
|
CREATE_TIME_ TIMESTAMP(6),
|
||||||
|
SCOPE_ID_ VARCHAR2(255),
|
||||||
|
SUB_SCOPE_ID_ VARCHAR2(255),
|
||||||
|
SCOPE_TYPE_ VARCHAR2(255),
|
||||||
|
SCOPE_DEFINITION_ID_ VARCHAR2(255),
|
||||||
|
PARENT_ELEMENT_ID_ VARCHAR2(255),
|
||||||
|
REF_SCOPE_ID_ VARCHAR2(255),
|
||||||
|
REF_SCOPE_TYPE_ VARCHAR2(255),
|
||||||
|
REF_SCOPE_DEFINITION_ID_ VARCHAR2(255),
|
||||||
|
ROOT_SCOPE_ID_ VARCHAR2(255),
|
||||||
|
ROOT_SCOPE_TYPE_ VARCHAR2(255),
|
||||||
|
HIERARCHY_TYPE_ VARCHAR2(255),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
|
||||||
|
create index ACT_IDX_HI_ENT_LNK_REF_SCOPE on ACT_HI_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
|
||||||
|
create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE on ACT_HI_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
|
||||||
|
create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
create table ACT_RU_ENTITYLINK (
|
||||||
|
ID_ VARCHAR2(64),
|
||||||
|
REV_ INTEGER,
|
||||||
|
CREATE_TIME_ TIMESTAMP(6),
|
||||||
|
LINK_TYPE_ VARCHAR2(255),
|
||||||
|
SCOPE_ID_ VARCHAR2(255),
|
||||||
|
SUB_SCOPE_ID_ VARCHAR2(255),
|
||||||
|
SCOPE_TYPE_ VARCHAR2(255),
|
||||||
|
SCOPE_DEFINITION_ID_ VARCHAR2(255),
|
||||||
|
PARENT_ELEMENT_ID_ VARCHAR2(255),
|
||||||
|
REF_SCOPE_ID_ VARCHAR2(255),
|
||||||
|
REF_SCOPE_TYPE_ VARCHAR2(255),
|
||||||
|
REF_SCOPE_DEFINITION_ID_ VARCHAR2(255),
|
||||||
|
ROOT_SCOPE_ID_ VARCHAR2(255),
|
||||||
|
ROOT_SCOPE_TYPE_ VARCHAR2(255),
|
||||||
|
HIERARCHY_TYPE_ VARCHAR2(255),
|
||||||
|
primary key (ID_)
|
||||||
|
);
|
||||||
|
|
||||||
|
create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
|
||||||
|
create index ACT_IDX_ENT_LNK_REF_SCOPE on ACT_RU_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
|
||||||
|
create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
|
||||||
|
create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
|
||||||
|
|
||||||
|
insert into ACT_GE_PROPERTY values ('entitylink.schema.version', '7.0.1.1', 1);
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
drop index ACT_IDX_HI_ENT_LNK_SCOPE;
|
||||||
|
drop index ACT_IDX_HI_ENT_LNK_SCOPE_DEF;
|
||||||
|
|
||||||
|
drop table ACT_HI_ENTITYLINK;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user