예제 #1
0
        public void SplitConditionalProcess()
        {
            var startNode = new StartNode("1. Submit claim");
            var xorGw = new SplitConditionalGateway<string>("X. Split", (e => transitionState));
            var n2 = new Activity("2. Child A");
            var n3 = new Activity("3. Child B");
            var n4 = new Activity("4. Child C");
            var joinGw = new JoinGateway("X. Join");
            var endNode = new EndNode("5. Closed");

            var t1gw = new SequenceFlow(startNode, xorGw);
            var tgw2 = new ConditionalFlow<string>(xorGw, n2, "a");
            var tgw3 = new ConditionalFlow<string>(xorGw, n3, "a");
            var tgw4 = new ConditionalFlow<string>(xorGw, n4, "b");
            var t2Join = new SequenceFlow(n2, joinGw);
            var t3Join = new SequenceFlow(n3, joinGw);
            var t4Join = new SequenceFlow(n4, joinGw);
            var tJE = new SequenceFlow(joinGw, endNode);

            this.process = new Process(startNode);
        }
예제 #2
0
        public void XorGwProcess()
        {
            var startNode = new StartNode("1. Submit claim");
            var xorGw = new ExclusiveGateway<string>("X. Decide", (e => transitionState));
            var n2 = new Activity("2. Alternative A");
            var n3 = new Activity("3. Alternative B");
            var n4 = new Activity("D. Default");
            var endNode = new EndNode("4. Closed");

            var t1gw = new SequenceFlow(startNode, xorGw);
            var tgw2 = new ConditionalFlow<string>(xorGw, n2, "a");
            var tgw3 = new ConditionalFlow<string>(xorGw, n3, "b");
            var tgw4 = new DefaultFlow(xorGw, n4);
            var t2End = new SequenceFlow(n2, endNode);
            var t3End = new SequenceFlow(n3, endNode);
            var t4End = new SequenceFlow(n4, endNode);

            this.process = new Process(startNode);
        }