private void GetStateAndAttributes(IList state, IList attributeRows, String indentation, IFlow flow) { // add the flow to the state IEnumerator iter = flow.Children.GetEnumerator(); while (iter.MoveNext()) { state.Add(iter.Current); } // add the flow-name to the attributeRows System.Collections.IDictionary row = new System.Collections.Hashtable(); if (flow.IsRootFlow()) { row["name"] = indentation + "rootflow <b>[</b>" + flow.Name + "<b>]</b>"; } else { row["name"] = indentation + "subflow <b>[</b>" + flow.Name + "<b>]</b>"; } row["value"] = ""; attributeRows.Add(row); // add the flow-local attributes to the attributeRows iter = flow.AttributeInstances.GetEnumerator(); while (iter.MoveNext()) { IAttributeInstance attributeInstance = (IAttributeInstance)iter.Current; row = new Hashtable(); log.Debug("adding attribute instance value " + attributeInstance.GetValue()); row["name"] = indentation + " +- <b>[</b>" + attributeInstance.Attribute.Name + "<b>]</b>"; row["value"] = attributeInstance.GetValue(); attributeRows.Add(row); } // recursively descend to the children iter = flow.Children.GetEnumerator(); while (iter.MoveNext()) { GetStateAndAttributes(state, attributeRows, indentation + " | ", (IFlow)iter.Current); } IProcessInstance processInstance = flow.GetSubProcessInstance(); if (processInstance != null) { state.Add(processInstance.RootFlow); GetStateAndAttributes(state, attributeRows, indentation + " | ", processInstance.RootFlow); } }
private void GetStateAndAttributes(IList state, IList attributeRows, String indentation, IFlow flow) { // add the flow to the state IEnumerator iter = flow.Children.GetEnumerator(); while (iter.MoveNext()) { state.Add(iter.Current); } // add the flow-name to the attributeRows System.Collections.IDictionary row = new System.Collections.Hashtable(); if (flow.IsRootFlow()) { row["name"] = indentation + "rootflow <b>[</b>" + flow.Name + "<b>]</b>"; } else { row["name"] = indentation + "subflow <b>[</b>" + flow.Name + "<b>]</b>"; } row["value"] = ""; attributeRows.Add(row); // add the flow-local attributes to the attributeRows iter = flow.AttributeInstances.GetEnumerator(); while (iter.MoveNext()) { IAttributeInstance attributeInstance = (IAttributeInstance) iter.Current; row = new Hashtable(); log.Debug("adding attribute instance value " + attributeInstance.GetValue()); row["name"] = indentation + " +- <b>[</b>" + attributeInstance.Attribute.Name + "<b>]</b>"; row["value"] = attributeInstance.GetValue(); attributeRows.Add(row); } // recursively descend to the children iter = flow.Children.GetEnumerator(); while (iter.MoveNext()) { GetStateAndAttributes(state, attributeRows, indentation + " | ", (IFlow) iter.Current); } IProcessInstance processInstance = flow.GetSubProcessInstance(); if (processInstance != null) { state.Add(processInstance.RootFlow); GetStateAndAttributes(state, attributeRows, indentation + " | ", processInstance.RootFlow); } }