Table of Contents

Class WorkResponse

Namespace
JobFlow.Models.Jobs
Assembly
JobFlow.Models.dll

The response sent by a worker back to the system when work is completed.

public class WorkResponse
Inheritance
WorkResponse

Properties

JobExternalId

External Id of the Job this response represents.

public Guid JobExternalId { get; set; }

Property Value

Guid

Messages

Response messages. These are persisted in the primary JobFlow database for debugging and tracing.

public List<ResponseLogEntry> Messages { get; set; }

Property Value

List<ResponseLogEntry>

Properties

Additional properties to be sent in the response.

public Dictionary<string, string> Properties { get; set; }

Property Value

Dictionary<string, string>

ResponseData

Additional data/object that can be used within the Flow rules.

public JObject ResponseData { get; set; }

Property Value

JObject

Status

Response status.

public WorkResponseStatus Status { get; set; }

Property Value

WorkResponseStatus

Methods

FromRequest(IWorkRequest, WorkResponseStatus, params ResponseLogEntry[])

Generate a response message from the original incoming request.

public static WorkResponse FromRequest(IWorkRequest jobModel, WorkResponseStatus status = WorkResponseStatus.Success, params ResponseLogEntry[] messages)

Parameters

jobModel IWorkRequest
status WorkResponseStatus
messages ResponseLogEntry[]

Returns

WorkResponse

FromRequest<D>(IWorkRequest, D, WorkResponseStatus, params ResponseLogEntry[])

Generate a response message from the original incoming request. Allows specifying a return data object.

public static WorkResponse FromRequest<D>(IWorkRequest jobModel, D data, WorkResponseStatus status = WorkResponseStatus.Success, params ResponseLogEntry[] messages) where D : class

Parameters

jobModel IWorkRequest
data D
status WorkResponseStatus
messages ResponseLogEntry[]

Returns

WorkResponse

Type Parameters

D