代码重构
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
package com.gear.flowable.common.constant;
|
||||
|
||||
/**
|
||||
* 流程常量信息
|
||||
*
|
||||
* @author Xuan xuan
|
||||
* @date 2021/4/17 22:46
|
||||
*/
|
||||
public class ProcessConstants {
|
||||
|
||||
public static final String SUFFIX = ".bpmn";
|
||||
|
||||
/**
|
||||
* 动态数据
|
||||
*/
|
||||
public static final String DATA_TYPE = "dynamic";
|
||||
|
||||
/**
|
||||
* 单个审批人
|
||||
*/
|
||||
public static final String USER_TYPE_ASSIGNEE = "assignee";
|
||||
|
||||
|
||||
/**
|
||||
* 候选人
|
||||
*/
|
||||
public static final String USER_TYPE_USERS = "candidateUsers";
|
||||
|
||||
|
||||
/**
|
||||
* 审批组
|
||||
*/
|
||||
public static final String USER_TYPE_ROUPS = "candidateGroups";
|
||||
|
||||
/**
|
||||
* 单个审批人
|
||||
*/
|
||||
public static final String PROCESS_APPROVAL = "approval";
|
||||
|
||||
/**
|
||||
* 会签人员
|
||||
*/
|
||||
public static final String PROCESS_MULTI_INSTANCE_USER = "userList";
|
||||
|
||||
/**
|
||||
* nameapace
|
||||
*/
|
||||
public static final String NAMASPASE = "http://flowable.org/bpmn";
|
||||
|
||||
/**
|
||||
* 会签节点
|
||||
*/
|
||||
public static final String PROCESS_MULTI_INSTANCE = "multiInstance";
|
||||
|
||||
/**
|
||||
* 自定义属性 dataType
|
||||
*/
|
||||
public static final String PROCESS_CUSTOM_DATA_TYPE = "dataType";
|
||||
|
||||
/**
|
||||
* 自定义属性 userType
|
||||
*/
|
||||
public static final String PROCESS_CUSTOM_USER_TYPE = "userType";
|
||||
|
||||
/**
|
||||
* 自定义属性 localScope
|
||||
*/
|
||||
public static final String PROCESS_FORM_LOCAL_SCOPE = "localScope";
|
||||
|
||||
/**
|
||||
* 自定义属性 流程状态
|
||||
*/
|
||||
public static final String PROCESS_STATUS_KEY = "processStatus";
|
||||
|
||||
|
||||
/**
|
||||
* 流程跳过
|
||||
*/
|
||||
public static final String FLOWABLE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.gear.flowable.common.constant;
|
||||
|
||||
/**
|
||||
* @author konbai
|
||||
* @createTime 2022/4/24 13:24
|
||||
*/
|
||||
public class TaskConstants {
|
||||
|
||||
/**
|
||||
* 流程发起人
|
||||
*/
|
||||
public static final String PROCESS_INITIATOR = "initiator";
|
||||
|
||||
/**
|
||||
* 角色候选组前缀
|
||||
*/
|
||||
public static final String ROLE_GROUP_PREFIX = "ROLE";
|
||||
|
||||
/**
|
||||
* 部门候选组前缀
|
||||
*/
|
||||
public static final String DEPT_GROUP_PREFIX = "DEPT";
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.gear.flowable.common.enums;
|
||||
|
||||
/**
|
||||
* 流程意见类型
|
||||
*
|
||||
* @author Xuan xuan
|
||||
* @date 2021/4/19
|
||||
*/
|
||||
public enum FlowComment {
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
NORMAL("1", "正常"),
|
||||
REBACK("2", "退回"),
|
||||
REJECT("3", "驳回"),
|
||||
DELEGATE("4", "委派"),
|
||||
TRANSFER("5", "转办"),
|
||||
STOP("6", "终止"),
|
||||
REVOKE("7", "撤回");
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private final String type;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private final String remark;
|
||||
|
||||
FlowComment(String type, String remark) {
|
||||
this.type = type;
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.gear.flowable.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author KonBAI
|
||||
* @createTime 2022/6/28 9:51
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum FormType {
|
||||
|
||||
/**
|
||||
* 流程表单
|
||||
*/
|
||||
PROCESS(0),
|
||||
|
||||
/**
|
||||
* 外置表单
|
||||
*/
|
||||
EXTERNAL(1),
|
||||
|
||||
/**
|
||||
* 节点独立表单
|
||||
*/
|
||||
INDEPENDENT(2);
|
||||
|
||||
/**
|
||||
* 表单类型
|
||||
*/
|
||||
private final Integer type;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.gear.flowable.common.enums;
|
||||
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author konbai
|
||||
* @since 2023/3/9 00:45
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProcessStatus {
|
||||
|
||||
/**
|
||||
* 进行中(审批中)
|
||||
*/
|
||||
RUNNING("running"),
|
||||
/**
|
||||
* 已终止
|
||||
*/
|
||||
TERMINATED("terminated"),
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
COMPLETED("completed"),
|
||||
/**
|
||||
* 已取消
|
||||
*/
|
||||
CANCELED("canceled");
|
||||
|
||||
private final String status;
|
||||
|
||||
public static ProcessStatus getProcessStatus(String str) {
|
||||
if (StringUtils.isNotBlank(str)) {
|
||||
for (ProcessStatus value : values()) {
|
||||
if (StringUtils.equalsIgnoreCase(str, value.getStatus())) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user