Zum Hauptinhalt springen

LeaseWorkOutcome

Namespace: Meshmakers.Octo.Sdk.Common.Adapters

Outcome of the work a lease was granted for.

public struct LeaseWorkOutcome

Inheritance Object β†’ ValueType β†’ LeaseWorkOutcome
Implements IEquatable<LeaseWorkOutcome>

Remarks:

πŸ”΄ The output travels on the release because there is no other route. A dedicated adapter reports it on IAdapterHub.ReportExecutionEndAsync, whose tenant and adapter come from the connection; a pool member holds a tenant-free management channel and has no such connection. Without this the borrower's leased execution would complete with an empty OutputData where its own adapter would have filled it.

Properties​

Success​

Whether the work item succeeded.

public bool Success { get; set; }

Property Value​

Boolean

StatusMessage​

Human-readable outcome, carried back to the controller on the release. πŸ”΄ Must never contain credential material β€” it is logged and stored on the borrower's execution.

public string StatusMessage { get; set; }

Property Value​

String

OutputData​

What the pipeline declared as its result (SetPipelineExecutionResult@1), or null. Carried back on the release and written onto the borrower's execution.

public string OutputData { get; set; }

Property Value​

String

FailureKind​

What a failed work item says about its writes, derived with ; null on success. Carried back on the release () so a pipeline method answers METHOD_OUTCOME_UNKNOWN when a write was not acknowledged.

public Nullable<PipelineExecutionFailureKind> FailureKind { get; set; }

Property Value​

Nullable<PipelineExecutionFailureKind>

Remarks:

Not a positional member on purpose: the generated constructor and Deconstruct keep their shape for existing consumers.

Constructors​

LeaseWorkOutcome(Boolean, String, String)​

Outcome of the work a lease was granted for.

public LeaseWorkOutcome(bool Success, string StatusMessage, string OutputData)

Parameters​

Success Boolean
Whether the work item succeeded.

StatusMessage String
Human-readable outcome, carried back to the controller on the release. πŸ”΄ Must never contain credential material β€” it is logged and stored on the borrower's execution.

OutputData String
What the pipeline declared as its result (SetPipelineExecutionResult@1), or null. Carried back on the release and written onto the borrower's execution.

Remarks:

πŸ”΄ The output travels on the release because there is no other route. A dedicated adapter reports it on IAdapterHub.ReportExecutionEndAsync, whose tenant and adapter come from the connection; a pool member holds a tenant-free management channel and has no such connection. Without this the borrower's leased execution would complete with an empty OutputData where its own adapter would have filled it.

Methods​

Succeeded(String, String)​

The work item ran and succeeded.

public static LeaseWorkOutcome Succeeded(string statusMessage, string outputData)

Parameters​

statusMessage String

outputData String

Returns​

LeaseWorkOutcome

Failed(String)​

The work item ran and failed.

public static LeaseWorkOutcome Failed(string statusMessage)

Parameters​

statusMessage String

Returns​

LeaseWorkOutcome

Failed(String, Nullable<PipelineExecutionFailureKind>)​

The work item ran and failed; failureKind says what that means for its writes.

public static LeaseWorkOutcome Failed(string statusMessage, Nullable<PipelineExecutionFailureKind> failureKind)

Parameters​

statusMessage String
Human-readable outcome; never credential material.

failureKind Nullable<PipelineExecutionFailureKind>
What the failure says about the writes; null = Failed.

Returns​

LeaseWorkOutcome