< Summary

Information
Class: Elsa.Api.Client.Resources.ActivityExecutions.Models.ActivityExecutionRecordSummary
Assembly: Elsa.Api.Client
File(s): /home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/ActivityExecutions/Models/ActivityExecutionRecordSummary.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 26
Coverable lines: 26
Total lines: 86
Line coverage: 0%
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_WorkflowInstanceId()100%210%
get_ActivityId()100%210%
get_ActivityNodeId()100%210%
get_ActivityType()100%210%
get_ActivityTypeVersion()100%210%
get_ActivityName()100%210%
get_StartedAt()100%210%
get_HasBookmarks()100%210%
get_Metadata()100%210%
get_Status()100%210%
get_CompletedAt()100%210%
FromRecord(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/ActivityExecutions/Models/ActivityExecutionRecordSummary.cs

#LineLine coverage
 1using Elsa.Api.Client.Shared.Models;
 2
 3namespace Elsa.Api.Client.Resources.ActivityExecutions.Models;
 4
 5/// <summary>
 6/// Represents a summarized view of a single activity execution of an activity instance.
 7/// </summary>
 8public class ActivityExecutionRecordSummary : Entity
 9{
 10    /// <summary>
 11    /// Gets or sets the workflow instance ID.
 12    /// </summary>
 013    public string WorkflowInstanceId { get; set; } = null!;
 14
 15    /// <summary>
 16    /// Gets or sets the activity ID.
 17    /// </summary>
 018    public string ActivityId { get; set; } = null!;
 19
 20    /// <summary>
 21    /// Gets or sets the activity node ID.
 22    /// </summary>
 023    public string ActivityNodeId { get; set; } = null!;
 24
 25    /// <summary>
 26    /// The type of the activity.
 27    /// </summary>
 028    public string ActivityType { get; set; } = null!;
 29
 30    /// <summary>
 31    /// The version of the activity type.
 32    /// </summary>
 033    public int ActivityTypeVersion { get; set; }
 34
 35    /// <summary>
 36    /// The name of the activity.
 37    /// </summary>
 038    public string? ActivityName { get; set; }
 39
 40    /// <summary>
 41    /// Gets or sets the time at which the activity execution began.
 42    /// </summary>
 043    public DateTimeOffset StartedAt { get; set; }
 44
 45    /// <summary>
 46    /// Gets or sets whether the activity has any bookmarks.
 47    /// </summary>
 048    public bool HasBookmarks { get; set; }
 49
 50    /// <summary>
 51    /// Gets or sets metadata for the activity execution.
 52    /// </summary>
 053    public IDictionary<string, object?>? Metadata { get; set; }
 54
 55    /// <summary>
 56    /// Gets or sets the status of the activity.
 57    /// </summary>
 058    public ActivityStatus Status { get; set; }
 59
 60    /// <summary>
 61    /// Gets or sets the time at which the activity execution completed.
 62    /// </summary>
 063    public DateTimeOffset? CompletedAt { get; set; }
 64
 65    /// <summary>
 66    /// Returns a summary view of the specified <see cref="ActivityExecutionRecord"/>.
 67    /// </summary>
 68    public static ActivityExecutionRecordSummary FromRecord(ActivityExecutionRecord record)
 69    {
 070        return new()
 071        {
 072            Id = record.Id,
 073            WorkflowInstanceId = record.WorkflowInstanceId,
 074            ActivityId = record.ActivityId,
 075            ActivityNodeId = record.ActivityNodeId,
 076            ActivityType = record.ActivityType,
 077            ActivityTypeVersion = record.ActivityTypeVersion,
 078            ActivityName = record.ActivityName,
 079            StartedAt = record.StartedAt,
 080            HasBookmarks = record.HasBookmarks,
 081            Status = record.Status,
 082            CompletedAt = record.CompletedAt,
 083            Metadata = record.Metadata
 084        };
 85    }
 86}