¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.dromara.workflow.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.codec.Base64; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.io.FileUtil; |
| | | import cn.hutool.core.io.IoUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.SneakyThrows; |
| | | import org.dromara.common.core.exception.ServiceException; |
| | | import org.dromara.common.core.utils.StreamUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.common.tenant.helper.TenantHelper; |
| | | import org.dromara.workflow.common.constant.FlowConstant; |
| | | import org.dromara.workflow.domain.WfCategory; |
| | | import org.dromara.workflow.domain.WfDefinitionConfig; |
| | | import org.dromara.workflow.domain.WfNodeConfig; |
| | | import org.dromara.workflow.domain.bo.ProcessDefinitionBo; |
| | | import org.dromara.workflow.domain.bo.WfDefinitionConfigBo; |
| | | import org.dromara.workflow.domain.vo.ProcessDefinitionVo; |
| | | import org.dromara.workflow.domain.vo.WfDefinitionConfigVo; |
| | | import org.dromara.workflow.mapper.WfDefinitionConfigMapper; |
| | | import org.dromara.workflow.service.IActProcessDefinitionService; |
| | | import org.dromara.workflow.service.IWfCategoryService; |
| | | import org.dromara.workflow.service.IWfDefinitionConfigService; |
| | | import org.dromara.workflow.service.IWfNodeConfigService; |
| | | import org.dromara.workflow.utils.ModelUtils; |
| | | import org.dromara.workflow.utils.QueryUtils; |
| | | import org.flowable.bpmn.model.UserTask; |
| | | import org.flowable.engine.ProcessMigrationService; |
| | | import org.flowable.engine.RepositoryService; |
| | | import org.flowable.engine.history.HistoricProcessInstance; |
| | | import org.flowable.engine.impl.bpmn.deployer.ResourceNameUtil; |
| | | import org.flowable.engine.repository.*; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipInputStream; |
| | | |
| | | /** |
| | | * æµç¨å®ä¹ æå¡å±å®ç° |
| | | * |
| | | * @author may |
| | | */ |
| | | @RequiredArgsConstructor |
| | | @Service |
| | | public class ActProcessDefinitionServiceImpl implements IActProcessDefinitionService { |
| | | |
| | | private final RepositoryService repositoryService; |
| | | private final ProcessMigrationService processMigrationService; |
| | | private final IWfCategoryService wfCategoryService; |
| | | private final IWfDefinitionConfigService wfDefinitionConfigService; |
| | | private final WfDefinitionConfigMapper wfDefinitionConfigMapper; |
| | | private final IWfNodeConfigService wfNodeConfigService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param bo åæ° |
| | | * @return è¿åå页å表 |
| | | */ |
| | | @Override |
| | | public TableDataInfo<ProcessDefinitionVo> page(ProcessDefinitionBo bo, PageQuery pageQuery) { |
| | | ProcessDefinitionQuery query = QueryUtils.definitionQuery(); |
| | | if (StringUtils.isNotEmpty(bo.getKey())) { |
| | | query.processDefinitionKey(bo.getKey()); |
| | | } |
| | | if (StringUtils.isNotEmpty(bo.getCategoryCode())) { |
| | | query.processDefinitionCategory(bo.getCategoryCode()); |
| | | } |
| | | if (StringUtils.isNotEmpty(bo.getName())) { |
| | | query.processDefinitionNameLike("%" + bo.getName() + "%"); |
| | | } |
| | | query.orderByDeploymentId().desc(); |
| | | // å页æ¥è¯¢ |
| | | List<ProcessDefinitionVo> processDefinitionVoList = new ArrayList<>(); |
| | | List<ProcessDefinition> definitionList = query.latestVersion().listPage(pageQuery.getFirstNum(), pageQuery.getPageSize()); |
| | | List<Deployment> deploymentList = null; |
| | | if (CollUtil.isNotEmpty(definitionList)) { |
| | | List<String> deploymentIds = StreamUtils.toList(definitionList, ProcessDefinition::getDeploymentId); |
| | | deploymentList = QueryUtils.deploymentQuery(deploymentIds).list(); |
| | | } |
| | | if (CollUtil.isNotEmpty(definitionList)) { |
| | | List<String> ids = StreamUtils.toList(definitionList, ProcessDefinition::getId); |
| | | List<WfDefinitionConfigVo> wfDefinitionConfigVos = wfDefinitionConfigService.queryList(ids); |
| | | for (ProcessDefinition processDefinition : definitionList) { |
| | | ProcessDefinitionVo processDefinitionVo = BeanUtil.toBean(processDefinition, ProcessDefinitionVo.class); |
| | | if (CollUtil.isNotEmpty(deploymentList)) { |
| | | // é¨ç½²æ¶é´ |
| | | deploymentList.stream().filter(e -> e.getId().equals(processDefinition.getDeploymentId())).findFirst().ifPresent(e -> { |
| | | processDefinitionVo.setDeploymentTime(e.getDeploymentTime()); |
| | | }); |
| | | } |
| | | if (CollUtil.isNotEmpty(wfDefinitionConfigVos)) { |
| | | wfDefinitionConfigVos.stream().filter(e -> e.getDefinitionId().equals(processDefinition.getId())).findFirst().ifPresent(processDefinitionVo::setWfDefinitionConfigVo); |
| | | } |
| | | processDefinitionVoList.add(processDefinitionVo); |
| | | } |
| | | } |
| | | // æ»è®°å½æ° |
| | | long total = query.count(); |
| | | TableDataInfo<ProcessDefinitionVo> build = TableDataInfo.build(); |
| | | build.setRows(processDefinitionVoList); |
| | | build.setTotal(total); |
| | | return build; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å岿µç¨å®ä¹å表 |
| | | * |
| | | * @param key æµç¨å®ä¹key |
| | | */ |
| | | @Override |
| | | public List<ProcessDefinitionVo> getListByKey(String key) { |
| | | List<ProcessDefinitionVo> processDefinitionVoList = new ArrayList<>(); |
| | | ProcessDefinitionQuery query = QueryUtils.definitionQuery(); |
| | | List<ProcessDefinition> definitionList = query.processDefinitionKey(key).list(); |
| | | List<Deployment> deploymentList = null; |
| | | if (CollUtil.isNotEmpty(definitionList)) { |
| | | List<String> deploymentIds = StreamUtils.toList(definitionList, ProcessDefinition::getDeploymentId); |
| | | deploymentList = QueryUtils.deploymentQuery(deploymentIds).list(); |
| | | } |
| | | if (CollUtil.isNotEmpty(definitionList)) { |
| | | List<String> ids = StreamUtils.toList(definitionList, ProcessDefinition::getId); |
| | | List<WfDefinitionConfigVo> wfDefinitionConfigVos = wfDefinitionConfigService.queryList(ids); |
| | | for (ProcessDefinition processDefinition : definitionList) { |
| | | ProcessDefinitionVo processDefinitionVo = BeanUtil.toBean(processDefinition, ProcessDefinitionVo.class); |
| | | if (CollUtil.isNotEmpty(deploymentList)) { |
| | | // é¨ç½²æ¶é´ |
| | | deploymentList.stream().filter(e -> e.getId().equals(processDefinition.getDeploymentId())).findFirst().ifPresent(e -> { |
| | | processDefinitionVo.setDeploymentTime(e.getDeploymentTime()); |
| | | }); |
| | | if (CollUtil.isNotEmpty(wfDefinitionConfigVos)) { |
| | | wfDefinitionConfigVos.stream().filter(e -> e.getDefinitionId().equals(processDefinition.getId())).findFirst().ifPresent(processDefinitionVo::setWfDefinitionConfigVo); |
| | | } |
| | | } |
| | | processDefinitionVoList.add(processDefinitionVo); |
| | | } |
| | | } |
| | | return CollUtil.reverse(processDefinitionVoList); |
| | | } |
| | | |
| | | /** |
| | | * æ¥çæµç¨å®ä¹å¾ç |
| | | * |
| | | * @param processDefinitionId æµç¨å®ä¹id |
| | | */ |
| | | @SneakyThrows |
| | | @Override |
| | | public String definitionImage(String processDefinitionId) { |
| | | InputStream inputStream = repositoryService.getProcessDiagram(processDefinitionId); |
| | | return Base64.encode(IoUtil.readBytes(inputStream)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥çæµç¨å®ä¹xmlæä»¶ |
| | | * |
| | | * @param processDefinitionId æµç¨å®ä¹id |
| | | */ |
| | | @Override |
| | | public String definitionXml(String processDefinitionId) { |
| | | StringBuilder xml = new StringBuilder(); |
| | | ProcessDefinition processDefinition = repositoryService.getProcessDefinition(processDefinitionId); |
| | | InputStream inputStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(), processDefinition.getResourceName()); |
| | | xml.append(IoUtil.read(inputStream, StandardCharsets.UTF_8)); |
| | | return xml.toString(); |
| | | } |
| | | |
| | | /** |
| | | * å 餿µç¨å®ä¹ |
| | | * |
| | | * @param deploymentIds é¨ç½²id |
| | | * @param processDefinitionIds æµç¨å®ä¹id |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean deleteDeployment(List<String> deploymentIds, List<String> processDefinitionIds) { |
| | | try { |
| | | List<HistoricProcessInstance> historicProcessInstances = QueryUtils.hisInstanceQuery().deploymentIdIn(deploymentIds).list(); |
| | | if (CollUtil.isNotEmpty(historicProcessInstances)) { |
| | | Set<String> defIds = StreamUtils.toSet(historicProcessInstances, HistoricProcessInstance::getProcessDefinitionId); |
| | | List<ProcessDefinition> processDefinitions = QueryUtils.definitionQuery().processDefinitionIds(defIds).list(); |
| | | if (CollUtil.isNotEmpty(processDefinitions)) { |
| | | Set<String> keys = StreamUtils.toSet(processDefinitions, ProcessDefinition::getKey); |
| | | throw new ServiceException("å½åã" + String.join(",", keys) + "ãæµç¨å®ä¹å·²è¢«ä½¿ç¨ä¸å¯å é¤ï¼"); |
| | | } |
| | | } |
| | | //å 餿µç¨å®ä¹ |
| | | for (String deploymentId : deploymentIds) { |
| | | repositoryService.deleteDeployment(deploymentId); |
| | | } |
| | | //å 餿µç¨å®ä¹é
ç½® |
| | | wfDefinitionConfigService.deleteByDefIds(processDefinitionIds); |
| | | //å é¤èç¹é
ç½® |
| | | wfNodeConfigService.deleteByDefIds(processDefinitionIds); |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new ServiceException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¿æ´»æè
æèµ·æµç¨å®ä¹ |
| | | * |
| | | * @param processDefinitionId æµç¨å®ä¹id |
| | | */ |
| | | @Override |
| | | public boolean updateDefinitionState(String processDefinitionId) { |
| | | try { |
| | | ProcessDefinition processDefinition = QueryUtils.definitionQuery() |
| | | .processDefinitionId(processDefinitionId).singleResult(); |
| | | //å°å½å为æèµ·ç¶ææ´æ°ä¸ºæ¿æ´»ç¶æ |
| | | //åæ°è¯´æï¼åæ°1ï¼æµç¨å®ä¹id,åæ°2ï¼æ¯å¦æ¿æ´»ï¼trueæ¯å¦çº§èå¯¹åºæµç¨å®ä¾ï¼æ¿æ´»äºåå¯¹åºæµç¨å®ä¾é½å¯ä»¥å®¡æ¹ï¼ï¼ |
| | | //åæ°3ï¼ä»ä¹æ¶åæ¿æ´»ï¼å¦æä¸ºnullåç«å³æ¿æ´»ï¼å¦æä¸ºå
·ä½æ¶é´åå°è¾¾æ¤æ¶é´åæ¿æ´» |
| | | if (processDefinition.isSuspended()) { |
| | | repositoryService.activateProcessDefinitionById(processDefinitionId, true, null); |
| | | } else { |
| | | repositoryService.suspendProcessDefinitionById(processDefinitionId, true, null); |
| | | } |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new ServiceException("æä½å¤±è´¥:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è¿ç§»æµç¨å®ä¹ |
| | | * |
| | | * @param currentProcessDefinitionId å½åæµç¨å®ä¹id |
| | | * @param fromProcessDefinitionId éè¦è¿ç§»å°çæµç¨å®ä¹id |
| | | */ |
| | | |
| | | @Override |
| | | public boolean migrationDefinition(String currentProcessDefinitionId, String fromProcessDefinitionId) { |
| | | try { |
| | | // è¿ç§»éªè¯ |
| | | boolean migrationValid = processMigrationService.createProcessInstanceMigrationBuilder() |
| | | .migrateToProcessDefinition(currentProcessDefinitionId) |
| | | .validateMigrationOfProcessInstances(fromProcessDefinitionId) |
| | | .isMigrationValid(); |
| | | if (!migrationValid) { |
| | | throw new ServiceException("æµç¨å®ä¹å·®å¼è¿å¤§æ æ³è¿ç§»ï¼è¯·ä¿®æ¹æµç¨å¾"); |
| | | } |
| | | // å·²ç»æçæµç¨å®ä¾ä¸ä¼è¿ç§» |
| | | processMigrationService.createProcessInstanceMigrationBuilder() |
| | | .migrateToProcessDefinition(currentProcessDefinitionId) |
| | | .migrateProcessInstances(fromProcessDefinitionId); |
| | | return true; |
| | | } catch (Exception e) { |
| | | throw new ServiceException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æµç¨å®ä¹è½¬æ¢ä¸ºæ¨¡å |
| | | * |
| | | * @param processDefinitionId æµç¨å®ä¹id |
| | | */ |
| | | @Override |
| | | public boolean convertToModel(String processDefinitionId) { |
| | | ProcessDefinition pd = QueryUtils.definitionQuery() |
| | | .processDefinitionId(processDefinitionId).singleResult(); |
| | | InputStream inputStream = repositoryService.getResourceAsStream(pd.getDeploymentId(), pd.getResourceName()); |
| | | ModelQuery query = QueryUtils.modelQuery(); |
| | | Model model = query.modelKey(pd.getKey()).singleResult(); |
| | | try { |
| | | if (ObjectUtil.isNotNull(model)) { |
| | | repositoryService.addModelEditorSource(model.getId(), IoUtil.readBytes(inputStream)); |
| | | } else { |
| | | Model modelData = repositoryService.newModel(); |
| | | modelData.setKey(pd.getKey()); |
| | | modelData.setName(pd.getName()); |
| | | modelData.setTenantId(pd.getTenantId()); |
| | | repositoryService.saveModel(modelData); |
| | | repositoryService.addModelEditorSource(modelData.getId(), IoUtil.readBytes(inputStream)); |
| | | } |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new ServiceException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éè¿zipæxmlé¨ç½²æµç¨å®ä¹ |
| | | * |
| | | * @param file æä»¶ |
| | | * @param categoryCode åç±» |
| | | */ |
| | | @SneakyThrows |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deployByFile(MultipartFile file, String categoryCode) { |
| | | |
| | | WfCategory wfCategory = wfCategoryService.queryByCategoryCode(categoryCode); |
| | | if (wfCategory == null) { |
| | | throw new ServiceException("æµç¨åç±»ä¸åå¨"); |
| | | } |
| | | // æä»¶åç¼å |
| | | String suffix = FileUtil.extName(file.getOriginalFilename()); |
| | | InputStream inputStream = file.getInputStream(); |
| | | if (FlowConstant.ZIP.equalsIgnoreCase(suffix)) { |
| | | ZipInputStream zipInputStream = null; |
| | | try { |
| | | zipInputStream = new ZipInputStream(inputStream); |
| | | ZipEntry zipEntry; |
| | | while ((zipEntry = zipInputStream.getNextEntry()) != null) { |
| | | String filename = zipEntry.getName(); |
| | | String[] splitFilename = filename.substring(0, filename.lastIndexOf(".")).split("-"); |
| | | //æµç¨åç§° |
| | | String processName = splitFilename[0]; |
| | | //æµç¨key |
| | | String processKey = splitFilename[1]; |
| | | ProcessDefinition oldProcessDefinition = QueryUtils.definitionQuery().processDefinitionKey(processKey).latestVersion().singleResult(); |
| | | DeploymentBuilder builder = repositoryService.createDeployment(); |
| | | Deployment deployment = builder.addInputStream(filename, zipInputStream) |
| | | .tenantId(TenantHelper.getTenantId()) |
| | | .name(processName).key(processKey).category(categoryCode).deploy(); |
| | | ProcessDefinition definition = QueryUtils.definitionQuery().deploymentId(deployment.getId()).singleResult(); |
| | | repositoryService.setProcessDefinitionCategory(definition.getId(), categoryCode); |
| | | setWfConfig(oldProcessDefinition, definition); |
| | | zipInputStream.closeEntry(); |
| | | } |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } finally { |
| | | if (zipInputStream != null) { |
| | | zipInputStream.close(); |
| | | } |
| | | } |
| | | //åå§åé
ç½®æ°æ®ï¼demo使ç¨ï¼ä¸ç¨å¯å é¤ï¼ |
| | | initWfDefConfig(); |
| | | } else { |
| | | String originalFilename = file.getOriginalFilename(); |
| | | String bpmnResourceSuffix = ResourceNameUtil.BPMN_RESOURCE_SUFFIXES[0]; |
| | | if (originalFilename.contains(bpmnResourceSuffix)) { |
| | | // æä»¶å = æµç¨åç§°-æµç¨key |
| | | String[] splitFilename = originalFilename.substring(0, originalFilename.lastIndexOf(".")).split("-"); |
| | | if (splitFilename.length < 2) { |
| | | throw new ServiceException("æä»¶å = æµç¨åç§°-æµç¨KEY"); |
| | | } |
| | | //æµç¨åç§° |
| | | String processName = splitFilename[0]; |
| | | //æµç¨key |
| | | String processKey = splitFilename[1]; |
| | | ProcessDefinition oldProcessDefinition = QueryUtils.definitionQuery().processDefinitionKey(processKey).latestVersion().singleResult(); |
| | | DeploymentBuilder builder = repositoryService.createDeployment(); |
| | | Deployment deployment = builder.addInputStream(originalFilename, inputStream) |
| | | .tenantId(TenantHelper.getTenantId()) |
| | | .name(processName).key(processKey).category(categoryCode).deploy(); |
| | | // æ´æ°åç±» |
| | | ProcessDefinition definition = QueryUtils.definitionQuery().deploymentId(deployment.getId()).singleResult(); |
| | | repositoryService.setProcessDefinitionCategory(definition.getId(), categoryCode); |
| | | setWfConfig(oldProcessDefinition, definition); |
| | | } else { |
| | | throw new ServiceException("æä»¶ç±»åä¸ä¼ é误ï¼"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * åå§åé
ç½®æ°æ®ï¼demo使ç¨ï¼ä¸ç¨å¯å é¤ï¼ |
| | | */ |
| | | private void initWfDefConfig() { |
| | | List<WfDefinitionConfig> wfDefinitionConfigs = wfDefinitionConfigMapper.selectList(); |
| | | if (CollUtil.isEmpty(wfDefinitionConfigs)) { |
| | | ProcessDefinition processDefinition = QueryUtils.definitionQuery().processDefinitionKey("leave1").latestVersion().singleResult(); |
| | | if (processDefinition != null) { |
| | | WfDefinitionConfigBo wfDefinitionConfigBo = new WfDefinitionConfigBo(); |
| | | wfDefinitionConfigBo.setDefinitionId(processDefinition.getId()); |
| | | wfDefinitionConfigBo.setProcessKey(processDefinition.getKey()); |
| | | wfDefinitionConfigBo.setTableName("test_leave"); |
| | | wfDefinitionConfigBo.setVersion(processDefinition.getVersion()); |
| | | wfDefinitionConfigService.saveOrUpdate(wfDefinitionConfigBo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 设置表åå
容 |
| | | * |
| | | * @param oldProcessDefinition é¨ç½²åææ°æµç¨å®ä¹ |
| | | * @param definition é¨ç½²åææ°æµç¨å®ä¹ |
| | | */ |
| | | private void setWfConfig(ProcessDefinition oldProcessDefinition, ProcessDefinition definition) { |
| | | //æ´æ°æµç¨å®ä¹è¡¨å |
| | | if (oldProcessDefinition != null) { |
| | | WfDefinitionConfigVo definitionVo = wfDefinitionConfigService.getByDefId(oldProcessDefinition.getId()); |
| | | if (definitionVo != null) { |
| | | wfDefinitionConfigService.deleteByDefIds(Collections.singletonList(oldProcessDefinition.getId())); |
| | | WfDefinitionConfigBo wfDefinitionConfigBo = new WfDefinitionConfigBo(); |
| | | wfDefinitionConfigBo.setDefinitionId(definition.getId()); |
| | | wfDefinitionConfigBo.setProcessKey(definition.getKey()); |
| | | wfDefinitionConfigBo.setTableName(definitionVo.getTableName()); |
| | | wfDefinitionConfigBo.setVersion(definition.getVersion()); |
| | | wfDefinitionConfigBo.setRemark(definitionVo.getRemark()); |
| | | wfDefinitionConfigService.saveOrUpdate(wfDefinitionConfigBo); |
| | | } |
| | | } |
| | | //æ´æ°æµç¨èç¹é
置表å |
| | | List<UserTask> userTasks = ModelUtils.getUserTaskFlowElements(definition.getId()); |
| | | UserTask applyUserTask = ModelUtils.getApplyUserTask(definition.getId()); |
| | | List<WfNodeConfig> wfNodeConfigList = new ArrayList<>(); |
| | | for (UserTask userTask : userTasks) { |
| | | if (StringUtils.isNotBlank(userTask.getFormKey()) && userTask.getFormKey().contains(StrUtil.COLON)) { |
| | | WfNodeConfig wfNodeConfig = new WfNodeConfig(); |
| | | wfNodeConfig.setNodeId(userTask.getId()); |
| | | wfNodeConfig.setNodeName(userTask.getName()); |
| | | wfNodeConfig.setDefinitionId(definition.getId()); |
| | | String[] split = userTask.getFormKey().split(StrUtil.COLON); |
| | | wfNodeConfig.setFormType(split[0]); |
| | | wfNodeConfig.setFormId(Long.valueOf(split[1])); |
| | | wfNodeConfig.setApplyUserTask(applyUserTask.getId().equals(userTask.getId()) ? FlowConstant.TRUE : FlowConstant.FALSE); |
| | | wfNodeConfigList.add(wfNodeConfig); |
| | | } |
| | | } |
| | | if (CollUtil.isNotEmpty(wfNodeConfigList)) { |
| | | wfNodeConfigService.saveOrUpdate(wfNodeConfigList); |
| | | } |
| | | } |
| | | } |