/// <summary> /// EXCEL转换为动态活动流程的参数 /// </summary> /// <param name="wb"></param> /// <param name="client"></param> /// <returns></returns> public WfCreateClientDynamicProcessParams ExcelToClient(string processKey, WorkBook wb, ref WfCreateClientDynamicProcessParams client) { processKey.NullCheck("processKey"); wb.NullCheck("wb"); DataTable processTable = DocumentHelper.GetRangeValuesAsTable(wb, "Process", "A3"); DataTable matrixTable = DocumentHelper.GetRangeValuesAsTable(wb, "Matrix", "A3"); if (client == null) client = new WfCreateClientDynamicProcessParams(); client.Key = processKey; foreach (DataRow row in processTable.Rows) { string propertyValue = row[0].ToString(); if (propertyValue.IsNullOrEmpty() || string.Equals(propertyValue, "Key", StringComparison.OrdinalIgnoreCase)) continue; string dataValue = row[1].ToString(); //dataValue 可以为空 client.Properties.AddOrSetValue(propertyValue, dataValue); } client.ActivityMatrix = new WfClientActivityMatrixResourceDescriptor(matrixTable); return client; }
public WfCreateClientDynamicProcessParams ExcelStreamToClient(string processKey, Stream stream, ref WfCreateClientDynamicProcessParams client) { stream.NullCheck("stream"); WorkBook workBook = WorkBook.Load(stream); return ExcelToClient(processKey, workBook, ref client); }
public static WfCreateClientDynamicProcessParams CreateClientDynamicProcessParams() { WfCreateClientDynamicProcessParams createParams = new WfCreateClientDynamicProcessParams(); createParams.Key = UuidHelper.NewUuidString(); createParams.Name = "客户端测试流程参数"; createParams.ActivityMatrix = GetClientActivityMatrixResourceDescriptor(); return createParams; }
public static void AreSame(this WfCreateClientDynamicProcessParams expected, WfCreateClientDynamicProcessParams actual) { ((WfClientKeyedDescriptorBase)expected).AreSame((WfClientKeyedDescriptorBase)actual); expected.ActivityMatrix.AreSame(actual.ActivityMatrix); }
/// <summary> /// 构造方法 /// </summary> /// <param name="appName"></param> /// <param name="progName"></param> public WfClientDynamicProcessBuilder(WfCreateClientDynamicProcessParams createParams) : base(createParams.ApplicationName, createParams.ProgramName) { this._CreateParams = createParams; }