Esempio n. 1
0
    /// <summary>
    /// 二次验证:提交完成之后通知并验证
    /// </summary>
    /// <returns></returns>
    private bool AfterWorkflowStart(int wfInstanceId)
    {
        InstructionInfo        info       = Instruction.GetInstructionInfo(FormId);
        ERP_CallbackResultType resultType = new ERP_Instruction_Service().NotifyStartAdvance(info.ErpFormId, true);

        if (resultType != ERP_CallbackResultType.调用成功)
        {
            //删除流程实例
            new WF_WorkFlowInstance().DeleteWorkFlowInstance(_BPMContext.ProcID);

            //撤销已发起的流程
            WorkflowManage.StopWorkflow(wfInstanceId);
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip + "'); window.opener=null;window.open('', '_self', '');window.close();", true);
            return(false);
        }
        return(true);
    }
Esempio n. 2
0
    /// <summary>
    /// 一次验证:提交流程之前验证
    /// </summary>
    /// <returns></returns>
    private bool BeforeSubmit()
    {
        string erpFormCode = Request["erpFormId"];

        if (!string.IsNullOrEmpty(_BPMContext.ProcID))
        {
            erpFormCode = Instruction.GetInstructionInfoByInstanceId(_BPMContext.ProcID).ErpFormId;
        }
        ERP_CallbackResultType resultType = new ERP_Instruction_Service().NotifyStartAdvance(erpFormCode, false);

        if (resultType != ERP_CallbackResultType.调用成功)
        {
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip + "'); window.opener=null;window.open('', '_self', '');window.close();", true);
            return(false);
        }
        return(true);
    }