示例#1
0
 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);
     }
 }
示例#2
0
        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);
        }
示例#3
0
        //IPvmActivity IPvmTransition.Source => source;

        //public IPvmActivity Destination => destination;

        public virtual void SetDestination(ActivityImpl destination)
        {
            this.Destination = destination;
            destination.IncomingTransitions.Add(this);
        }
示例#4
0
 public virtual IPvmProcessInstance CreateProcessInstance(string businessKey, ActivityImpl init)
 {
     return(CreateProcessInstance(businessKey, null, init));
 }