ztcloud-dist 中 bpm 覆盖回来,包含 http://172.16.46.63:31560/index.php?m=task&f=view&taskID=735 和 http://172.16.46.63:31560/index.php?m=task&f=view&taskID=552 中的修复
This commit is contained in:
@@ -11,7 +11,9 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>zt-module-bpm-api</module>
|
<module>zt-module-bpm-api</module>
|
||||||
<module>zt-module-bpm-server</module>
|
<module>zt-module-bpm-server</module>
|
||||||
|
<module>zt-module-bpm-server-app</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
<version>${revision}</version>
|
||||||
<artifactId>zt-module-bpm</artifactId>
|
<artifactId>zt-module-bpm</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /zt-module-bpm-server
|
RUN mkdir -p /zt-module-bpm-server-app
|
||||||
WORKDIR /zt-module-bpm-server
|
WORKDIR /zt-module-bpm-server-app
|
||||||
## 将后端项目的 Jar 文件,复制到镜像中
|
## 将后端项目的 Jar 文件,复制到镜像中
|
||||||
COPY ./target/zt-module-bpm-server.jar app.jar
|
COPY ./target/zt-module-bpm-server-app.jar app.jar
|
||||||
|
|
||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||||
49
zt-module-bpm/zt-module-bpm-server-app/pom.xml
Normal file
49
zt-module-bpm/zt-module-bpm-server-app/pom.xml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.zt.plat</groupId>
|
||||||
|
<artifactId>zt-module-bpm</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>zt-module-bpm-server-app</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>${project.artifactId}</name>
|
||||||
|
<description>
|
||||||
|
bpm 模块启动器。
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zt.plat</groupId>
|
||||||
|
<artifactId>zt-module-bpm-server</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<!-- 设置构建的 jar 包名 -->
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<!-- 打包 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>${spring.boot.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -76,5 +76,14 @@
|
|||||||
<logger name="com.zt.plat.module.bpm.dal" level="DEBUG" additivity="false">
|
<logger name="com.zt.plat.module.bpm.dal" level="DEBUG" additivity="false">
|
||||||
<appender-ref ref="STDOUT"/>
|
<appender-ref ref="STDOUT"/>
|
||||||
</logger>
|
</logger>
|
||||||
|
<!-- <logger name="org.flowable" level="DEBUG" additivity="false">-->
|
||||||
|
<!-- <appender-ref ref="STDOUT"/>-->
|
||||||
|
<!-- </logger>-->
|
||||||
|
<!-- <logger name="org.flowable.engine.impl.persistence.entity" level="DEBUG" additivity="false">-->
|
||||||
|
<!-- <appender-ref ref="STDOUT"/>-->
|
||||||
|
<!-- </logger>-->
|
||||||
|
<!-- <logger name="org.flowable.task.service.impl.persistence.entity" level="DEBUG" additivity="false">-->
|
||||||
|
<!-- <appender-ref ref="STDOUT"/>-->
|
||||||
|
<!-- </logger>-->
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -120,23 +120,4 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<!-- 设置构建的 jar 包名 -->
|
|
||||||
<finalName>${project.artifactId}</finalName>
|
|
||||||
<plugins>
|
|
||||||
<!-- 打包 -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<version>${spring.boot.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -26,11 +26,17 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||||||
import io.swagger.v3.oas.annotations.Parameter;
|
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.annotation.security.PermitAll;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.collections4.list.SetUniqueList;
|
import org.apache.commons.collections4.list.SetUniqueList;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.flowable.engine.RuntimeService;
|
||||||
|
import org.flowable.engine.TaskService;
|
||||||
import org.flowable.engine.history.HistoricProcessInstance;
|
import org.flowable.engine.history.HistoricProcessInstance;
|
||||||
|
import org.flowable.engine.migration.ProcessInstanceMigrationBuilder;
|
||||||
import org.flowable.engine.repository.ProcessDefinition;
|
import org.flowable.engine.repository.ProcessDefinition;
|
||||||
|
import org.flowable.engine.runtime.ActivityInstance;
|
||||||
import org.flowable.task.api.Task;
|
import org.flowable.task.api.Task;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -41,6 +47,7 @@ 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;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
import static com.zt.plat.framework.common.util.collection.CollectionUtils.*;
|
import static com.zt.plat.framework.common.util.collection.CollectionUtils.*;
|
||||||
@@ -234,4 +241,39 @@ public class BpmProcessInstanceController {
|
|||||||
return success(processInstanceService.getProcessInstanceBpmnModelView(id));
|
return success(processInstanceService.getProcessInstanceBpmnModelView(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RuntimeService runtimeService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TaskService taskService2;
|
||||||
|
|
||||||
|
@GetMapping("/klwtest")
|
||||||
|
@Operation(summary = "klw测试")
|
||||||
|
@PermitAll
|
||||||
|
public CommonResult<String> klwtest(@RequestParam String processInstanceId, @RequestParam String nodeId) {
|
||||||
|
List<ActivityInstance> currentActivities = runtimeService
|
||||||
|
.createActivityInstanceQuery()
|
||||||
|
.processInstanceId(processInstanceId)
|
||||||
|
.unfinished()
|
||||||
|
.list();
|
||||||
|
// taskService2.addComment(null, processInstanceId,
|
||||||
|
// "测试 comment");
|
||||||
|
if (CollectionUtils.isNotEmpty(currentActivities)) {
|
||||||
|
runtimeService.createChangeActivityStateBuilder()
|
||||||
|
.processInstanceId(processInstanceId)
|
||||||
|
.moveActivityIdsToSingleActivityId(
|
||||||
|
currentActivities.stream()
|
||||||
|
.map(ActivityInstance::getActivityId)
|
||||||
|
.collect(Collectors.toList()),
|
||||||
|
nodeId
|
||||||
|
)
|
||||||
|
.changeState();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return success("klw测试");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user