示例#1
0
        protected void AndWhenStartingAnotherProcessorService()
        {
            _processName2 = @"MyProcess2";

            _outDirectory2 = $@"{_baseDirectory}\{_processName2}\Out";

            var config =
                GetConfig <Entity2, Entity3>();

            config.InDirectory  = _outDirectory;
            config.OutDirectory = _outDirectory2;

            var batchProcessor = new TestProcessResultFlowFileController(config)
            {
                Flow = _flow
            };

            var processor = new FlowFileControllerService(_flowService, _logRepository, batchProcessor)
            {
                Interval = TimeSpan.FromSeconds(2)
            };

            processor.FlowFileProcessed += (o, e) => { _flowFileProcessed = true; };

            processor.Start();
        }
示例#2
0
        protected void WhenStartingAProcessorService()
        {
            var config = GetConfig <Enitity1, Entity2>();

            config.InDirectory  = _inDirectory;
            config.OutDirectory = _outDirectory;

            var batchProcessor = new TestCsvFlowFileFlowFileBatchController(config)
            {
                Flow = _flow
            };

            var processor = new FlowFileControllerService(_flowService, _logRepository, batchProcessor)
            {
                Interval = TimeSpan.FromSeconds(2)
            };

            processor.FlowFileProcessed += (o, e) => { _flowFile1Processed = true; };

            processor.Start();
        }