增加流程模型实体激活或挂起后端逻辑

pull/2/head
zhujiqian 2021-09-07 23:40:18 +08:00
parent e8b3f355e6
commit 1bb10d007e
3 changed files with 65 additions and 1 deletions

View File

@ -0,0 +1,29 @@
package cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.process;
/**
* activiti ProcessDefinition
*
* @author ZJQ
* @date 2021/9/7 23:23
*/
public class ProcessDefinitionDO {
private String id;
private String category;
private String key;
private String name;
private String version;
private String resourceName;
private String deploymentId;
private String diagramResourceName;
private boolean suspended;
}

View File

@ -11,8 +11,19 @@ import org.springframework.web.multipart.MultipartFile;
public interface ProcessService { public interface ProcessService {
/** /**
* *
* @param multipartFile * @param multipartFile
*/ */
void deployProcess(MultipartFile multipartFile); void deployProcess(MultipartFile multipartFile);
/**
*
* @param processDefinitionId id
* @param type
* @return
*/
String setActivOrHang(String processDefinitionId,String type);
} }

View File

@ -54,6 +54,30 @@ public class ProcessServiceImpl implements ProcessService {
} }
} }
/**
*
* @param processDefinitionId id
* @param type
* @return
*/
@Override
public String setActivOrHang(String processDefinitionId, String type) {
String result = "无操作";
switch (type){
case "active":
repositoryService.activateProcessDefinitionById(processDefinitionId,true,null);
result = "已激活ID为【"+processDefinitionId+"】的流程模型实例";
break;
case "suspend":
repositoryService.suspendProcessDefinitionById(processDefinitionId,true,null);
result = "已挂起ID为【"+processDefinitionId+"】的流程模型实例";
break;
default:
break;
}
return result;
}
/** /**
* *