/// <summary> /// Gets the details of particular workflow /// </summary> /// <param name="ProcessId"></param> /// <returns></returns> public static Process GetWorkflow(int ProcessId) { Process wkf = new Process(); SourceCode.Workflow.Management.WorkflowManagementServer wrkmgt = new SourceCode.Workflow.Management.WorkflowManagementServer(); wrkmgt.Connection.Open(ConnectToK2()); try { wrkmgt.Open(); wkf = BuildWorkflow(wrkmgt.GetProcess(ProcessId)); } catch (Exception ex) { wkf.Description = ex.Message; wkf.Name = ex.Source; wkf.MetaData = "Workflow Error"; } finally { wrkmgt.Connection.Close(); } return(wkf); }