Ejemplo n.º 1
0
        // Token: 0x0600162E RID: 5678 RVA: 0x00026D4C File Offset: 0x00025D4C
        protected void OnTransition(ActivityExecutionContext context, WorkflowElement sender)
        {
            Transition transition = sender as Transition;

            if (transition != null)
            {
                string text = transition.TransitionTo;
                if (transition is ReturnTransition)
                {
                    text = this.transitionedFrom;
                }
                if (!string.IsNullOrEmpty(text) && string.IsNullOrEmpty(this.TransitionTo) && this.Name != text)
                {
                    this.transitionTo = text;
                    context.CancelChildren();
                    if (this.ExitActivity != null)
                    {
                        context.ScheduleActivity(this.ExitActivity);
                        return;
                    }
                }
                else
                {
                    Console.WriteLine("Trying to transition to {0}", transition.TransitionTo);
                }
            }
        }
Ejemplo n.º 2
0
 // Token: 0x0600162D RID: 5677 RVA: 0x00026CF4 File Offset: 0x00025CF4
 protected void ExecuteActivities(ActivityExecutionContext context, WorkflowElement sender)
 {
     if (this.transitions.Count != 0)
     {
         this.transitions.ForEach(delegate(Transition transition)
         {
             context.ScheduleActivity(transition, new CompletionCallback(this.OnTransition));
         });
         return;
     }
     context.CancelChildren();
 }
Ejemplo n.º 3
0
        public ProjectModel Put(string projectId, string categoryId, WorkflowElement workflowElement)
        {
            var project  = Get(projectId);
            var category = project.WorkflowElementCategories.First(x => x.CategoryId == categoryId);
            var element  = category.WorkflowElements.First(x => x.ElementId == workflowElement.ElementId);

            element.Explanation = workflowElement.Explanation;
            element.IsDone      = workflowElement.IsDone;
            element.IsRelevant  = workflowElement.IsRelevant;
            element.Description = workflowElement.Description;

            var newProject = ProjectsCollection.ReplaceOne(x => x.Id == projectId, project);

            return(project);
        }
Ejemplo n.º 4
0
        // Token: 0x060014C5 RID: 5317 RVA: 0x00024340 File Offset: 0x00023340
        protected void OnStateCompleted(ActivityExecutionContext context, WorkflowElement sender)
        {
            State state = sender as State;

            if (state != null && !string.IsNullOrEmpty(state.TransitionTo))
            {
                State state2 = this.FindState(state.TransitionTo);
                if (state2 != null)
                {
                    state2.TransitionedFrom = state.Name;
                    Console.WriteLine("CS: Stategraph {0} is transitioning from {1} to {2}", this.name, state.Name, state.TransitionTo);
                    if (this.DoneState != state.TransitionTo)
                    {
                        context.ScheduleActivity(state2, new CompletionCallback(this.OnStateCompleted));
                        return;
                    }
                    context.ScheduleActivity(state2.EnterActivity, new CompletionCallback(this.OnDoneCompleted));
                }
            }
        }
Ejemplo n.º 5
0
 // Token: 0x060014C6 RID: 5318 RVA: 0x000243DE File Offset: 0x000233DE
 protected void OnDoneCompleted(ActivityExecutionContext context, WorkflowElement sender)
 {
     Console.WriteLine("CS: Stategraph {0} is complete", this.name);
     context.CancelChildren();
 }
Ejemplo n.º 6
0
 // Token: 0x06001626 RID: 5670 RVA: 0x00026C35 File Offset: 0x00025C35
 public ReturnTransition(WorkflowElement activity) : base(null, activity)
 {
 }
Ejemplo n.º 7
0
        public ActionResult <ProjectModel> Put(string projectId, string categoryId, [FromBody] WorkflowElement value)
        {
            var result = _projectsDbContext.Put(projectId, categoryId, value);

            return(Ok(result));
        }
Ejemplo n.º 8
0
 // Token: 0x0600161E RID: 5662 RVA: 0x00026BC6 File Offset: 0x00025BC6
 public Transition(string transitionTo, WorkflowElement activity)
 {
     this.transitionTo = transitionTo;
     this.activity     = activity;
 }
Ejemplo n.º 9
0
 // Token: 0x0600161F RID: 5663 RVA: 0x00026BDC File Offset: 0x00025BDC
 public Transition(WorkflowElement activity) : this(null, activity)
 {
 }