| | | 1 | | namespace 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> |
| | | 17 | | internal sealed class BpmnWorkRecord |
| | | 18 | | { |
| | | 19 | | /// <summary>The opaque host handle the interpreter echoes back. Scope-local and minted by <see cref="BpmnWorkLedger |
| | 641 | 20 | | public string Handle { get; set; } = null!; |
| | | 21 | | |
| | | 22 | | /// <summary>The binding ref the interpreter asked to start.</summary> |
| | 762 | 23 | | 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 |
| | 627 | 26 | | public string? IterationId { get; set; } |
| | | 27 | | |
| | | 28 | | /// <summary>The element the work belongs to, for reporting.</summary> |
| | 515 | 29 | | public string ElementId { get; set; } = null!; |
| | | 30 | | |
| | | 31 | | /// <summary>The id of the child <see cref="Elsa.Workflows.ActivityExecutionContext"/> running this work.</summary> |
| | 626 | 32 | | public string ChildContextId { get; set; } = null!; |
| | | 33 | | } |