# Class WorkflowProcessTimer OptimaJet.Workflow.SQLite.WorkflowProcessTimer Database object for workflow process timer operations. Namespace: [OptimaJet.Workflow.SQLite](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/) ```csharp public class WorkflowProcessTimer : DbObject ``` ## Type Hierarchy - [DbObject](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/DbObject-TEntity/) - WorkflowProcessTimer Current type ## Constructors `public WorkflowProcessTimer(string schemaName, int commandTimeout)` Initializes a new instance of [WorkflowProcessTimer](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowProcessTimer/). ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemaName` | `String` | The database schema name. | | `commandTimeout` | `Int32` | The command timeout in seconds. | ## Methods `public Task DeleteInactiveByProcessIdAsync(SqliteConnection connection, Guid processId, SqliteTransaction transaction = null)` Deletes all inactive (ignored) timers for the specified process. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `processId` | `Guid` | The process identifier. | | `transaction` | `SqliteTransaction` | An optional transaction. | ### Returns | Type | Description | | --- | --- | | `Task` | The number of rows affected. | `public Task DeleteByProcessIdAsync(SqliteConnection connection, Guid processId, List timersIgnoreList = null, SqliteTransaction transaction = null)` Deletes timers for the specified process, excluding those in the ignore list. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `processId` | `Guid` | The process identifier. | | `timersIgnoreList` | `List` | Timer names to exclude from deletion, or `null` to delete all. | | `transaction` | `SqliteTransaction` | An optional transaction. | ### Returns | Type | Description | | --- | --- | | `Task` | The number of rows affected. | `public Task SelectByProcessIdAndNameAsync(SqliteConnection connection, Guid processId, string name)` Selects a timer by process identifier and timer name. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `processId` | `Guid` | The process identifier. | | `name` | `String` | The timer name. | ### Returns | Type | Description | | --- | --- | | `Task` | The matching timer entity, or `null` if not found. | `public Task> SelectByProcessIdAsync(SqliteConnection connection, Guid processId)` Selects all timers for the specified process. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `processId` | `Guid` | The process identifier. | ### Returns | Type | Description | | --- | --- | | `Task` | An enumerable of timer entities. | `public Task> SelectActiveByProcessIdAsync(SqliteConnection connection, Guid processId)` Selects all active (non-ignored) timers for the specified process. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `processId` | `Guid` | The process identifier. | ### Returns | Type | Description | | --- | --- | | `Task` | An enumerable of active timer entities. | `public Task SetTimerIgnoreAsync(SqliteConnection connection, Guid timerId)` Marks a timer as ignored (inactive) by its identifier. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `timerId` | `Guid` | The timer identifier. | ### Returns | Type | Description | | --- | --- | | `Task` | The number of rows affected. | `public Task GetTopTimersToExecuteAsync(SqliteConnection connection, int top, DateTime now)` Selects the top timers that are due for execution (next execution time is at or before the specified time). ### Parameters | Name | Type | Description | | --- | --- | --- | | `connection` | `SqliteConnection` | The SQLite connection. | | `top` | `Int32` | The maximum number of timers to return. | | `now` | `DateTime` | The current time to compare against. | ### Returns | Type | Description | | --- | --- | | `Task` | An array of timer entities ready for execution. | [Previous WorkflowProcessScheme](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowProcessScheme/) [Next WorkflowProcessTransitionHistory](https://api.workflowengine.io/sqlite/OptimaJet.Workflow.SQLite/WorkflowProcessTransitionHistory/)