mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
增加流程模型实体激活或挂起后端逻辑
This commit is contained in:
parent
e8b3f355e6
commit
1bb10d007e
@ -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;
|
||||
|
||||
}
|
@ -11,8 +11,19 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
public interface ProcessService {
|
||||
|
||||
/**
|
||||
* 上传流程文件,进行流程部署
|
||||
* 上传流程文件,进行流程模型部署
|
||||
* @param multipartFile 上传文件
|
||||
*/
|
||||
void deployProcess(MultipartFile multipartFile);
|
||||
|
||||
|
||||
/**
|
||||
* 激活或者挂起流程模型实体
|
||||
* @param processDefinitionId 流程模型实体id
|
||||
* @param type 类型
|
||||
* @return 状态
|
||||
*/
|
||||
String setActivOrHang(String processDefinitionId,String type);
|
||||
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据上传文件类型对应实现不同方式的流程部署
|
||||
|
Loading…
Reference in New Issue
Block a user