Workflow Engine .NET

Assembly: OptimaJet.Workflow.SQLite

Class WorkflowProcessScheme

OptimaJet.Workflow.SQLite.WorkflowProcessScheme

Database object for workflow process scheme operations.

public class WorkflowProcessScheme : DbObject<ProcessSchemeEntity>

Inheritance

  • Object
  • DbObject<ProcessSchemeEntity>

Constructors

public WorkflowProcessScheme(string schemaName, int commandTimeout) #
Initializes a new instance of WorkflowProcessScheme.

Parameters

Name
Type
Description
schemaName
String
The database schema name.
commandTimeout
Int32
The command timeout in seconds.

Methods

public Task<ProcessSchemeEntity[]> SelectAsync(SqliteConnection connection, string schemeCode, string tenantId, bool? isObsolete, Guid? rootSchemeId) #
Selects process scheme entities by scheme code with optional filters for tenant, obsolete status, and root scheme.

Parameters

Name
Type
Description
connection
SqliteConnection
The SQLite connection.
schemeCode
String
The scheme code to search for.
tenantId
String
The tenant identifier, or null for shared schemes.
isObsolete
Nullable<Boolean>
Filter by obsolete status, or null to include all.
rootSchemeId
Nullable<Guid>
The root scheme identifier, or null for schemes without a root.

Returns

Type
Description
Task<ProcessSchemeEntity[]>
An array of matching process scheme entities.
public Task<int> SetObsoleteAsync(SqliteConnection connection, string schemeCode, string tenantId) #
Marks all schemes matching the specified scheme code (and optionally tenant) as obsolete.

Parameters

Name
Type
Description
connection
SqliteConnection
The SQLite connection.
schemeCode
String
The scheme code to mark as obsolete.
tenantId
String
The tenant identifier, or null for shared schemes.

Returns

Type
Description
Task<Int32>
The number of rows affected.
public Task DeleteUnusedAsync(SqliteConnection connection) #
Deletes obsolete process schemes that are not referenced by any process instance. Rolls back and throws if orphaned scheme records are detected.

Parameters

Name
Type
Description
connection
SqliteConnection
The SQLite connection.

Returns

Type
Description
Task
A task that represents the asynchronous operation.