public Initial Generate() { var initial = new Initial { Name = "ServiceMatrix Guidance", }; var guidanceaction = new GuidanceAction { Name = "ServiceMatrix Online Documentation", Link = "http://docs.particular.net/servicematrix/" }; initial.ConnectTo(guidanceaction); var final = new Final { Name = "Final", }; guidanceaction.ConnectTo(final); return initial; }
public Initial Generate() { Join previousJoin = null; var initial = new Initial { Name = "ServiceMatrix Guidance", }; foreach (var topic in this.Items.GroupBy(x => x.Item1)) { var fork = new Fork { Name = topic.Key.Trim(), }; if (previousJoin == null) initial.ConnectTo(fork); else previousJoin.ConnectTo(fork); var lastItem = this.GenerateItems(topic, fork); var join = new Join { Name = topic.Key + "Join", }; lastItem.ConnectTo(join); previousJoin = join; } var final = new Final { Name = "Final", }; previousJoin.ConnectTo(final); return initial; }
/// <summary> /// Connects this workflow with the <see cref="Initial"/> received as parameter. /// </summary> /// <param name="node">The <see cref="Initial"/> to connect as successor of this activity.</param> public virtual void ConnectTo(Initial node) { Guard.NotNull(() => node, node); this.ConnectTo(new Node[] { node }); }