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 FLOWABLE_SKIP_EXPRESSION_ENABLE = "[_FLOWABLE_SKIP_EXPRESSION_ENABLED_]";
    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 INTERNAL_PROCESS_WORKSPACE_TYPE = "[_INTERNAL_PROCESS_WORKSPACE_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 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_NODE_JSON = "jsonValue";
    String FLOW_SERVER_VERSION = "serverVersion";
    String FLOW_SERVER_VERSION_121 = "1.2.1";
    String FLOW_SERVER_VERSION_130 = "1.3.0";
    String CONFIG_NOTICE = "noticeConfig";
    String TEMPLATE_NOTICE_MESSAGE_ID = "noticeMessageId";
    String TEMPLATE_PENDING_MESSAGE_ID = "pendingMessageId";
    String TEMPLATE_CARBON_COPY_MESSAGE_ID = "carbonCopyMessageId";
    String TEMPLATE_SMS_MESSAGE_ID = "smsMessageId";
    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_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 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 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;

}
