package com.zt.plat.module.qms.enums;

public class QmsBpmConstant {

    /**
     * 流程回调时使用的beanName Key
     * */
    public static final String BPM_CALLBACK_BEAN_NAME = "bpmCallbackBean";

    /**
     * 流程回调时使用的ActivityId Key
     * */
    public static final String BPM_CALLBACK_ACTIVITY_ID = "bpmCallbackActivityId";
    public static final String BPM_CALLBACK_ACTIVITY_NAME = "bpmCallbackActivityName";
    public static final String BPM_FIELD_EXTENSIONS = "bpmFieldExtensions";
    public static final String BPM_FIRST_ACTIVITY_FLAG = "firstActivityFlag";
    public static final String BPM_LAST_ACTIVITY_FLAG = "lastActivityFlag";
    public static final String BPM_REJECT_TO_FIRST_FLAG = "rejectToFirstActivity";
    public static final String BPM_CUR_ACTIVITY_INS_ID = "currentActivityInsId";        //当前活动实例id

    public static final String BPM_PROCESS_INS_ID = "processInstanceId";        //流程实例ID

    //驳回标记前缀
    public static final String BPM_CALLBACK_RETURN_FLAG_PREFIX_KEY = "RETURN_FLAG_";

    /**
     * 流程回调时使用的beanName Key
     * */
//    public static final String BPM_CALLBACK_BEAN_NAME = "bpmCallbackBean";

    
    /**========================以下代码从bmp模块复制，详见 BpmnVariableConstants类 ===================**/
    /**
     * 流程实例的变量 - 状态
     *
     */
    public static final String PROCESS_INSTANCE_VARIABLE_STATUS = "PROCESS_STATUS";
    /**
     * 流程实例的变量 - 理由
     *
     * 例如说：审批不通过的理由（目前审核通过暂时不会记录）
     *
     */
    public static final String PROCESS_INSTANCE_VARIABLE_REASON = "PROCESS_REASON";
    /**
     * 流程实例的变量 - 发起用户选择的审批人 Map
     *
     *  ProcessInstance#getProcessVariables()
     *  BpmTaskCandidateStrategyEnum#START_USER_SELECT
     */
    public static final String PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES = "PROCESS_START_USER_SELECT_ASSIGNEES";
    /**
     * 流程实例的变量 - 审批人选择的审批人 Map
     *
     *  ProcessInstance#getProcessVariables()
     *  BpmTaskCandidateStrategyEnum#APPROVE_USER_SELECT
     */
    public static final String PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES = "PROCESS_APPROVE_USER_SELECT_ASSIGNEES";
    /**
     * 流程实例的变量 - 发起用户 ID
     *
     *  ProcessInstance#getProcessVariables()
     */
    public static final String PROCESS_INSTANCE_VARIABLE_START_USER_ID = "PROCESS_START_USER_ID";
    /**
     * 流程实例的变量 - 用于判断流程实例变量节点是否驳回. 格式 RETURN_FLAG_{节点 id}
     *
     * 目的是：驳回到发起节点时，因为审批人与发起人相同，所以被自动通过。但是，此时还是希望不要自动通过
     *
     *  ProcessInstance#getProcessVariables()
     */
    public static final String PROCESS_INSTANCE_VARIABLE_RETURN_FLAG = "RETURN_FLAG_%s";
    /**
     * 流程实例的变量 - 是否跳过表达式
     *
     *  ProcessInstance#getProcessVariables()
     *  <a href="https://blog.csdn.net/weixin_42065235/article/details/126039993">Flowable/Activiti之SkipExpression 完成自动审批</a>
     */
    public static final String PROCESS_INSTANCE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";

    /**
     * 流程实例的变量 - 用于判断流程是否需要跳过发起人节点
     *
     *  ProcessInstance#getProcessVariables()
     */
    public static final String PROCESS_INSTANCE_VARIABLE_SKIP_START_USER_NODE = "PROCESS_SKIP_START_USER_NODE";

    /**
     * 流程实例的变量 - 流程开始时间
     *
     * 【非存储变量】用于部分需要 format 的场景，例如说：流程实例的自定义标题
     */
    public static final String PROCESS_START_TIME = "PROCESS_START_TIME";
    /**
     * 流程实例的变量 - 流程定义名称
     */
    public static final String PROCESS_DEFINITION_NAME = "PROCESS_DEFINITION_NAME";

    /**
     * 任务的变量 - 状态
     *
     *  org.flowable.task.api.Task#getTaskLocalVariables()
     */
    public static final String TASK_VARIABLE_STATUS = "TASK_STATUS";
    /**
     * 任务的变量 - 理由
     *
     * 例如说：审批通过、不通过的理由
     *
     *  org.flowable.task.api.Task#getTaskLocalVariables()
     */
    public static final String TASK_VARIABLE_REASON = "TASK_REASON";
    /**
     * 任务变量 - 签名图片 URL
     */
    public static final String TASK_SIGN_PIC_URL = "TASK_SIGN_PIC_URL";
    
}
