public WorkflowInstanceAppService(IWorkflowInvoker workflowInvoker, IWorkflowDefinitionVersionRepository workflowDefinitionVersionRepository, IWorkflowInstanceRepository workflowInstanceRepository, IWorkflowInstanceStore workflowInstanceStore) { _workflowInvoker = workflowInvoker; _workflowDefinitionVersionRepository = workflowDefinitionVersionRepository; _workflowInstanceRepository = workflowInstanceRepository; _workflowInstanceStore = workflowInstanceStore; }
public WorkflowTriggerInterruptor(IWorkflowRunner workflowRunner, IWorkflowRegistry workflowRegistry, IWorkflowInstanceStore workflowInstanceStore, IBookmarkFinder bookmarkFinder) { _workflowRunner = workflowRunner; _workflowRegistry = workflowRegistry; _workflowInstanceStore = workflowInstanceStore; _bookmarkFinder = bookmarkFinder; }
public WorkflowInstanceExecutor(IResumesWorkflow workflowRunner, IWorkflowInstanceStore workflowInstanceStore, IWorkflowStorageService workflowStorageService, ILogger <WorkflowInstanceExecutor> logger) { _workflowRunner = workflowRunner; _workflowStorageService = workflowStorageService; WorkflowInstanceStore = workflowInstanceStore; _logger = logger; }
public CleanupJob(IWorkflowInstanceStore workflowInstanceStore, IClock clock, IOptions <CleanupOptions> options, ILogger <CleanupJob> logger) { _workflowInstanceStore = workflowInstanceStore; _clock = clock; _options = options.Value; _logger = logger; }
public WorkflowLaunchpad( IWorkflowInstanceStore workflowInstanceStore, IWorkflowFactory workflowFactory, IBookmarkFinder bookmarkFinder, ITriggerFinder triggerFinder, IDistributedLockProvider distributedLockProvider, IWorkflowInstanceDispatcher workflowInstanceDispatcher, IWorkflowInstanceExecutor workflowInstanceExecutor, IWorkflowRunner workflowRunner, IWorkflowRegistry workflowRegistry, IGetsStartActivities getsStartActivities, ElsaOptions elsaOptions, ILogger <WorkflowLaunchpad> logger) { _workflowInstanceStore = workflowInstanceStore; _bookmarkFinder = bookmarkFinder; _triggerFinder = triggerFinder; _distributedLockProvider = distributedLockProvider; _workflowInstanceDispatcher = workflowInstanceDispatcher; _elsaOptions = elsaOptions; _logger = logger; _getsStartActivities = getsStartActivities; _workflowRegistry = workflowRegistry; _workflowRunner = workflowRunner; _workflowInstanceExecutor = workflowInstanceExecutor; _workflowFactory = workflowFactory; }
public Cron(IWorkflowInstanceStore workflowInstanceStore, IWorkflowInstanceScheduler workflowScheduler, ICrontabParser crontabParser, IClock clock) { _clock = clock; _workflowInstanceStore = workflowInstanceStore; _workflowScheduler = workflowScheduler; _crontabParser = crontabParser; }
public async Task ThenTheWorkflowInstanceWithIdShouldContainContextItems(string instanceId, Table expectedContextItems) { ITenantedWorkflowInstanceStoreFactory instanceStoreFactory = ContainerBindings.GetServiceProvider(this.featureContext) .GetService <ITenantedWorkflowInstanceStoreFactory>(); ITenantProvider tenantProvider = ContainerBindings.GetServiceProvider(this.featureContext) .GetService <ITenantProvider>(); IWorkflowInstanceStore instanceStore = await instanceStoreFactory.GetWorkflowInstanceStoreForTenantAsync(tenantProvider.Root).ConfigureAwait(false); WorkflowInstance instance = await WorkflowRetryHelper.ExecuteWithStandardTestRetryRulesAsync( () => instanceStore.GetWorkflowInstanceAsync(instanceId)).ConfigureAwait(false); Assert.AreEqual( expectedContextItems.Rows.Count, instance.Context.Count, "The number of context items in the workflow instance is different to the number of items in the specified list"); foreach (TableRow current in expectedContextItems.Rows) { Assert.IsTrue( instance.Context.TryGetValue(current[0], out string actualValue), $"The instance context does not contain expected item with key '{current[0]}'"); Assert.AreEqual(current[1], actualValue, $"The instance context does not contain the expected value for key '{current[0]}'"); } }
public List(IWorkflowInstanceStore workflowInstanceStore, IMapper mapper, ILogger <List> logger) { _workflowInstanceStore = workflowInstanceStore; _mapper = mapper; _logger = logger; _stopwatch = new Stopwatch(); }
public CachingWorkflowRegistry(IWorkflowRegistry workflowRegistry, IMemoryCache memoryCache, ICacheSignal cacheSignal, IWorkflowInstanceStore workflowInstanceStore) { _workflowRegistry = workflowRegistry; _memoryCache = memoryCache; _cacheSignal = cacheSignal; _workflowInstanceStore = workflowInstanceStore; }
public HangfireWorkflowDispatcher(IBackgroundJobClient jobClient, IWorkflowInstanceStore workflowInstanceStore, IWorkflowRegistry workflowRegistry, ElsaOptions elsaOptions, ILogger <HangfireWorkflowDispatcher> logger) { _jobClient = jobClient; _workflowInstanceStore = workflowInstanceStore; _workflowRegistry = workflowRegistry; _workflowChannelOptions = elsaOptions.WorkflowChannelOptions; _logger = logger; }
public StartController(IWorkflowRunner workflowInvoker, IWorkflowRegistry workflowRegistry, IWorkflowFactory workflowFactory, IWorkflowInstanceStore workflowInstanceStore, IWorkflowInstanceDispatcher workflowInstanceDispatcher) { this.workflowInvoker = workflowInvoker; this.workflowRegistry = workflowRegistry; this.workflowFactory = workflowFactory; this.workflowInstanceStore = workflowInstanceStore; this.workflowInstanceDispatcher = workflowInstanceDispatcher; }
public Get(IWorkflowInstanceStore workflowInstanceStore, IContentSerializer contentSerializer, IWorkflowRegistry workflowRegistry, ITenantAccessor tenantAccessor, IPublisher publisher) { _workflowInstanceStore = workflowInstanceStore; _contentSerializer = contentSerializer; _workflowRegistry = workflowRegistry; _tenantAccessor = tenantAccessor; _publisher = publisher; }
public WorkflowResumer(IWorkflowRegistry workflowRegistry, IBookmarkFinder bookmarkFinder, IWorkflowInstanceStore workflowInstanceStore, Func <IWorkflowBuilder> workflowBuilderFactory, IWorkflowRunner workflowRunner) { _workflowRegistry = workflowRegistry; _bookmarkFinder = bookmarkFinder; _workflowInstanceStore = workflowInstanceStore; _workflowBuilderFactory = workflowBuilderFactory; _workflowRunner = workflowRunner; }
public QueuingWorkflowDispatcher(ICommandSender commandSender, IWorkflowInstanceStore workflowInstanceStore, IWorkflowRegistry workflowRegistry, ElsaOptions elsaOptions, ILogger <QueuingWorkflowDispatcher> logger) { _commandSender = commandSender; _workflowInstanceStore = workflowInstanceStore; _workflowRegistry = workflowRegistry; _workflowChannelOptions = elsaOptions.WorkflowChannelOptions; _logger = logger; }
public WorkflowPublisher(IWorkflowDefinitionStore workflowDefinitionStore, IWorkflowInstanceStore workflowInstanceStore, IIdGenerator idGenerator, ICloner cloner, IMediator mediator) { _workflowDefinitionStore = workflowDefinitionStore; _workflowInstanceStore = workflowInstanceStore; _idGenerator = idGenerator; _cloner = cloner; _mediator = mediator; }
public WorkflowStarter(ITriggerFinder triggerFinder, IWorkflowFactory workflowFactory, Func <IWorkflowBuilder> workflowBuilderFactory, IWorkflowRunner workflowRunner, IWorkflowInstanceStore workflowInstanceStore) { _triggerFinder = triggerFinder; _workflowFactory = workflowFactory; _workflowBuilderFactory = workflowBuilderFactory; _workflowRunner = workflowRunner; _workflowInstanceStore = workflowInstanceStore; }
public List(IWorkflowInstanceStore workflowInstanceStore, IMapper mapper, IContentSerializer contentSerializer, ILogger <List> logger, ITenantAccessor tenantAccessor) { _workflowInstanceStore = workflowInstanceStore; _mapper = mapper; _contentSerializer = contentSerializer; _logger = logger; _stopwatch = new Stopwatch(); _tenantAccessor = tenantAccessor; }
public async Task ThenThereShouldBeANewWorkflowInstanceInTheWorkflowInstanceStore(int expected) { ITenantedWorkflowInstanceStoreFactory storeFactory = this.serviceProvider.GetRequiredService <ITenantedWorkflowInstanceStoreFactory>(); IWorkflowInstanceStore store = await storeFactory.GetWorkflowInstanceStoreForTenantAsync(this.transientTenantManager.PrimaryTransientClient).ConfigureAwait(false); IEnumerable <string> instances = await store.GetMatchingWorkflowInstanceIdsForSubjectsAsync(Array.Empty <string>(), int.MaxValue, 0).ConfigureAwait(false); Assert.AreEqual(expected, instances.Count()); }
public HttpWorkflowsController( ITokenService tokenService, IWorkflowInvoker workflowInvoker, IWorkflowInstanceStore workflowInstanceStore) { this.tokenService = tokenService; this.workflowInvoker = workflowInvoker; this.workflowInstanceStore = workflowInstanceStore; }
public IndexModel(ILogger <IndexModel> logger, IWorkflowInvoker WorkflowInvoker, ElsaContextEx db, IWorkflowDefinitionStore workflowDefinitionStore, IWorkflowInstanceStore workflowInstanceStore) { _logger = logger; workflowInvoker = WorkflowInvoker; this.workflowDefinitionStore = workflowDefinitionStore; this.workflowInstanceStore = workflowInstanceStore; this.db = db; }
public async Task <ActionResult <bool> > ResumeAsync( [FromServices] IWorkflowInstanceStore wfStore, [FromServices] IWorkflowInvoker wfInvoker, string name, string correlationId, CancellationToken cancellationToken) { await wfInvoker.TriggerSignalAsync(name, correlationId : correlationId, cancellationToken : cancellationToken); // .ResumeAsync(wf, cancellationToken: cancellationToken); return(Ok(true)); }
public ContinueRunningWorkflows( IWorkflowInstanceStore workflowInstanceStore, IWorkflowInstanceDispatcher workflowInstanceDispatcher, IDistributedLockProvider distributedLockProvider, ILogger <ContinueRunningWorkflows> logger) { _workflowInstanceStore = workflowInstanceStore; _workflowInstanceDispatcher = workflowInstanceDispatcher; _distributedLockProvider = distributedLockProvider; _logger = logger; }
public WorkflowInstanceController( IWorkflowInstanceStore workflowInstanceStore, IWorkflowDefinitionStore workflowDefinitionStore, IOptions <ElsaDashboardOptions> options, INotifier notifier) { this.workflowInstanceStore = workflowInstanceStore; this.workflowDefinitionStore = workflowDefinitionStore; this.options = options; this.notifier = notifier; }
public WorkflowTestLaunchpad( IWorkflowRegistry workflowRegistry, IWorkflowInstanceStore workflowInstanceStore, IWorkflowFactory workflowFactory, IWorkflowRunner workflowRunner) { _workflowRegistry = workflowRegistry; _workflowInstanceStore = workflowInstanceStore; _workflowFactory = workflowFactory; _workflowRunner = workflowRunner; }
public async Task TheWorkflowInstanceStoreIsEmpty() { ITenantedWorkflowInstanceStoreFactory storeFactory = this.serviceProvider.GetRequiredService <ITenantedWorkflowInstanceStoreFactory>(); IWorkflowInstanceStore store = await storeFactory.GetWorkflowInstanceStoreForTenantAsync(this.transientTenantManager.PrimaryTransientClient).ConfigureAwait(false); IEnumerable <string> instanceIds = await store.GetMatchingWorkflowInstanceIdsForSubjectsAsync(Array.Empty <string>(), int.MaxValue, 0).ConfigureAwait(false); foreach (string current in instanceIds) { await store.DeleteWorkflowInstanceAsync(current).ConfigureAwait(false); } }
public async Task <int> RunAction( [ActivityTrigger] IDurableActivityContext context) { WorkflowMessageEnvelope envelope = context.GetInputWithCustomSerializationSettings <WorkflowMessageEnvelope>(this.serializerSettingsProvider.Instance); ITenant tenant = await this.tenantProvider.GetTenantAsync(envelope.TenantId); IWorkflowInstanceStore instanceStore = await this.workflowInstanceStoreFactory.GetWorkflowInstanceStoreForTenantAsync(tenant); return(await instanceStore.GetMatchingWorkflowInstanceCountForSubjectsAsync(envelope.Trigger.GetSubjects())); }
public TriggerRequestHandler( IHttpContextAccessor httpContext, IWorkflowInvoker workflowInvoker, IWorkflowRegistry registry, IWorkflowInstanceStore workflowInstanceStore) { this.httpContext = httpContext.HttpContext; this.workflowInvoker = workflowInvoker; this.registry = registry; this.workflowInstanceStore = workflowInstanceStore; cancellationToken = httpContext.HttpContext.RequestAborted; }
public CleanupJob( IWorkflowInstanceStore workflowInstanceStore, IClock clock, IRetentionFilterPipeline retentionFilterPipeline, IOptions <CleanupOptions> options, ILogger <CleanupJob> logger) { _workflowInstanceStore = workflowInstanceStore; _clock = clock; _retentionFilterPipeline = retentionFilterPipeline; _options = options.Value; _logger = logger; }
public LockingWorkflowInstanceExecutor( IWorkflowInstanceExecutor workflowInstanceExecutor, IWorkflowInstanceStore workflowInstanceStore, IDistributedLockProvider distributedLockProvider, ElsaOptions elsaOptions, ILogger <LockingWorkflowInstanceExecutor> logger) { _workflowInstanceExecutor = workflowInstanceExecutor; _workflowInstanceStore = workflowInstanceStore; _distributedLockProvider = distributedLockProvider; _elsaOptions = elsaOptions; _logger = logger; }
public WorkflowReviver( IResumesWorkflow resumesWorkflow, IWorkflowInstanceDispatcher workflowInstanceDispatcher, IWorkflowRegistry workflowRegistry, IWorkflowInstanceStore workflowInstanceStore, IGetsStartActivitiesForCompositeActivityBlueprint startingActivitiesProvider) { _resumesWorkflow = resumesWorkflow; _workflowInstanceDispatcher = workflowInstanceDispatcher; _workflowRegistry = workflowRegistry; _workflowInstanceStore = workflowInstanceStore; _startingActivitiesProvider = startingActivitiesProvider ?? throw new ArgumentNullException(nameof(startingActivitiesProvider)); }