package cn.axzo.workflow.common.constant;

public interface BpmnConstants {

    String BPMN_FILE_SUFFIX = ".bpmn";
    String FORM_FILE_SUFFIX = ".form";
    String SERVER_APP_ID = "server-app-id";
    /**
     * 引擎自己的隐藏指令
     */
    String FLOWABLE_SKIP_EXPRESSION_ENABLE = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";
    /**
     * 指定单位标识
     */
    String INTERNAL_EXECUTIVE_UNIT_ID = "_INTERNAL_EXECUTIVE_UNIT_ID";

    String INTERNAL_INITIATOR = "_INTERNAL_INITIATOR";
    String INTERNAL_INITIATOR_OU_ID = "_INTERNAL_INITIATOR_OU_ID";
    String INTERNAL_INITIATOR_OU_NAME = "_INTERNAL_INITIATOR_OU_NAME";
    String INTERNAL_END_USER_ID = "_INTERNAL_END_USER_ID";
    String INTERNAL_END_TENANT_ID = "_INTERNAL_END_TENANT_ID";
    String INTERNAL_END_USER_NAME = "_INTERNAL_END_USER_NAME";
    String INTERNAL_TASK_COMMENT = "_INTERNAL_CUSTOM_TASK_COMMENT";
    String INTERNAL_DELETE_PROCESS_FLAG = "_INTERNAL_DELETE_PROCESS_FLAG";
    String INTERNAL_PROCESS_TYPE_CANCEL = "_INTERNAL_PROCESS_TYPE_CANCEL";
    String INTERNAL_PROCESS_TYPE_REJECT = "_INTERNAL_PROCESS_TYPE_REJECT";
    String INTERNAL_SPECIFY_NEXT_APPROVER = "_INTERNAL_SPECIFY_NEXT_APPROVER";
    String BIZ_ORG_RELATION = "_BIZ_ORG_RELATION";
    //    String INTERNAL_TASK_RELATION_ASSIGNEE_INFO = "[_ASSIGNEE_INFO_]";
    // 用于多实例审批时,保存计算出来的审批人
    String INTERNAL_TASK_RELATION_ASSIGNEE_LIST_INFO = "[_ASSIGNEE_LIST_INFO_]";
    // 单任务节点,
    String INTERNAL_TASK_RELATION_ASSIGNEE_INFO_SNAPSHOT = "[_ASSIGNEE_INFO_SNAPSHOT_]";
    String INTERNAL_TASK_RELATION_ASSIGNEE_LIST_INFO_SNAPSHOT = "[_ASSIGNEE_LIST_INFO_SNAPSHOT_]";

    String COUNTERSIGN_REMAIN_ASSIGNER_LIST = "COUNTERSIGN_REMAIN_ASSIGNER_LIST";
    String COUNTERSIGN_ORIGIN_ASSIGNER = "COUNTERSIGN_ORIGIN_ASSIGNER";

    String PROCESS_PREFIX = "Flowable";
    String FLOW_NODE_JSON = "jsonValue";
    String FLOW_SERVER_VERSION = "serverVersion";
    String FLOW_SERVER_VERSION_121 = "1.2.1";
    String CONFIG_NOTICE = "noticeConfig";
    String TEMPLATE_NOTICE_MESSAGE_ID = "noticeMessageId";
    String TEMPLATE_PENDING_MESSAGE_ID = "pendingMessageId";
    String TEMPLATE_SMS_MESSAGE_ID = "smsMessageId";
    String CONFIG_BUTTON = "buttonConfig";
    String CONFIG_BUTTON_META = "button";
    String CONFIG_FIELD = "fieldConfig";
    String CONFIG_APPROVAL_METHOD = "approvalMethod";
    String CONFIG_APPROVER_SCOPE = "approverScope";
    String CONFIG_APPROVER_SPECIFY = "approverSpecify";
    String CONFIG_APPROVER_MODE_TYPE = "approverModeType";
    String CONFIG_APPROVER_EMPTY_HANDLE_TYPE = "approverEmptyHandleType";
    String CONFIG_FIELD_META = "field";
    String CONFIG_FIELD_PERMISSION = "fieldPermission";
    String CONFIG_FIELD_OPTION = "option";
    String CONFIG_NODE_TYPE = "nodeType";
    String CONFIG_BUTTON_TYPE_INITIATOR = "initiator";
    String CONFIG_BUTTON_TYPE_CURRENT = "current";
    String CONFIG_BUTTON_TYPE_HISTORY = "history";
    String CONFIG_BUTTON_TYPE_CARBON_COPY = "carbonCopy";

    String ELEMENT_ATTRIBUTE_NAME = "name";
    String ELEMENT_ATTRIBUTE_VALUE = "value";
    String ELEMENT_ATTRIBUTE_DESC = "desc";
    String ELEMENT_ATTRIBUTE_CODE = "code";
    String ELEMENT_ATTRIBUTE_KEY = "key";
    String ELEMENT_ATTRIBUTE_ORDER = "order";
    String ELEMENT_ATTRIBUTE_CHECKED = "checked";
    String ELEMENT_ATTRIBUTE_DISABLED = "disabled";
    String ELEMENT_ATTRIBUTE_TYPE = "type";
    String START_EVENT_ID = "startEventNode";
    String SEQUENCE_FLOW_ID = "SequenceFlowId";
    String END_EVENT_ID = "endEventNode";
    String BPM_MODEL_CATEGORY = "bpm_model_category";
    String BPM_ALLOW_SKIP_USER_TASK = "_INTERNAL_SKIP_USER_TASK";
    /**
     * 用于国内审批节点填写审批建议
     * <p>
     * 其他类型 @see org.flowable.engine.impl.persistence.entity.CommentEntity
     */
    String COMMENT_TYPE_ADVICE = "advice";

    String INITIATOR_REVOKE_THE_APPROVAL = "发起人主动撤销审批";
    String APPROVAL_ENDS_AUTOMATICALLY = "审批拒绝自动结束";

    String NUMBER_OF_INSTANCES = "nrOfInstances";
    String MULTI_INSTANCE_LOOP_COUNTER = "loopCounter";
    String TASK_COMPLETE_OPERATION_TYPE = "_TASK_COMPLETE_TYPE";
    /**
     * 会签表达式
     */
    String AND_SIGN_EXPRESSION = "${nrOfInstances == nrOfCompletedInstances}";

    /**
     * 或签表达式
     */
    String OR_SIGN_EXPRESSION = "${nrOfCompletedInstances > 0}";

    /**
     * 全局的启用/上架等状态描述
     */
    Integer ENABLED = 1;

    /**
     * 全局的停用/下架等状态描述
     */
    Integer DISABLED = 0;
}
