< Summary

Information
Class: Elsa.Workflows.Runtime.WorkflowInvoker
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/WorkflowInvoker.cs
Line coverage
50%
Covered lines: 3
Uncovered lines: 3
Coverable lines: 6
Total lines: 22
Line coverage: 50%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
InvokeAsync()100%210%
InvokeAsync()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/WorkflowInvoker.cs

#LineLine coverage
 1using Elsa.Workflows.Activities;
 2using Elsa.Workflows.Models;
 3using Elsa.Workflows.Options;
 4
 5namespace Elsa.Workflows.Runtime;
 6
 7/// <inheritdoc />
 88public class WorkflowInvoker(IWorkflowGraphBuilder workflowGraphBuilder, IWorkflowRunner workflowRunner) : IWorkflowInvo
 9{
 10    /// <inheritdoc />
 11    public async Task<RunWorkflowResult> InvokeAsync(Workflow workflow, RunWorkflowOptions? options = default, Cancellat
 12    {
 013        var workflowGraph = await workflowGraphBuilder.BuildAsync(workflow, cancellationToken);
 014        return await InvokeAsync(workflowGraph, options, cancellationToken);
 015    }
 16
 17    /// <inheritdoc />
 18    public async Task<RunWorkflowResult> InvokeAsync(WorkflowGraph workflowGraph, RunWorkflowOptions? options = default,
 19    {
 820        return await workflowRunner.RunAsync(workflowGraph, options, cancellationToken);
 821    }
 22}