/// <summary> /// Delete Workflow /// </summary> /// <param name="request">Request</param> /// <returns>ControlWorkflowResponse</returns> public ControlWorkflowResponse DeleteWorkflow(ControlWorkflowRequest request) { int tot; IEnumerable <string> workflowCodes; var oldWf = _workflow.GetWorkflows(Guid.Parse(request.WorkflowOid), string.Empty, string.Empty, false, null, null, string.Empty, string.Empty, 0, 10, out tot, out workflowCodes).First(); var response = new ControlWorkflowResponse { Message = Library.Properties.Resources.SUCCESS_RESULT }; if (oldWf.Status == WorkflowStatusType.InProgress.ToString()) { try { CancelWorkflowWithHisChildren(Guid.Parse(request.WorkflowOid)); response.Message = Library.Properties.Resources.SUCCESS_RESULT; } catch { // do nothing. delete it from database anyway } } _workflow.DeleteWorkflow(Guid.Parse(request.WorkflowOid)); return(response); }
/// <summary> /// Delete Workflow /// </summary> /// <param name="request">Request</param> /// <returns>ControlWorkflowResponse</returns> public ControlWorkflowResponse DeleteWorkflow(ControlWorkflowRequest request) { return(Channel.DeleteWorkflow(request)); }
/// <summary> /// Cancel Workflow /// </summary> /// <param name="request">Request</param> /// <returns>ControlWorkflowResponse</returns> public ControlWorkflowResponse CancelWorkflow(ControlWorkflowRequest request) { return(Channel.CancelWorkflow(request)); }