C# Class InvertedSoftware.WorkflowEngine.Processor

The class in charge of processing framework jobs
显示文件 Open project: invertedsoftware/Inverted-Software-Workflow-Engine

Public Properties

Property Type Description
JobsRunning int

Private Properties

Property Type Description
LoadActiveQueue void
RunFramework void
RunFramework void
RunFrameworkJob void
RunRemoteTransactionalFramework void
RunTransactionalFramework void

Public Methods

Method Description
Processor ( ) : System

Constracor

ProcessorQueue_ProcessorQueueChanged ( object sender, ProcessorQueueChangedEventArgs e ) : void

This fires in the rare event when the queue goes offline. The framework will then look for another queue This will simply soft restart the processor, which will point to the next available queue

ReportJobComplete ( IWorkflowMessage workflowMessage, ProcessorJob currentJob ) : void
ReportJobError ( Exception e, ProcessorStep workflowStep, IWorkflowMessage workflowMessage, ProcessorJob currentJob ) : void

Reports a job error

StartFramework ( string jobName ) : void

This method starts the framework and blocks. Call this from an exe or a windows service on a new thread.

StopFramework ( bool isSoftExit ) : void

Stop the framework from processing any more jobs

workflowQueue_PeekCompleted ( object sender, System.Messaging.PeekCompletedEventArgs e ) : void

Private Methods

Method Description
LoadActiveQueue ( ) : void

Load the active Queue for the next Job

RunFramework ( ) : void
RunFramework ( int exceptionsBeforeExit, int currentExceptionNumber, int pauseFor ) : void

Starts to run the framework

RunFrameworkJob ( System.Messaging.Message queueMessage, System.Messaging.MessageQueueTransaction transaction ) : void

Runs a single job thread

RunRemoteTransactionalFramework ( ) : void

Starts to listen to a remote Transactional Queue and process Jobs This is not tested yet

RunTransactionalFramework ( ) : void

Starts to listen to a local Transactional Queue and process Jobs

Method Details

Processor() public method

Constracor
public Processor ( ) : System
return System

ProcessorQueue_ProcessorQueueChanged() public method

This fires in the rare event when the queue goes offline. The framework will then look for another queue This will simply soft restart the processor, which will point to the next available queue
public ProcessorQueue_ProcessorQueueChanged ( object sender, ProcessorQueueChangedEventArgs e ) : void
sender object
e InvertedSoftware.WorkflowEngine.DataObjects.ProcessorQueueChangedEventArgs
return void

ReportJobComplete() public static method

public static ReportJobComplete ( IWorkflowMessage workflowMessage, ProcessorJob currentJob ) : void
workflowMessage IWorkflowMessage
currentJob InvertedSoftware.WorkflowEngine.DataObjects.ProcessorJob
return void

ReportJobError() public static method

Reports a job error
public static ReportJobError ( Exception e, ProcessorStep workflowStep, IWorkflowMessage workflowMessage, ProcessorJob currentJob ) : void
e System.Exception The exception to report
workflowStep InvertedSoftware.WorkflowEngine.DataObjects.ProcessorStep
workflowMessage IWorkflowMessage The original message pulled from the queue
currentJob InvertedSoftware.WorkflowEngine.DataObjects.ProcessorJob
return void

StartFramework() public method

This method starts the framework and blocks. Call this from an exe or a windows service on a new thread.
public StartFramework ( string jobName ) : void
jobName string The workflow job name
return void

StopFramework() public method

Stop the framework from processing any more jobs
public StopFramework ( bool isSoftExit ) : void
isSoftExit bool Block untill the current jobs are done
return void

workflowQueue_PeekCompleted() public method

public workflowQueue_PeekCompleted ( object sender, System.Messaging.PeekCompletedEventArgs e ) : void
sender object
e System.Messaging.PeekCompletedEventArgs
return void

Property Details

JobsRunning public_oe property

Get the count of jobs currently running
public int JobsRunning
return int