Workflow API Data
The Data component of the Workflow API implements the operations defined in the Core component. There are currently six implementations available, depending on the persistence provider you use in your Workflow Engine application.
💡 The Data component does not provide working API operations by itself; operation construction is handled by the Core component, so make sure to include it.
Integration​
- MS SQL Server
- MySQL
- Oracle
- PostgreSQL
- SQLite
- MongoDB
The Data component is available in a separate NuGet package, which you need to add to your project. You can do this with the following command:
dotnet add package OptimaJet.Workflow.Api.Mssql
The Data component is added during the web application's builder stage using an extension method for the service provider.
builder.Services.AddWorkflowApiMssql();
That's it, you've integrated the Workflow API Data component!
The Data component is available in a separate NuGet package, which you need to add to your project. You can do this with the following command:
dotnet add package OptimaJet.Workflow.Api.Mysql
The Data component is added during the web application's builder stage using an extension method for the service provider.
builder.Services.AddWorkflowApiMysql();
That's it, you've integrated the Workflow API Data component!
The Data component is available in a separate NuGet package, which you need to add to your project. You can do this with the following command:
dotnet add package OptimaJet.Workflow.Api.Oracle
The Data component is added during the web application's builder stage using an extension method for the service provider.
builder.Services.AddWorkflowApiOracle();
That's it, you've integrated the Workflow API Data component!
The Data component is available in a separate NuGet package, which you need to add to your project. You can do this with the following command:
dotnet add package OptimaJet.Workflow.Api.Postgres
The Data component is added during the web application's builder stage using an extension method for the service provider.
builder.Services.AddWorkflowApiPostgres();
That's it, you've integrated the Workflow API Data component!
The Data component is available in a separate NuGet package, which you need to add to your project. You can do this with the following command:
dotnet add package OptimaJet.Workflow.Api.Sqlite
This version of SQLite may not work on macOS with Apple Silicon processors.
The Data component is added during the web application's builder stage using an extension method for the service provider.
builder.Services.AddWorkflowApiSqlite();
That's it, you've integrated the Workflow API Data component!
The Data component is available in a separate NuGet package, which you need to add to your project. You can do this with the following command:
dotnet add package OptimaJet.Workflow.Api.Mongo
The Data component is added during the web application's builder stage using an extension method for the service provider.
builder.Services.AddWorkflowApiMongo();
That's it, you've integrated the Workflow API Data component!
Data Options​
You can configure the Data component options using the WorkflowApiDataProviderOptions
property of
WorkflowEngineTenantCreationOptions
. In single-tenant mode, this configuration is applied when the Workflow Runtime
is initialized. In multi-tenant mode, it is applied separately for each tenant during registration. Below are the
available options for each provider:
- MS SQL Server
- MySql
- Oracle
- PostgreSQL
- SQLite
- MongoDB
Name | Type | Default | Description |
---|---|---|---|
DatabaseSchema | string? | "dbo" | The schema to which the provider's queries will be executed. If null is specified, the default will be used. |
CommandTimeout | int | 30 | The timeout for command execution by the driver, in seconds. |
ExceptionHandler | Action<Exception> | _Â =>Â {} | Delegate called before throwing an SQL exception within the provider. The encountered exception is passed as an argument. |
LogQueryAction | Action<string> | _Â =>Â {} | Delegate called after preparing the query for execution, with the SQL string passed as argument. Query parameters replaced with the '?' placeholder. |
Name | Type | Default | Description |
---|---|---|---|
CommandTimeout | int | 30 | The timeout for command execution by the driver, in seconds. |
ExceptionHandler | Action<Exception> | _Â =>Â {} | Delegate called before throwing an SQL exception within the provider. The encountered exception is passed as an argument. |
LogQueryAction | Action<string> | _Â =>Â {} | Delegate called after preparing the query for execution, with the SQL string passed as argument. Query parameters replaced with the '?' placeholder. |
Name | Type | Default | Description |
---|---|---|---|
DatabaseSchema | string? | null | The schema to which the provider's queries will be executed. If null is specified, the default will be used. |
CommandTimeout | int | 30 | The timeout for command execution by the driver, in seconds. |
ExceptionHandler | Action<Exception> | _Â =>Â {} | Delegate called before throwing an SQL exception within the provider. The encountered exception is passed as an argument. |
LogQueryAction | Action<string> | _Â =>Â {} | Delegate called after preparing the query for execution, with the SQL string passed as argument. Query parameters replaced with the '?' placeholder. |
Name | Type | Default | Description |
---|---|---|---|
DatabaseSchema | string? | "public" | The schema to which the provider's queries will be executed. If null is specified, the default will be used. |
CommandTimeout | int | 30 | The timeout for command execution by the driver, in seconds. |
ExceptionHandler | Action<Exception> | _Â =>Â {} | Delegate called before throwing an SQL exception within the provider. The encountered exception is passed as an argument. |
LogQueryAction | Action<string> | _Â =>Â {} | Delegate called after preparing the query for execution, with the SQL string passed as argument. Query parameters replaced with the '?' placeholder. |
Name | Type | Default | Description |
---|---|---|---|
DatabaseSchema | string? | "main" | The schema to which the provider's queries will be executed. If null is specified, the default will be used. |
CommandTimeout | int | 30 | The timeout for command execution by the driver, in seconds. |
ExceptionHandler | Action<Exception> | _Â =>Â {} | Delegate called before throwing an SQL exception within the provider. The encountered exception is passed as an argument. |
LogQueryAction | Action<string> | _Â =>Â {} | Delegate called after preparing the query for execution, with the SQL string passed as argument. Query parameters replaced with the '?' placeholder. |
The MongoDB provider does not support any options at the moment.