fix:优化流程需求同步创建任务
This commit is contained in:
@@ -203,6 +203,10 @@ public class ProcessController implements IFlowableFeignClient {
|
||||
/**
|
||||
* 流程节点继续执行(完成人工节点/或者等待用户输入后继续手动执行的节点)
|
||||
*
|
||||
* 完成 UserTask 并继续
|
||||
* ServiceTask 前置人工节点 serviceTask _waitUser 在 ServiceTask 前插入的等待用户确认的 UserTask(Manual 模式)
|
||||
* 普通人工任务 userTask 原始 UserTask BPMN 中原本的 UserTask
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@@ -214,6 +218,13 @@ public class ProcessController implements IFlowableFeignClient {
|
||||
|
||||
/**
|
||||
* 异步任务回调接口,用于唤醒等待的流程实例
|
||||
* 唤醒 ReceiveTask 并继续
|
||||
* 触发的是 ReceiveTask(_wait 节点),通过 runtimeService.trigger() 继续流转
|
||||
*
|
||||
* 适用场景 节点类型 说明
|
||||
* HPC 异步计算 ReceiveTask _wait HPC 提交任务后,流程停在 _wait,等待 HPC 回调
|
||||
* 本地应用 ReceiveTask _wait 本地应用提交后,流程停在 _wait,等待本地应用回调
|
||||
* 其他异步任务 ReceiveTask _wait 流程停在 _wait,由外部系统通过 asyncTaskId 回调
|
||||
*
|
||||
* @param request 包含异步任务ID和执行结果的请求对象
|
||||
*/
|
||||
|
||||
@@ -152,6 +152,6 @@ public class SpdmAddDemandReq extends BaseEntity {
|
||||
/**
|
||||
* 是否为绿元亨项目
|
||||
*/
|
||||
private boolean isLyric=false;
|
||||
private Boolean isLyric=false;
|
||||
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ public class DemandServiceImpl extends BaseService implements IDemandService {
|
||||
log.info("创建需求时,更新需求创建人和需求仿真负责人(确认人)权限的返回值为:{}",updatePermissionResponse);
|
||||
|
||||
// 只有绿元亨需要在创建需求的同时创建任务
|
||||
if (req.isLyric()) {
|
||||
if (req.getIsLyric()) {
|
||||
SimulationDemand demand = new SimulationDemand();
|
||||
BeanUtils.copyProperties(req, demand);
|
||||
simulationTaskService.batchCreateTaskFromDemand(Collections.singletonList(demand));
|
||||
|
||||
@@ -161,6 +161,9 @@ public class SimulationTaskServiceImpl extends ServiceImpl<SimulationTaskMapper,
|
||||
|
||||
for (SimulationDemand demand : demandList) {
|
||||
SimulationTask task = convertDemandToTask(demand, tagMap);
|
||||
// 任务挂载在workspace工位节点下,需要从task的tag中获取workspaceId
|
||||
String workspaceId = getWorkspaceIdFromTask(task, tagMap);
|
||||
task.setNodeId(workspaceId);
|
||||
tasksToCreate.add(task);
|
||||
|
||||
taskExtrasToCreate.addAll(createTaskExtras(demand, task.getUuid()));
|
||||
|
||||
Reference in New Issue
Block a user