public void AddFlowElement(FlowElement element) { flowElementList.Add(element); element.ParentContainer = this; if (!string.IsNullOrEmpty(element.Id)) { flowElementMap.Add(element.Id, element); } }
public FlowElement GetFlowElement(string id) { FlowElement foundElement = null; if (!string.IsNullOrEmpty(id)) { foundElement = flowElementMap[id]; } return(foundElement); }
public void RemoveFlowElement(string elementId) { FlowElement element = flowElementMap[elementId]; if (element != null) { flowElementList.Remove(element); flowElementMap.Remove(element.Id); } }
public void AddFlowElementToMap(FlowElement element) { if (element != null && (!string.IsNullOrEmpty(element.Id))) { flowElementMap.Add(element.Id, element); if (ParentContainer != null) { ParentContainer.AddFlowElementToMap(element); } } }
public void RemoveFlowElement(string elementId) { FlowElement element = GetFlowElement(elementId); if (element != null) { flowElementList.Remove(element); flowElementMap.Remove(elementId); if (element.ParentContainer != null) { element.ParentContainer.RemoveFlowElementFromMap(elementId); } } }
//public abstract FlowElement Clone(); public void SetValues(FlowElement otherElement) { base.SetValues(otherElement); name = otherElement.Name; documentation = otherElement.Documentation; executionListeners = new List <ActivitiListener>(); if (otherElement.GetExecutionListeners() != null && otherElement.GetExecutionListeners().Count > 0) { foreach (ActivitiListener listener in otherElement.GetExecutionListeners()) { executionListeners.Add((ActivitiListener)listener.Clone()); } } }
public IFlowElementsContainer FindParent(FlowElement childElement, IFlowElementsContainer flowElementsContainer) { foreach (FlowElement flowElement in flowElementsContainer.GetFlowElements()) { if (childElement.Id != null && childElement.Id == flowElement.Id) { return(flowElementsContainer); } if (flowElement is IFlowElementsContainer) { IFlowElementsContainer result = FindParent(childElement, (IFlowElementsContainer)flowElement); if (result != null) { return(result); } } } return(null); }
protected FlowElement GetFlowElementInSubProcess(string id, SubProcess subProcess) { FlowElement foundFlowElement = subProcess.GetFlowElement(id); if (foundFlowElement == null) { foreach (FlowElement flowElement in subProcess.GetFlowElements()) { if (flowElement is SubProcess) { foundFlowElement = GetFlowElementInSubProcess(id, (SubProcess)flowElement); if (foundFlowElement != null) { break; } } } } return(foundFlowElement); }
public IFlowElementsContainer FindParent(FlowElement childElement) { return(FindParent(childElement, this)); }