protected override void VisitForkJoin(ForkJoinNode forkJoinNode) { foreach (var fork in forkJoinNode.Forks) { CheckActivityBindings(fork); } }
protected override void VisitForkJoin(ForkJoinNode forkJoinNode) { foreach (var fork in forkJoinNode.Forks) { CheckActivityType(fork.ActivityType, forkJoinNode); } }
protected override void VisitForkJoin(ForkJoinNode forkJoinNode) { if (forkJoinNode.Forks.Count == 0) { Result.AddError(forkJoinNode, "Node has no forks"); } CheckActivityNode(forkJoinNode); }
protected override void VisitForkJoin(ForkJoinNode forkJoinNode) { if (forkJoinNode.FaultHandler == null && myFaultHandler != null) { forkJoinNode.ConnectFaultTo(myFaultHandler); } if (forkJoinNode.CancellationHandler == null && myCancellationHandler != null) { forkJoinNode.ConnectCancellationTo(myCancellationHandler); } }
public IEnumerable <IFlowNode> VisitForkJoin(ForkJoinNode forkJoinNode) { if (forkJoinNode.PointsTo != null) { yield return(forkJoinNode.PointsTo); } if (forkJoinNode.FaultHandler != null) { yield return(forkJoinNode.FaultHandler); } if (forkJoinNode.CancellationHandler != null) { yield return(forkJoinNode.CancellationHandler); } }
public Task VisitForkJoin(ForkJoinNode forkJoinNode) { forkJoinNode.AssertNotNull("forkJoinNode != null"); var activities = new InjectableObjectsCollection <IActivity>(forkJoinNode.Forks.Count); try { foreach (IActivityDescriptor fork in forkJoinNode.Forks) { IActivityDescriptor temp = fork; IActivity activity = activities.Add(temp.ActivityType, ServiceProvider); temp.ExecuteInitializersFor(activity); Log.Info("At node: {0}. Fork created: {1}", forkJoinNode, activity); } Task <object>[] tasks = activities.ConvertInstances(a => a.Execute()); Task <object[]> task = tasks.WhenAll(); Log.Info("At node: {0}. Forks started", forkJoinNode); Task <Task> continuation = task.ContinueWith(t => { forkJoinNode.OnForksJoined(tasks, task); // ReSharper disable once AccessToDisposedClosure activities.Dispose(); return(ExecuteNextNode(forkJoinNode, t)); }, myScheduler); return(continuation.Unwrap()); } catch (Exception) { activities.Dispose(); throw; } }
protected override void VisitForkJoin(ForkJoinNode forkJoinNode) { VisitActivityNode(forkJoinNode); }
protected abstract void VisitForkJoin([NotNull] ForkJoinNode forkJoinNode);
Null INodeVisitor <Null> .VisitForkJoin(ForkJoinNode forkJoinNode) { VisitForkJoin(forkJoinNode); return(null); }