public virtual TransitionImpl createOutgoingTransition(string transitionId) { TransitionImpl transition = new TransitionImpl(transitionId, processDefinition); transition.Source = this; outgoingTransitions.Add(transition); if (!string.ReferenceEquals(transitionId, null)) { if (namedOutgoingTransitions.ContainsKey(transitionId)) { throw new PvmException("activity '" + id + " has duplicate transition '" + transitionId + "'"); } namedOutgoingTransitions[transitionId] = transition; } return(transition); }
public virtual TransitionImpl findTransition(string transitionId) { foreach (PvmActivity childActivity in flowActivities) { foreach (PvmTransition transition in childActivity.OutgoingTransitions) { if (transitionId.Equals(transition.Id)) { return((TransitionImpl)transition); } } } foreach (ActivityImpl childActivity in flowActivities) { TransitionImpl nestedTransition = childActivity.findTransition(transitionId); if (nestedTransition != null) { return(nestedTransition); } } return(null); }