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 operations 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 operations by itself; operation 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.

builder.Services.AddWorkflowApiMssql();

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:

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