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;
            };
        }
        public MockNormalWorkflowEngine(WorkflowContext context, WorklistItem worklistItem)
            : base(context)
        {
            ExitStrategy.Quitting = false;
            _worklistItem = worklistItem;

            FinalStatusOutcomeDeterminedHandler += outcomeStatusId =>
            {
                StatusResult = outcomeStatusId;
                ExitStrategy.Quitting = true;
            };
        }
 public FailedWorkflowEngine(WorkflowContext context) : base(context) { }
 protected WorkflowLoopOperation(WorkflowContext context)
     : base(context)
 {
     ActivityClassTypes = context.ActivityTypes;
     LocationConfig = context.LocationConfig;
 }
 public NormalWorkflowEngine(WorkflowContext context) : base(context) { }
Exemple #6
0
        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);
            }
        }
Exemple #7
0
        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);
            }
        }