示例#1
0
        public Flow(string flowId, FlowConfiguration configuration, DateTime starttime)
        {
            FlowId        = flowId;
            Configuration = configuration;
            Starttime     = starttime;

            _steps = Configuration.StepNames.Select(stepName => new FlowStep(FlowId, stepName)).ToArray();
        }
示例#2
0
        public void Seed(string flowId, FlowConfiguration configuration)
        {
            var timestamp = DateTime.Now;

            foreach (var bucket in _buckets)
            {
                try
                {
                    bucket.Handle(new FlowerSeedMessage(flowId, configuration, timestamp));
                }
                catch (Exception e)
                {
                    _selfLogAction?.Invoke(e.ToString());
                }
            }
        }
示例#3
0
 public FlowerSeedMessage(string flowId, FlowConfiguration configuration, DateTime timestamp)
 {
     FlowId = flowId;
     Configuration = configuration;
     Timestamp = timestamp;
 }
示例#4
0
 /// <summary>
 /// Initializes a new flow
 /// </summary>
 /// <param name="flowId"></param>
 /// <param name="configuration"></param>
 /// <param name="timestamp"></param>
 public void Seed(string flowId, FlowConfiguration configuration, DateTime timestamp)
 {
     _manager.Start(new Flow(flowId, configuration, timestamp), timestamp);
 }