Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/WorkflowCore/Services/WorkflowHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public WorkflowHost(IPersistenceProvider persistenceStore, IQueueProvider queueP
_activityController = activityController;
_lifeCycleEventHub = lifeCycleEventHub;
}

public Task<string> StartWorkflow(string workflowId, object data = null, string reference=null)
{
return _workflowController.StartWorkflow(workflowId, data, reference);
Expand All @@ -65,7 +65,7 @@ public Task<string> StartWorkflow<TData>(string workflowId, TData data = null, s
{
return _workflowController.StartWorkflow<TData>(workflowId, null, data, reference);
}

public Task<string> StartWorkflow<TData>(string workflowId, int? version, TData data = null, string reference=null)
where TData : class, new()
{
Expand All @@ -81,7 +81,7 @@ public void Start()
{
StartAsync(CancellationToken.None).GetAwaiter().GetResult();
}

public async Task StartAsync(CancellationToken cancellationToken)
{
var activity = WorkflowActivity.StartHost();
Expand All @@ -105,7 +105,7 @@ public async Task StartAsync(CancellationToken cancellationToken)
}
catch (Exception ex)
{
activity.AddException(ex);
activity?.AddException(ex);
throw;
}
finally
Expand All @@ -118,7 +118,7 @@ public void Stop()
{
StopAsync(CancellationToken.None).GetAwaiter().GetResult();
}

public async Task StopAsync(CancellationToken cancellationToken)
{
_shutdown = true;
Expand Down
Loading