add:流程添加回调透传:子流程载具修改流程实例流程

This commit is contained in:
zhangzq
2024-06-20 09:15:09 +08:00
parent e0b08e08da
commit 981a50b056
3 changed files with 11 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ public class BussEventMulticaster implements BeanPostProcessor {
if (sync){
String result= listener.doEvent(event);
if (event.getCallback() !=null && result !=null){
event.getCallback().accept(result,null);
event.getCallback().accept(result);
};
}else {
//TODO:异步回调

View File

@@ -77,7 +77,8 @@ public class GroupDickInStorageTask extends AbstractTask {
if (execution == null){
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"任务流程信息不存在"+currentInstId);
}
BussEventMulticaster.Publish(new FlowContinueEvent(currentInstId,null , new JSONObject(MapOf.of("start_point", point_code1))));
FlowContinueEvent continueEvent = new FlowContinueEvent(currentInstId, null, new JSONObject(MapOf.of("start_point", point_code1)));
BussEventMulticaster.Publish(continueEvent);
}else {
BussEventMulticaster.Publish(
new FlowStartEvent("md_group",
@@ -87,7 +88,10 @@ public class GroupDickInStorageTask extends AbstractTask {
.build("md_pb_vehicleMater",item)
);
}
//执行流程//
//流程创建完毕,更新组盘信息为完成
iMdGruopDickService.update(new UpdateWrapper<MdGruopDick>()
.set("status", StatusEnum.FORM_STATUS.code("完成"))
.eq("vehicle_code", vehicle_code));
}
return null;
}

View File

@@ -114,6 +114,10 @@ public class FlowOperationServiceImpl implements IFlowOperationService {
entity.setProc_inst_id(execution.getProc_inst_id());
entity.setParent_id(execution.getParent_id());
entity.setAuxParam(execution.getAux_param());
//手动添加扩展数据
if (!CollectionUtils.isEmpty(auxParam)){
entity.getAuxParam().putAll(auxParam);
}
entity.setForm_type(execution.getForm_type());
entity.setForm_id(execution.getForm_id());
entity.setStartActivityId(execution.getActivity_id());