Beispiel #1
0
        public async Task <WorkflowExecutionContext> ResumeAsync(
            WorkflowInstance workflowInstance,
            Variables input = null,
            IEnumerable <string> startActivityIds = default,
            CancellationToken cancellationToken   = default)
        {
            var definition = await workflowRegistry.GetWorkflowDefinitionAsync(
                workflowInstance.DefinitionId,
                VersionOptions.SpecificVersion(workflowInstance.Version),
                cancellationToken);

            var workflow = workflowFactory.CreateWorkflow(definition, input, workflowInstance);

            return(await ResumeAsync(workflow, startActivityIds, cancellationToken));
        }
Beispiel #2
0
 public static Task <WorkflowDefinitionVersion> GetWorkflowDefinitionAsync <T>(this IWorkflowRegistry workflowRegistry)
 {
     return(workflowRegistry.GetWorkflowDefinitionAsync(typeof(T).Name, VersionOptions.Latest));
 }