|
@@ -9,6 +9,7 @@ import com.ruoyi.execution.produce.dispersed.runbpm.RunImplementationClass;
|
|
|
import com.ruoyi.system.entity.BpmNodeHandleUser;
|
|
|
import com.ruoyi.system.entity.BpmNodeScriptRelevance;
|
|
|
import com.ruoyi.system.entity.BpmProcessConfiguration;
|
|
|
+import com.ruoyi.system.entity.DragForm;
|
|
|
import com.ruoyi.system.service.IBpmNodeHandleUserService;
|
|
|
import com.ruoyi.system.service.IBpmNodeScriptRelevanceService;
|
|
|
import com.ruoyi.system.service.IBpmProcessConfigurationService;
|
|
@@ -51,6 +52,8 @@ public class VerifyExecutionProcess {
|
|
|
/*
|
|
|
判断是否有开始结束节点,有,循环判断每一个节点是否包含自动执行脚本,并且脚本是否存在,
|
|
|
节点是否绑定角色权限,真实角色下是否存在可处理用户,虚拟角色下用户是否都真实存在
|
|
|
+ node_form_type类型为拖拽表单类型,查看该表单信息是否存在;为组合表单类型查看该表格组信息是否存在;
|
|
|
+ 为自定义表单类型时,判断节点脚本关联表查看script_node_name该字段是否存在及该字段是否有“-”,"-"前是否有内容。
|
|
|
*/
|
|
|
public boolean VerifyProcessData(String processKey) {
|
|
|
// 根据流程编号(node_process_key)查询流程配置表(bpm_process_configuration)得到该流程所有节点信息
|
|
@@ -123,6 +126,46 @@ public class VerifyExecutionProcess {
|
|
|
}else {
|
|
|
return false;
|
|
|
}
|
|
|
+ //判断当前节点是否是自定义表单类型,是判断该名称是否存在&& '-' 前是否有内容
|
|
|
+ if (b.getNodeFormType().equals("designForm")) {
|
|
|
+ BpmNodeScriptRelevance bpmNodeScriptRelevance = new BpmNodeScriptRelevance();
|
|
|
+ bpmNodeScriptRelevance.setScriptNodeFormType("designForm");
|
|
|
+ bpmNodeScriptRelevance.setNodeKey(b.getNodeKey());
|
|
|
+ List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList = bpmNodeScriptRelevanceService.selectBpmNodeScriptRelevanceList(bpmNodeScriptRelevance);
|
|
|
+ for (BpmNodeScriptRelevance bpmNodeScriptRelevance1 : bpmNodeScriptRelevanceList){
|
|
|
+ if(bpmNodeScriptRelevance1.getScriptNodeName().isEmpty()){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ int separatorIndex = bpmNodeScriptRelevance1.getScriptNodeName().indexOf('-');
|
|
|
+ if(separatorIndex <= -1){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ String scriptNodeName = bpmNodeScriptRelevance1.getScriptNodeName().substring(0,bpmNodeScriptRelevance1.getScriptNodeName().indexOf('-'));
|
|
|
+ if (scriptNodeName.isEmpty()){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //判断当前节点是否是拖拽表单类型,是查询drag_form表查看该表单是否存在
|
|
|
+ if (b.getNodeFormType().equals("dragForm")) {
|
|
|
+ ResponseEntity<AjaxResult> responseEntity = sending.sendGetFormInfo(Long.valueOf(b.getNodeFormKey()));
|
|
|
+ if (responseEntity.getStatusCodeValue() != 200){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(! responseEntity.getBody().containsKey("data")){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //判断当前节点是否是组合表单类型,是查询drag_table_group表查看该表单是否存在
|
|
|
+ if (b.getNodeFormType().equals("composeForm")) {
|
|
|
+ ResponseEntity<AjaxResult> responseEntity = sending.sendGetGroupInfo(b.getNodeFormKey());
|
|
|
+ if (responseEntity.getStatusCodeValue() != 200){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(! responseEntity.getBody().containsKey("data")){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (b.getNodeType().equals("startEvent")) startNode++;
|
|
|
if (b.getNodeType().equals("endEvent")) endNode++;
|
|
|
}
|