Example #1
0
        public void TryGetSequenceFlowTest()
        {
            var           t   = def.GetProcess("losFlow");
            tSequenceFlow seq = null;

            Assert.IsTrue(def.TryGetSequenceFlow(t, "flow1", out seq));
            Assert.IsNotNull(seq);
        }
Example #2
0
        private async Task <SequenceFlowEntity> CreateSequenceFlowAsync(tSequenceFlow sequenceFlow, Dictionary <string, int> itemKeys)
        {
            string condition = sequenceFlow.conditionExpression != null?string.Join(" ", sequenceFlow.conditionExpression.Text) : null;

            SequenceFlowEntity seq = new SequenceFlowEntity()
            {
                SequenceFlowId      = sequenceFlow.id,
                SequenceFlowName    = sequenceFlow.name,
                SourceId            = itemKeys[sequenceFlow.sourceRef],
                TargetId            = itemKeys[sequenceFlow.targetRef],
                SourceRef           = sequenceFlow.sourceRef,
                TargetRef           = sequenceFlow.targetRef,
                ConditionExpression = condition
            };

            sequenceFlowStore.Create(seq);
            await SaveChangesAsync();

            return(seq);
        }