コード例 #1
0
        public MockFailedWorkflowEngine(WorkflowContext context, WorklistItem worklistItem)
            : base(context)
        {
            ExitStrategy.Quitting = false; // <<==== IMPORTANT! Otherwise the engine "loop" will just quit before it has even started
            _worklistItem = worklistItem;

            FinalStatusOutcomeDeterminedHandler += outcomeStatusId =>
            {
                StatusResult = outcomeStatusId;
                ExitStrategy.Quitting = true;
            };
        }
コード例 #2
0
        public MockNormalWorkflowEngine(WorkflowContext context, WorklistItem worklistItem)
            : base(context)
        {
            ExitStrategy.Quitting = false;
            _worklistItem = worklistItem;

            FinalStatusOutcomeDeterminedHandler += outcomeStatusId =>
            {
                StatusResult = outcomeStatusId;
                ExitStrategy.Quitting = true;
            };
        }
コード例 #3
0
 public FailedWorkflowEngine(WorkflowContext context) : base(context) { }
コード例 #4
0
 protected WorkflowLoopOperation(WorkflowContext context)
     : base(context)
 {
     ActivityClassTypes = context.ActivityTypes;
     LocationConfig = context.LocationConfig;
 }
コード例 #5
0
 public NormalWorkflowEngine(WorkflowContext context) : base(context) { }
コード例 #6
0
ファイル: Worker.cs プロジェクト: Exclr8/CloudCore
        private void StartFailingWorkflowMonitor()
        {
            Logger.Info("Starting Workflow Failing Monitoring  Engine...", LogCategories.EngineStart, ignoreVerbosityConfig: true);

            var failedWorkflowContext = new WorkflowContext(
                SleepIntervalTimeInSeconds,
                LocationConfig,
                activityTypes,
                LogCategories.FailingWorkflowEngine,
                new FailingWorkflowThreadSafeDataAccess(),
                exitStrategy,
                OnWorkflowFailMonitorLooped,
                GetWorkflowParallelThreadCount());

            foreach (var task in WorkerOperationFactory<FailedWorkflowEngine>.Construct(failedWorkflowContext))
            {
                ActiveEngines.Add(task);
            }
        }
コード例 #7
0
ファイル: Worker.cs プロジェクト: Exclr8/CloudCore
        private void StartNormalWorkflowMonitor()
        {
            Logger.Info("Starting Normal Workflow Engine...", LogCategories.EngineStart, ignoreVerbosityConfig: true);

            var workflowContext = new WorkflowContext(
                SleepIntervalTimeInSeconds,
                LocationConfig,
                activityTypes,
                LogCategories.WorkflowEngine,
                new NormalWorkflowThreadSafeDataAccess(),
                exitStrategy,
#if DEBUG
 OnWorkflowMonitorLooped,
                OnUnsafeCallback,
                GetWorkflowParallelThreadCount());
#else
                OnWorkflowMonitorLooped,
                GetWorkflowParallelThreadCount());
#endif

            foreach (var task in WorkerOperationFactory<NormalWorkflowEngine>.Construct(workflowContext))
            {
                ActiveEngines.Add(task);
            }
        }