public void DeleteDescriptor(string processKey)
        {
            if (processKey.IsNullOrEmpty())
                throw new ApplicationException(Translator.Translate(Define.DefaultCulture, "流程描述的Key不能为空"));

            OperationContext.Current.FillContextToOguServiceContext();

            WfDeleteTemplateExecutor executor = new WfDeleteTemplateExecutor(processKey);

            executor.Execute();
        }
        public void DeleteProcessTemplateExecutorTest()
        {
            IWfProcessDescriptor processDesp = CreateTestProcessDescriptor();

            WfSaveTemplateExecutor createExecutor = new WfSaveTemplateExecutor(processDesp);

            createExecutor.Execute();

            WfDeleteTemplateExecutor deleteExecutor = new WfDeleteTemplateExecutor(processDesp.Key);

            deleteExecutor.Execute();

            Assert.AreEqual(WfDesignerOperationType.DeleteTemplate, deleteExecutor.OperationType);

            try
            {
                IWfProcessDescriptor loadedProcessDesp = WfProcessDescriptorManager.LoadDescriptor(processDesp.Key);

                throw new ApplicationException("不应该加载到已经删除的流程");
            }
            catch (SystemSupportException)
            {
            }
        }
        private void DeleteWfProcesses()
        {
            if (ProcessDescInfoDeluxeGrid.SelectedKeys.Count == 0) return;

            foreach (var key in ProcessDescInfoDeluxeGrid.SelectedKeys)
            {
                WfDeleteTemplateExecutor executor = new WfDeleteTemplateExecutor(key);

                executor.Execute();
            }

            LastQueryRowCount = -1;
        }