< Summary

Information
Class: Elsa.Bpmn.Hosting.BpmnWorkRecord
Assembly: Elsa.Bpmn
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Bpmn/Hosting/BpmnWorkRecord.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 33
Line coverage: 100%
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
get_Handle()100%11100%
get_BindingRef()100%11100%
get_IterationId()100%11100%
get_ElementId()100%11100%
get_ChildContextId()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Bpmn/Hosting/BpmnWorkRecord.cs

#LineLine coverage
 1namespace Elsa.Bpmn.Hosting;
 2
 3/// <summary>
 4/// One unit of work a BPMN scope started and has not finished: the interpreter's view of it, plus the identity of
 5/// the Elsa activity execution that runs it.
 6/// </summary>
 7/// <remarks>
 8/// <para>
 9/// <see cref="ChildContextId"/> is the whole point of this record. A unit of work is keyed on the child
 10/// <see cref="Elsa.Workflows.ActivityExecutionContext"/>'s id and never on <c>ActivityExecutionContext.Tag</c>.
 11/// Tag is shared mutable state: the completion-callback dispatch writes the popped callback entry's tag onto the
 12/// <i>receiving</i> context, so a nested scope's own tag is rewritten by its own children, and a parent that
 13/// remembered a child as one tag finds the child wearing another. Making the handles globally unique does not fix
 14/// that, because the two values are written by different owners at different times.
 15/// </para>
 16/// </remarks>
 17internal sealed class BpmnWorkRecord
 18{
 19    /// <summary>The opaque host handle the interpreter echoes back. Scope-local and minted by <see cref="BpmnWorkLedger
 64120    public string Handle { get; set; } = null!;
 21
 22    /// <summary>The binding ref the interpreter asked to start.</summary>
 76223    public string BindingRef { get; set; } = null!;
 24
 25    /// <summary>The multi-instance iteration id this unit runs under, or <c>null</c> for ordinary single-run work.</sum
 62726    public string? IterationId { get; set; }
 27
 28    /// <summary>The element the work belongs to, for reporting.</summary>
 51529    public string ElementId { get; set; } = null!;
 30
 31    /// <summary>The id of the child <see cref="Elsa.Workflows.ActivityExecutionContext"/> running this work.</summary>
 62632    public string ChildContextId { get; set; } = null!;
 33}