Workflow API Data
The Data component of the Workflow API implements the endpoints 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 endpoints by itself; endpoint 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. You need to provide the connection string and can also configure options here:
builder.Services.AddWorkflowApiMssql("MyConnectionString", options =>
{
options.DatabaseSchema = "dbo";
options.CommandTimeout = 30;
options.ExceptionHandler = _ => {};
options.LogQueryAction = _ => {};
});
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. You need to provide the connection string and can also configure options here:
builder.Services.AddWorkflowApiMysql("MyConnectionString", options =>
{
options.CommandTimeout = 30;
options.ExceptionHandler = _ => {};
options.LogQueryAction = _ => {};
});
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. You need to provide the connection string and can also configure options here:
builder.Services.AddWorkflowApiOracle("MyConnectionString", options =>
{
options.DatabaseSchema = null;
options.CommandTimeout = 30;
options.ExceptionHandler = _ => {};
options.LogQueryAction = _ => {};
});
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. You need to provide the connection string and can also configure options here:
builder.Services.AddWorkflowApiPostgres("MyConnectionString", options =>
{
options.DatabaseSchema = "public";
options.CommandTimeout = 30;
options.ExceptionHandler = _ => {};
options.LogQueryAction = _ => {};
});
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. You need to provide the connection string and can also configure options here:
builder.Services.AddWorkflowApiSqlite("MyConnectionString", options =>
{
options.DatabaseSchema = "main";
options.CommandTimeout = 30;
options.ExceptionHandler = _ => {};
options.LogQueryAction = _ => {};
});
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. You also need to provide the connection string here:
builder.Services.AddWorkflowApiMongo("MyConnectionString");
That's it, you've integrated the Workflow API Data component!
Options​
- 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 have any specific settings at the moment.