Skip to main content

Class RunResult

Encapsulates everything returned by a Workspace.XBR.Xperiflow.Routines.Runs.Run in a stopping criteria state: execution details, run metadata, and every artifact (both in-memory and file-backed) produced by the routine method.

Namespace: Workspace.XBR.Xperiflow.Routines.Runs

Assembly: Xperiflow.dll

Declaration
public class RunResult

Examples

Typical pattern – read an in-memory JSON artifact and a stored CSV:

// Run has already completed successfully and returned a RunResult
RunResult rr = run.StartAndWaitForSuccessfulCompletionResultAsync().Result;

// ---------- In-memory JSON ----------
ArtifactInfo aiJs = rr.GetArtifactInfo("concat_str"); // JSON-serialisable
if (aiJs?.HasInMemoryArtifact == true)
{
InMemoryJsonArtifact jsArtifact = aiJs.GetInMemoryJsonArtifactAsync().Result;
JObject j = jsArtifact.GetArtifactData();
}

// ---------- Stored CSV on disk ----------
ArtifactInfo aiCsv = rr.GetArtifactInfo("predictions"); // Stored on file system
if (aiCsv?.HasArtifactStored == true)
{
Artifact art = aiCsv.GetArtifactAsync().Result;
string csv = art.GetDataAsObjectAsync().Result;
}

Remarks

A RunResult instance is produced by the “_AndWaitForSuccessfulCompletion_” helpers on Workspace.XBR.Xperiflow.Routines.Runs.Run—for example Workspace.XBR.Xperiflow.Routines.Runs.Run.StartAndWaitForSuccessfulCompletionResultAsync(System.Threading.CancellationToken). It is a read-only snapshot; changing the underlying run on the server will not mutate an existing RunResult.

What the object delivers

Choosing an access path

Synchronous consumption All asynchronous helpers can be used synchronously via .Result or .Wait(). For example:

// Run synchronously and capture the full result
RunResult rr = run.StartAndWaitForSuccessfulCompletionResultAsync().Result;

// ----- CSV artifact retrieved from the MetaFileSystem -----
ArtifactInfo ai = rr.GetArtifactInfo("predictions");
Artifact a = ai.GetArtifactAsync().Result; // materialise Artifact
string csv = a.GetDataAsObjectAsync().Result; // read file content

Properties

ExecutionMetadata

The execution metadata associated with the Run that is in a completed state.

Declaration
public ExecutionMetadata ExecutionMetadata { get; }

RunMetadata

The run metadata associated with the Run.

Declaration
public RunMetadata RunMetadata { get; }

ArtifactInfos

The list of ArtifactInfos for the run.

Declaration
public List<ArtifactInfo> ArtifactInfos { get; }

Methods

GetArtifactInfo(string)

Retrieve an Artifact Info object by its qualified key.

Declaration
public ArtifactInfo? GetArtifactInfo(string qualifiedKey)
Returns

Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactInfo

Parameters
TypeName
System.StringqualifiedKey

Inherited Members

  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.ToString

Was this page helpful?