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 DOT = ".";
    /**
     * 引擎自己的隐藏指令
     */
    String ADSCRIPTION_TENANT_ID = "adscriptionTenantId";
    String FLOWABLE_SKIP_EXPRESSION_ENABLE = "[_FLOWABLE_SKIP_EXPRESSION_ENABLED_]";
    String MQ_UNIQUE_ID = "[_MQ_UNIQUE_ID_]";
    String PROCESS_OWNERSHIP_APPLICATION = "[_PROCESS_OWNERSHIP_APPLICATION_]";
    String WORKFLOW_ENGINE_VERSION = "[_WORKFLOW_ENGINE_VERSION_]";
    String INTERNAL_INITIATOR = "[_INTERNAL_INITIATOR_]";
    @Deprecated
    String OLD_INTERNAL_INITIATOR = "_INTERNAL_INITIATOR";
    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_INITIATOR_OU_ID = "[_INTERNAL_INITIATOR_OU_ID_]";
    String INTERNAL_INITIATOR_OU_NAME = "[_INTERNAL_INITIATOR_OU_NAME_]";
    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_PROCESS_TYPE_ABORT = "[_INTERNAL_PROCESS_TYPE_ABORT_]";
    String INTERNAL_SPECIFY_NEXT_APPROVER = "[_INTERNAL_SPECIFY_NEXT_APPROVER_]";
    // 取消/驳回/中止时,记录原因
    String INTERNAL_PROCESS_DELETE_REASON = "[_INTERNAL_PROCESS_DELETE_REASON_]";
    String BIZ_ORG_RELATION = "[_BIZ_ORG_RELATION_]";
    String PENDING_TEMPLATE_VARIABLE = "[_PENDING_VARIABLES]";
    String INTERNAL_PROCESS_AGENT = "[_INTERNAL_PROCESS_AGENT]";
    String CREATE_INSTANCE_PARAMS = "[_CREATE_INSTANCE_PARAMS]";
    String INTERNAL_PROCESS_WORKSPACE_TYPE = "[_INTERNAL_PROCESS_WORKSPACE_TYPE]";
    String INTERNAL_PROCESS_BIZ_TYPE = "[_INTERNAL_PROCESS_BIZ_TYPE]";
    // 用于多实例审批时,保存计算出来的审批人
    String INTERNAL_TASK_RELATION_ASSIGNEE_LIST_INFO = "[_ASSIGNEE_LIST_INFO_]";
    // 单任务节点,
    String INTERNAL_TASK_RELATION_ASSIGNEE_INFO = "[_ASSIGNEE_INFO_]";
    @Deprecated
    String OLD_INTERNAL_TASK_RELATION_ASSIGNEE_INFO_SNAPSHOT = "[_ASSIGNEE_INFO_SNAPSHOT_]";
    String INTERNAL_ACTIVITY_RELATION_ASSIGNEE_LIST_INFO_SNAPSHOT = "[_ACTIVITY_INFO_SNAPSHOT_]";
    String BIZ_NODE_ALTER = "[_BIZ_NODE_ALTER_]";
    String INITIATOR_SPECIFY = "[_INITIATOR_SPECIFY_]";
    String SIGNATURE_COLLECTION = "[_SIGNATURE_COLLECTION_]";
    String PROCESS_PREFIX = "Flowable";
    @Deprecated
    String OLD_TASK_ASSIGNEE_SKIP_FLAT = "taskSkip";
    String TASK_ASSIGNEE_SKIP_FLAT = "_skip_";
    String DUMMY_ASSIGNEE = "biz";
    String DUMMY_ASSIGNEE_TYPE = TASK_ASSIGNEE_SKIP_FLAT;
    String ROBOT_ASSIGNEE = "robot";
    String ROBOT_ASSIGNEE_TYPE = TASK_ASSIGNEE_SKIP_FLAT;
    String NO_TENANT_ID = "";
    String DUMMY_ASSIGNEE_ID = NO_TENANT_ID + "|" + DUMMY_ASSIGNEE + "|" + DUMMY_ASSIGNEE_TYPE;
    String ROBOT_ASSIGNEE_ID = NO_TENANT_ID + "|" + ROBOT_ASSIGNEE + "|" + ROBOT_ASSIGNEE_TYPE;
    String HIDDEN_ASSIGNEE_ID = NO_TENANT_ID + "|hidden|" + TASK_ASSIGNEE_SKIP_FLAT;
    String NO_ASSIGNEE = "|";
    String FLOW_MODEL_BIZ_TYPE = "modelType";
    String FLOW_NODE_JSON = "jsonValue";
    String FLOW_SERVER_VERSION = "serverVersion";
    String FLOW_SERVER_VERSION_121 = "1.2.1";
    String FLOW_SERVER_VERSION_130 = "1.3.0";
    // 1.4.2 开始启用新版本日志
    String FLOW_SERVER_VERSION_142 = "1.4.2";
    String FLOW_CATEGORY_VERSION = "categoryVersion";
    String CONFIG_SIGN = "signConfig";
    String CONFIG_NOTICE = "noticeConfig";
    String CONFIG_APPROVE = "approveConfig";
    String TEMPLATE_NOTICE_MESSAGE_CONFIG = "noticeMessageConfig";
    String TEMPLATE_NOTICE_MESSAGE_EVENTS = "noticeMessageEvents";
    String TEMPLATE_NOTICE_MESSAGE_DESTINATION = "noticeMessageDestination";
    String TEMPLATE_NOTICE_MESSAGE_DESTINATION_INITIATOR = "initiator";
    String TEMPLATE_NOTICE_MESSAGE_DESTINATION_HISTORIES = "histories";
    String TEMPLATE_NOTICE_MESSAGE_DESTINATION_ROLES = "roles";
    String TEMPLATE_NOTICE_MESSAGE_DESTINATION_POSITIONS = "positions";
    String TEMPLATE_NOTICE_MESSAGE_DESTINATION_ASSIGNERS = "assigners";
    String TEMPLATE_PENDING_MESSAGE_ID = "pendingMessageId";
    String TEMPLATE_SIGN_PENDING_MESSAGE_ID = "signPendingMessageId";
    String TEMPLATE_CARBON_COPY_MESSAGE_ID = "carbonCopyMessageId";
    String TEMPLATE_SMS_MESSAGE_ID = "smsMessageId";
    String TEMPLATE_UPGRADE_APPROVAL_CONF = "upgradeApprovalConf";
    String TEMPLATE_UPGRADE_APPROVAL_LIMIT_CONF = "limitConfig";
    String TEMPLATE_UPGRADE_APPROVAL_SPECIFY_VALUE = "specifyValue";
    String APPROVE_SUPPORT_BATCH_OPERATION = "supportBatchOperation";
    String APPROVE_USER_AGREE_SIGNATURE = "userAgreeSignature";
    String CONFIG_BUTTON = "buttonConfig";
    String CONFIG_CARBON_COPIES = "carbonCopyConfigs";
    String CONFIG_CARBON_COPY = "carbonCopyConfig";
    String CONFIG_CARBON_COPY_OBJECT = "carbonCopyObject";
    String CONFIG_CARBON_COPY_SPECIFY = "carbonCopySpecify";
    String CONFIG_CARBON_COPY_TEMPLATE_CODE = "carbonCopyTemplateCode";
    String CONFIG_BUTTON_META = "button";
    String CONFIG_FIELD = "fieldConfig";
    String CONFIG_APPROVAL_METHOD = "approvalMethod";
    String CONFIG_SIGN_APPROVER_LIMIT = "signApproverLimit";
    String CONFIG_SIGN_APPROVER_ORG_LIMIT = "orgLimit";
    String CONFIG_SIGN_APPROVER_ROLE_LIMIT = "roleLimit";
    String CONFIG_APPROVER_SCOPE = "approverScope";
    String CONFIG_APPROVER_SPECIFY = "approverSpecify";
    String CONFIG_APPROVE_SPECIFY_RANGE = "approverSpecifyRange";
    String CONFIG_APPROVE_SPECIFY_COOPERATE_TYPE = "approverSpecifyCooperateType";
    String CONFIG_APPROVE_SPECIFY_RANGE_ORG_LIMIT = "approverSpecifyRangeOrgLimit";
    String CONFIG_APPROVE_SPECIFY_RANGE_UNIT = "approverSpecifyRangeUnit";
    String CONFIG_INITIATOR_SPECIFIED_RANGE = "initiatorSpecifiedRange";
    String CONFIG_INITIATOR_SPECIFIED_FILTER = "initiatorSpecifiedFilter";
    String CONFIG_INITIATOR_SPECIFIED_EXCLUDE_IDENTITY_TYPES = "excludeIdentityTypes";
    String CONFIG_INITIATOR_SPECIFIED_EXCLUDE_COOPERATE_TYPES = "excludeCooperateShipTypes";
    String CONFIG_INITIATOR_LEADER_RANGE_UNIT = "initiatorLeaderRangeUnit";
    String CONFIG_APPROVER_MODE_TYPE = "approverModeType";
    String CONFIG_APPROVER_EMPTY_HANDLE_TYPE = "approverEmptyHandleType";
    String CONFIG_ACTIVITY_SIGNATURE = "signature";
    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 CONFIG_SIGN_TYPE = "signType";
    String CONFIG_AREA_FILTER_ENABLE = "areaFilterEnable";
    String CONFIG_SPECIALTY_FILTER_ENABLE = "specialtyFilterEnable";
    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 ELEMENT_ATTRIBUTE_ORG_LIMIT = "orgLimit";
    String ELEMENT_ATTRIBUTE_APPROVER_SPECIFY = "approverSpecify";
    String ELEMENT_ATTRIBUTE_APPROVER_SPECIFY_RANGE = "approverSpecifyRange";
    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_";
    String AUTO_APPROVAL_TYPE = "autoApprovalType";
    String PROCESS_CLOSING_TYPE = "[_PROCESS_CLOSING_TYPE]";
    String SKIP_MQ = "skipMQ";
    /**
     * 用于国内审批节点填写审批建议
     * <p>
     * 其他类型 @see org.flowable.engine.impl.persistence.entity.CommentEntity
     */
    String COMMENT_TYPE_ADVICE = "advice";
    String COMMENT_TYPE_OPERATION_DESC = "operationDesc";
    // 评论扩展信息, 例如评分等
    String COMMENT_TYPE_COMMENT_EXT = "commentExt";
    String NUMBER_OF_INSTANCES = "nrOfInstances";
    String MULTI_INSTANCE_LOOP_COUNTER = "loopCounter";
    String TASK_COMPLETE_OPERATION_TYPE = "_TASK_COMPLETE_TYPE";
    String TASK_ATTACHMENTS_VAR_NAME = "TASK_ATTACHMENTS";

    /**
     * 会签表达式
     */
    String AND_SIGN_EXPRESSION = "${nrOfInstances == nrOfCompletedInstances}";

    /**
     * 或签表达式, 只要当同意的人数大于 1 即可, 拒绝不影响该节点
     */
    String OR_SIGN_EXPRESSION_ONE_PASS = "${nrOfCompletedInstances > 0}";
    /**
     * 或签表达式, 只要一个人同意或驳回就结束该节点
     */
    String OR_SIGN_EXPRESSION_ONLY_ONE = "${nrOfInstances != nrOfActiveInstances}";

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

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

    /**
     * 手写签配置默认值
     */
    Boolean USER_AGREE_SIGNATURE_DEFAULT_VALUE = true;

    /**
     * 批量操作配置默认值
     */
    Boolean SUPPORT_BATCH_OPERATION_DEFAULT_VALUE = false;
    /**
     * 用于 MQ 的 Header， 记录当前事件的归属应用
     */
    String MQ_OWNERSHIP_APPLICATION = "MQ_OWNERSHIP_APPLICATION";
    String MQ_OWNERSHIP_PROCESS_DEFINITION_KEY = "MQ_OWNERSHIP_PROCESS_DEFINITION_KEY";

    /**
     * 审批人数量限制
     */
    Integer APPROVAL_ASSIGNER_LIMIT_NUMBER = 60;

    /**
     * 抄送人员数量限制
     */
    Integer CARBON_ASSIGNER_LIMIT_NUMBER = 100;

    /**
     * MQ消息每批次人员数量
     */
    Integer MQ_ASSIGNER_BATCH_SIZE = 20;

    /**
     * 加签显示人员数量
     */
    Integer COUNTERSIGN_ASSIGNER_SHOW_NUMBER = 2;
    /**
     * 重置任务审批人显示人员数量
     */
    Integer RESET_TASK_ASSIGNER_SHOW_NUMBER = 2;

    /**
     * 回退操作次数上限
     */
    Integer MAX_BACKED_OPERATE_COUNT = 20;
    String LATEST_SYNC_TO_ELASTICSEARCH_TIME = "latest.sync.to.elasticsearch.time";
    /**
     * 固定父子文档在相同分片
     */
    String ES_FIXED_ROUTING = "workflow_engine_join_routing";

    /**
     * ouId+workspaceId 下限制人员数量为20
     */
    Integer MAX_ORG_WORKSPACE_ADMIN_COUNT = 20;

    /**
     * 发起人撤回时，当前流程停留住的节点定义key
     */
    String CANCEL_PROCESS_NODE_DEF_KEY_NAME = "[_CANCEL_PROCESS_NODE_DEF_KEY_]";
    // 被转交人
    String TRANSFER_TO = "[TRANSFER_TO_]";
    // 转交时的意见
    String TRANSFER_TO_ADVICE = "[TRANSFER_TO_ADVICE]";
    // 结束流程的最后一个操作人
    String CLOSE_PROCESS_ASSIGNER = "[_CLOSE_PROCESS_ASSIGNER_]";
    /**
     * 签署业务发起流程实例时，重新选择的文档tag 集合
     */
    String SIGN_PROCESS_ENABLE_DOC_IDS = "[_SIGN_PROCESS_ENABLE_DOC_IDS_]";
    /**
     * 签署业务，基于业务自定义变量的传入
     */
    String SIGN_VARIABLE = "[_SIGN_VARIABLES_]";
    /**
     * 签署人
     */
    String SIGNATORIES = "[_SIGNATORIES_]";
    String TASK_SUBMIT_FORM_VARIABLE = "[_TASK_SUBMIT_FORM_VARIABLE_]";
    /**
     * 提级审批变量标识
     */
    String SUPPORT_UPGRADE_VARIABLE = "[_SUPPORT_UPGRADE_]";
}
