feat(流程设计): 流程设计添加是否 节点表单 选项。若为节点表单,则表单信息仅在此节点可用,默认为全局表单,表单信息在整个流程实例中可用。

This commit is contained in:
konbai
2023-01-15 00:51:43 +08:00
parent 1ba6327747
commit b2b0d91ad8
6 changed files with 123 additions and 16 deletions

View File

@@ -62,6 +62,11 @@ public class ProcessConstants {
*/
public static final String PROCESS_CUSTOM_USER_TYPE = "userType";
/**
* 自定义属性 localScope
*/
public static final String PROCESS_FORM_LOCAL_SCOPE = "localScope";
/**
* 流程跳过

View File

@@ -130,6 +130,35 @@ public class ModelUtils {
return null;
}
/**
* 获取流程元素信息
*
* @param model bpmnModel对象
* @param flowElementId 元素ID
* @return 元素信息
*/
public static FlowElement getFlowElementById(BpmnModel model, String flowElementId) {
Process process = model.getMainProcess();
return process.getFlowElement(flowElementId);
}
/**
* 获取元素表单Key限开始节点和用户节点可用
*
* @param flowElement 元素
* @return 表单Key
*/
public static String getFormKey(FlowElement flowElement) {
if (flowElement != null) {
if (flowElement instanceof StartEvent) {
return ((StartEvent) flowElement).getFormKey();
} else if (flowElement instanceof UserTask) {
return ((UserTask) flowElement).getFormKey();
}
}
return null;
}
/**
* 获取开始节点属性值
* @param model bpmnModel对象