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;
        }
        /// <summary>
        /// Connects this activity with the <see cref="Final"/> received as parameter.
        /// </summary>
        /// <param name="node">The <see cref="Final"/> to connect as successor of this activity.</param>
        public virtual void ConnectTo(Final node)
        {
            Guard.NotNull(() => node, node);

            this.ConnectTo(new Node[] { node });
        }
        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;
        }
Beispiel #4
0
        /// <summary>
        /// Connects this activity with the <see cref="Final"/> received as parameter.
        /// </summary>
        /// <param name="node">The <see cref="Final"/> to connect as successor of this activity.</param>
        public virtual void ConnectTo(Final node)
        {
            Guard.NotNull(() => node, node);

            this.ConnectTo(new Node[] { node });
        }