Class FlowGraphOrchestrator
Orchestrates a job containing a
Inherited Members
Namespace: DNVGL.One.Compute.Scheduling.Scheduler
Assembly: DNVGL.One.Compute.Scheduling.dll
Syntax
public class FlowGraphOrchestrator : JobOrchestratorBase, IJobOrchestrator, IJobEventPublisher
Constructors
View SourceFlowGraphOrchestrator(IJobEventPublisher, ILogger, IWorkScheduler, IWorkItemStatusService, IJobStatusService, IFlowModelStorageService<WorkItem>)
Initializes a new instance of the FlowGraphOrchestrator class.
Declaration
public FlowGraphOrchestrator(IJobEventPublisher eventPublisher, ILogger logger, IWorkScheduler scheduler, IWorkItemStatusService taskStatusService, IJobStatusService jobStatusService, IFlowModelStorageService<WorkItem> workItemStorageService)
Parameters
| Type | Name | Description |
|---|---|---|
| IJobEventPublisher | eventPublisher | The job event publisher. |
| ILogger | logger | The logger. |
| IWorkScheduler | scheduler | The scheduler. |
| IWorkItemStatusService | taskStatusService | The task status service. |
| IJobStatusService | jobStatusService | The job status service. |
| IFlowModelStorageService<WorkItem> | workItemStorageService | The work item storage service. |
Methods
View SourceAddDynamicWorkTask(String, Task<WorkStatus>)
Register the asynchronous task that processes the work item with the given id.
Declaration
public override void AddDynamicWorkTask(string workId, Task<WorkStatus> dynamicWorkTask)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | workId | Id of the work item being processed by the task. |
| Task<WorkStatus> | dynamicWorkTask | A task returning the final work status of the work item. |
Overrides
View SourceAddWorkToJob(Job, WorkItem)
Adds work to job.
Declaration
public override WorkStatus AddWorkToJob(Job job, WorkItem work)
Parameters
| Type | Name | Description |
|---|---|---|
| Job | job | The job. |
| WorkItem | work | Work to be added. |
Returns
| Type | Description |
|---|---|
| WorkStatus | Work status of the work item. |
Overrides
View SourceWork(Job)
Orchestrate the job.
Declaration
public override void Work(Job job)
Parameters
| Type | Name | Description |
|---|---|---|
| Job | job | The job. |
Overrides
Explicit Interface Implementations
View SourceIJobEventPublisher.PostJobProgressChangedAsync(String, Double, String)
Posts a job progress changed event.
Declaration
async Task IJobEventPublisher.PostJobProgressChangedAsync(string jobId, double progress, string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | jobId | The job identifier. |
| System.Double | progress | The progress. |
| System.String | message | The message. |
Returns
| Type | Description |
|---|---|
| Task | Asynchronous |
IJobEventPublisher.PostJobStatusChangedAsync(String, WorkStatus, String)
Posts a job status changed event.
Declaration
async Task IJobEventPublisher.PostJobStatusChangedAsync(string jobId, WorkStatus jobStatus, string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | jobId | The job identifier. |
| WorkStatus | jobStatus | The job status. |
| System.String | message | The message. |
Returns
| Type | Description |
|---|---|
| Task | Asynchronous |
IJobEventPublisher.PostWorkItemProgressChangedAsync(String, String, Double, String)
Posts a work item progress changed event.
Declaration
async Task IJobEventPublisher.PostWorkItemProgressChangedAsync(string jobId, string workItemId, double progress, string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | jobId | The job identifier. |
| System.String | workItemId | The work item identifier. |
| System.Double | progress | The progress. |
| System.String | message | The message. |
Returns
| Type | Description |
|---|---|
| Task | Asynchronous |
IJobEventPublisher.PostWorkItemStatusChangedAsync(String, String, WorkStatus, String)
Posts a work item status changed event.
Declaration
async Task IJobEventPublisher.PostWorkItemStatusChangedAsync(string jobId, string workItemId, WorkStatus workItemStatus, string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | jobId | The job identifier. |
| System.String | workItemId | The work item identifier. |
| WorkStatus | workItemStatus | The work item status. |
| System.String | message | The message. |
Returns
| Type | Description |
|---|---|
| Task | Asynchronous |