Interface IWorker
Alternate interface used by Job work processors where the Document type isn't needed.
public interface IWorker
Remarks
This type of work process (where the Document type isn't known or required) is useful in situations where you have a work processor that is re-used in multiple different Flows.
For instance, if you have a worker that sends a notification email. The job Data in JobDefinitionSettings may contain information about the To address, subject, etc. In this case, the document itself my be irrelevant, or the email worker may generically format the document as JSON within the email. Either way, it's not necessary to have the document deserialized to a specific object.
Methods
ProcessJob(IWorkRequest)
Process a single work request.
Task<WorkResponse> ProcessJob(IWorkRequest request)
Parameters
request
IWorkRequest
Returns
ProcessJob(Message<IWorkRequest>)
Process an incoming Message containing a Job work request.
Task<Message<WorkResponse>> ProcessJob(Message<IWorkRequest> requestMessage)
Parameters
requestMessage
Message<IWorkRequest>
Returns
Remarks
Default implementation wraps the parameters and response for the previous implementation in Message<T> objects.