Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

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.

info

💡 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​

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!

Options​

NameTypeDefaultDescription
DatabaseSchemastring?"dbo"The schema to which the provider's queries will be executed. If null is specified, the default will be used.
CommandTimeoutint30The timeout for command execution by the driver, in seconds.
ExceptionHandlerAction<Exception>_ => {}Delegate called before throwing an SQL exception within the provider. The encountered exception is passed as an argument.
LogQueryActionAction<string>_ => {}Delegate called after preparing the query for execution, with the SQL string passed as argument. Query parameters replaced with the '?' placeholder.
Stay in the know
Build Workflow Applications Faster
Star us on GitHub