public ActionResult DeleteProcessInst(string processInstID)
        {
            AjaxResult ajaxResult = new AjaxResult() { Result = DoResult.Failed };
            string actionMessage = string.Format("删除流程实例{0}", processInstID);
            try
            {
                IWorkflowEngine engine = new WorkflowEngine();
                engine.DeleteProcessInst(processInstID);
                ajaxResult.Result = DoResult.Success;
                ajaxResult.RetValue = AgileEAP.Workflow.Enums.ProcessInstStatus.Terminated.GetRemark();
                actionMessage += "成功";
            }
            catch (Exception ex)
            {
                actionMessage += "出错";
                log.Error(actionMessage, ex);
            }
            finally
            {
                AddActionLog<ProcessInst>(actionMessage, ajaxResult.Result);
            }

            ajaxResult.PromptMsg = actionMessage;
            return Json(ajaxResult);
        }
        public string Delete(string processInstID)
        {
            AjaxResult ajaxResult = new AjaxResult();
            string actionMessage = string.Format("删除流程实例{0}", processInstID);
            try
            {
                IWorkflowEngine engine = new WorkflowEngine();
                engine.DeleteProcessInst(processInstID);
                ajaxResult.Result = DoResult.Success;
                ajaxResult.RetValue = AgileEAP.Workflow.Enums.ProcessInstStatus.Running.GetRemark();
                ajaxResult.PromptMsg = actionMessage + "成功";
            }
            catch (Exception ex)
            {
                log.Error(actionMessage + "出错", ex);
            }
            finally
            {
                AddActionLog<ProcessInst>(actionMessage, ajaxResult.Result);
            }

            return JsonConvert.SerializeObject(ajaxResult);
        }