コード例 #1
0
        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();
        }
コード例 #2
0
        private void DeleteWfProcesses()
        {
            if (ProcessDescInfoDeluxeGrid.SelectedKeys.Count == 0)
            {
                return;
            }

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

                executor.Execute();
            }

            LastQueryRowCount = -1;
        }
コード例 #3
0
        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)
            {
            }
        }