package com.qqchen.deploy.backend.workflow.enums;

import lombok.Getter;
import org.flowable.bpmn.model.EndEvent;
import org.flowable.bpmn.model.ExclusiveGateway;
import org.flowable.bpmn.model.ScriptTask;
import org.flowable.bpmn.model.ServiceTask;
import org.flowable.bpmn.model.StartEvent;
import org.flowable.bpmn.model.UserTask;

/**
 * BPMN节点类型枚举
 */
@Getter
public enum BpmnNodeTypeEnums {

    START_EVENT("startEvent", StartEvent.class),

    END_EVENT("endEvent", EndEvent.class),

    USER_TASK("userTask", UserTask.class),

    SERVICE_TASK("serviceTask", ServiceTask.class),

    SCRIPT_TASK("scriptTask", ScriptTask.class),

    EXCLUSIVE_GATEWAY("exclusiveGateway", ExclusiveGateway.class);

    private final String bpmnType;

    private final Object instance;

    BpmnNodeTypeEnums(String bpmnType, Object instance) {
        this.bpmnType = bpmnType;
        this.instance = instance;
    }


    /**
     * Flowable 主要的节点类型包括：
     *
     * 事件类型：
     * StartEvent (开始事件)
     * EndEvent (结束事件)
     * TimerStartEvent (定时开始事件)
     * ErrorStartEvent (错误开始事件)
     * MessageStartEvent (消息开始事件)
     * SignalStartEvent (信号开始事件)
     * IntermediateCatchEvent (中间捕获事件)
     * IntermediateThrowEvent (中间抛出事件)
     * 任务类型：
     * UserTask (用户任务)
     * ServiceTask (服务任务)
     * ScriptTask (脚本任务)
     * MailTask (邮件任务)
     * ManualTask (手动任务)
     * ReceiveTask (接收任务)
     * BusinessRuleTask (业务规则任务)
     * CallActivity (调用活动)
     * 网关类型：
     * ExclusiveGateway (排他网关)
     * ParallelGateway (并行网关)
     * InclusiveGateway (包容网关)
     * EventBasedGateway (事件网关)
     * ComplexGateway (复杂网关)
     * 子流程：
     * SubProcess (子流程)
     * EventSubProcess (事件子流程)
     * Transaction (事务子流程)
     * 边界事件：
     * BoundaryEvent (边界事件)
     * ErrorBoundaryEvent (错误边界事件)
     * TimerBoundaryEvent (定时边界事件)
     * SignalBoundaryEvent (信号边界事件)
     * 连线：
     * SequenceFlow (顺序流)
     * MessageFlow (消息流)
     */
} 