package cn.fateverse.workflow.enums;

import org.flowable.bpmn.model.*;

/**
 * 流程节点枚举
 *
 * @author Clay
 * @date 2022/12/23
 */
public enum ProcessNodeEnum {
    /**
     * 节点类型
     */
    ROOT("ROOT", "开始分支", UserTask.class),
    END("END", "结束分支", Object.class),
    APPROVAL("APPROVAL", "审核节点", UserTask.class),
    CC("CC", "抄送", ServiceTask.class),
    DELAY("DELAY", "延时等待", IntermediateCatchEvent.class),
    TRIGGER("TRIGGER", "触发器", ServiceTask.class),
    MERGE("MERGE", "并行节点", Object.class),
    EMPTY("EMPTY", "空节点", Object.class),
    CONDITION("CONDITION", "条件分支", ExclusiveGateway.class),
    CONDITIONS("CONDITIONS", "多条件分支", ExclusiveGateway.class),
    CONCURRENTS("CONCURRENTS", "并行分支", ParallelGateway.class),
    CONCURRENT("CONCURRENT", "并行分支", SequenceFlow.class),
    ;

    private final String type;
    private final String name;
    private final Class<?> typeClass;


    ProcessNodeEnum(String type, String name, Class<?> typeClass) {
        this.type = type;
        this.name = name;
        this.typeClass = typeClass;
    }

    public String getType() {
        return type;
    }

    public Class<?> getTypeClass() {
        return typeClass;
    }

    public String getName() {
        return name;
    }
}
