| | | 1 | | using Elsa.Common.Entities; |
| | | 2 | | using Elsa.Workflows.Runtime.Filters; |
| | | 3 | | using Elsa.Workflows.Runtime.Options; |
| | | 4 | | |
| | | 5 | | namespace Elsa.Workflows.Runtime.Entities; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// Represents a bookmark queue item that is used to resume bookmarks that may not yet have been stored. |
| | | 9 | | /// </summary> |
| | | 10 | | public class BookmarkQueueItem : Entity |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// The workflow instance ID owning the bookmark to resume. |
| | | 14 | | /// </summary> |
| | 3346 | 15 | | public string? WorkflowInstanceId { get; set; } |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// The correlation ID associated with the workflow instance owning the bookmark to resume. |
| | | 19 | | /// </summary> |
| | 1164 | 20 | | public string? CorrelationId { get; set; } |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// The bookmark ID to resume. |
| | | 24 | | /// </summary> |
| | 1228 | 25 | | public string? BookmarkId { get; set; } |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// A bookmark payload hash of the bookmark to resume. |
| | | 29 | | /// </summary> |
| | 2328 | 30 | | public string? StimulusHash { get; set; } |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// The ID of the activity instance associated with the bookmark. |
| | | 34 | | /// </summary> |
| | 1164 | 35 | | public string? ActivityInstanceId { get; set; } |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// The type name of the activity associated with the bookmark. |
| | | 39 | | /// </summary> |
| | 3364 | 40 | | public string? ActivityTypeName { get; set; } |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Any options to apply when resuming the bookmark. |
| | | 44 | | /// </summary> |
| | 2357 | 45 | | public ResumeBookmarkOptions? Options { get; set; } |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// The timestamp that this entity was created. |
| | | 49 | | /// </summary> |
| | 67 | 50 | | public DateTimeOffset CreatedAt { get; set; } |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// Creates a <see cref="BookmarkFilter"/> from this bookmark queue item. |
| | | 54 | | /// </summary> |
| | | 55 | | public BookmarkFilter CreateBookmarkFilter() |
| | | 56 | | { |
| | 1100 | 57 | | return new() |
| | 1100 | 58 | | { |
| | 1100 | 59 | | WorkflowInstanceId = WorkflowInstanceId, |
| | 1100 | 60 | | CorrelationId = CorrelationId, |
| | 1100 | 61 | | BookmarkId = BookmarkId, |
| | 1100 | 62 | | Hash = StimulusHash, |
| | 1100 | 63 | | ActivityInstanceId = ActivityInstanceId, |
| | 1100 | 64 | | Name = ActivityTypeName |
| | 1100 | 65 | | }; |
| | | 66 | | } |
| | | 67 | | } |