public virtual IList <ActivityImpl> GetInitialActivityStack(ActivityImpl startActivity) { lock (this) { var initialActivityStack = InitialActivityStacks[startActivity]; if (initialActivityStack == null) { initialActivityStack = new List <ActivityImpl>(); var activity = startActivity; while (activity != null) { initialActivityStack.Insert(0, activity); activity = activity.ParentFlowScopeActivity; } InitialActivityStacks[startActivity] = initialActivityStack; } return(initialActivityStack); } }
public override CoreActivity CreateActivity(string activityId) { var activity = new ActivityImpl(activityId, processDefinition); if (!ReferenceEquals(activityId, null)) { if (processDefinition.FindActivity(activityId) != null) { throw new PvmException("duplicate activity id '" + activityId + "'"); } if (Backlog.ContainsKey(activityId)) { Backlog.Remove(activityId); } NamedFlowActivities[activityId] = activity; } activity.flowScope = this; FlowActivities.Add(activity); return(activity); }
//IPvmActivity IPvmTransition.Source => source; //public IPvmActivity Destination => destination; public virtual void SetDestination(ActivityImpl destination) { this.Destination = destination; destination.IncomingTransitions.Add(this); }
public virtual IPvmProcessInstance CreateProcessInstance(string businessKey, ActivityImpl init) { return(CreateProcessInstance(businessKey, null, init)); }