public async Task <IActionResult> Launch() { await _workflowRunner.BuildAndStartWorkflowAsync <RocketWorkflow>(); // Returning empty (the workflow will write an HTTP response). return(new EmptyResult()); }
public async Task StartAsync(CancellationToken cancellationToken) { var instance = await _workflowRunner.BuildAndStartWorkflowAsync <PersistableWorkflow>(cancellationToken : cancellationToken); var retrievedInstance = await _instanceStore.FindByIdAsync(instance.Id, cancellationToken); Assert.NotNull(retrievedInstance); }
public async Task StartAsync(CancellationToken cancellationToken) { var instance = await _workflowRunner.BuildAndStartWorkflowAsync <TWorkflow>(cancellationToken : cancellationToken); var retrievedInstance = await _instanceStore.FindByIdAsync(instance.Id, cancellationToken); // An instance should totally be retrieved from the store Assert.NotNull(retrievedInstance); // Because we are in-memory, it should be a reference to the same instance Assert.Same(instance, retrievedInstance); }