# Class BulkTaskResult OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskResult Represents the result of a bulk task execution. For tasks that have not finished, [BulkTaskResult.Empty](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskResult-TResult/) is used. Namespace: [OptimaJet.Workflow.Core.Runtime.Bulk](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/) ```csharp public record BulkTaskResult : IEquatable> ``` ## Type Hierarchy - BulkTaskResult Current type - Implemented interfaces - [IEquatable>](https://learn.microsoft.com/dotnet/api/system.iequatable-1) ## Constructors `public BulkTaskResult(BulkTaskState State, TResult? Result = default, Exception? Exception = null, DateTimeOffset? StartedAt = null, DateTimeOffset? FinalizedAt = null)` Represents the result of a bulk task execution. For tasks that have not finished, [BulkTaskResult.Empty](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskResult-TResult/) is used. ### Parameters | Name | Type | Description | | --- | --- | --- | | `State` | `BulkTaskState` | The state of the task. | | `Result` | `{TResult}` | If the task has completed with the status [BulkTaskState.Completed](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/), the result will be stored here; otherwise, it will be null. | | `Exception` | `Exception` | If the task has completed with the status [BulkTaskState.Failed](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/), the exception will be stored here; otherwise, it will be null. | | `StartedAt` | `Nullable` | The timestamp recorded when the task transitions to [BulkTaskState.Running](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/) and before task execution starts. | | `FinalizedAt` | `Nullable` | The timestamp recorded after transitioning to [BulkTaskState.Completed](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/) or [BulkTaskState.Failed](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/), before the task result is returned. | ## Properties `public BulkTaskState State { get; init; }` The state of the task. `public TResult? Result { get; init; }` If the task has completed with the status [BulkTaskState.Completed](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/), the result will be stored here; otherwise, it will be null. `public Exception? Exception { get; init; }` If the task has completed with the status [BulkTaskState.Failed](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/), the exception will be stored here; otherwise, it will be null. `public DateTimeOffset? StartedAt { get; init; }` The timestamp recorded when the task transitions to [BulkTaskState.Running](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/) and before task execution starts. `public DateTimeOffset? FinalizedAt { get; init; }` The timestamp recorded after transitioning to [BulkTaskState.Completed](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/) or [BulkTaskState.Failed](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/), before the task result is returned. `public static BulkTaskResult Empty { get; }` Gets a canonical result value for a task that has not yet started. `public TimeSpan? Duration { get; }` Gets the elapsed time between task start and finalization. [Previous BulkTaskFinalizedEventArgs](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskFinalizedEventArgs-TId-TResult/) [Next BulkTaskState](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Bulk/BulkTaskState/)