Commit bcc535e034c6af635097fde1a8a349ed3abe067e

Authored by YunaiV
1 parent 8f994af7

【功能评审】Bpm:跳过表达式

yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmnVariableConstants.java
@@ -43,6 +43,13 @@ public class BpmnVariableConstants { @@ -43,6 +43,13 @@ public class BpmnVariableConstants {
43 * @see ProcessInstance#getProcessVariables() 43 * @see ProcessInstance#getProcessVariables()
44 */ 44 */
45 public static final String PROCESS_INSTANCE_VARIABLE_RETURN_FLAG = "RETURN_FLAG_%s"; 45 public static final String PROCESS_INSTANCE_VARIABLE_RETURN_FLAG = "RETURN_FLAG_%s";
  46 + /**
  47 + * 流程实例的变量 - 是否跳过表达式
  48 + *
  49 + * @see ProcessInstance#getProcessVariables()
  50 + * @see <a href="https://blog.csdn.net/weixin_42065235/article/details/126039993">Flowable/Activiti之SkipExpression 完成自动审批</a>
  51 + */
  52 + public static final String PROCESS_INSTANCE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";
46 53
47 /** 54 /**
48 * 任务的变量 - 状态 55 * 任务的变量 - 状态
@@ -63,6 +70,4 @@ public class BpmnVariableConstants { @@ -63,6 +70,4 @@ public class BpmnVariableConstants {
63 */ 70 */
64 public static final String TASK_SIGN_PIC_URL = "TASK_SIGN_PIC_URL"; 71 public static final String TASK_SIGN_PIC_URL = "TASK_SIGN_PIC_URL";
65 72
66 - public static final String PROCESS_INSTANCE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";  
67 -  
68 } 73 }
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
@@ -595,7 +595,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService @@ -595,7 +595,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
595 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_ID, userId); // 设置流程变量,发起人 ID 595 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_ID, userId); // 设置流程变量,发起人 ID
596 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中 596 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_STATUS, // 流程实例状态:审批中
597 BpmProcessInstanceStatusEnum.RUNNING.getStatus()); 597 BpmProcessInstanceStatusEnum.RUNNING.getStatus());
598 - variables.put(BpmnVariableConstants.PROCESS_INSTANCE_SKIP_EXPRESSION_ENABLED, true); // 跳过表达式需要添加此变量为 true,不影响没配置skipExpression的节点 598 + variables.put(BpmnVariableConstants.PROCESS_INSTANCE_SKIP_EXPRESSION_ENABLED, true); // 跳过表达式需要添加此变量为 true,不影响没配置 skipExpression 的节点
599 if (CollUtil.isNotEmpty(startUserSelectAssignees)) { 599 if (CollUtil.isNotEmpty(startUserSelectAssignees)) {
600 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees); 600 variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, startUserSelectAssignees);
601 } 601 }