elsa-core/src/samples/server/Elsa.Samples.Server.Host
2021-09-16 17:16:06 +03:00
..
Properties Disable workflow (#1336) 2021-09-02 16:20:10 +02:00
appsettings.Development.json Update Features with support for configuring middleware pipeline 2021-06-19 12:57:54 +02:00
appsettings.json Update Server sample project with reference to File activities package 2021-09-13 20:11:26 +02:00
Client.cs Use generics for TargetType in intellisense typescript generator and code clean up 2021-09-02 18:00:17 +03:00
ClientTypeDefinitionProvider.cs Use generics for TargetType in intellisense typescript generator and code clean up 2021-09-02 18:00:17 +03:00
Customer.cs some test changes 2021-09-02 09:47:31 +03:00
CustomerTypeDefinitionProvider.cs Use generics for TargetType in intellisense typescript generator and code clean up 2021-09-02 18:00:17 +03:00
docker-compose.yaml Add Dashboard samples: monolith + client/server 2020-12-27 11:53:52 +01:00
Elsa.Samples.Server.Host.csproj Update package references 2021-09-14 16:09:59 +02:00
FodyWeavers.xml Add Dashboard samples: monolith + client/server 2020-12-27 11:53:52 +01:00
Program.cs Fix race condition with bookmark querying and updating 2021-05-21 21:39:16 +02:00
README.md Disable workflow (#1336) 2021-09-02 16:20:10 +02:00
Startup.cs Merge branch 'master' into manual_workflow_trigger 2021-09-14 15:19:10 +03:00

Configure persistence for Elsa Core in the appsettings.json

A simple way to enable a feature without persistence:

"Elsa": {
  "Features": {
    "Console": true
    ...

In order to specify persistence for a feature it's required to set enabled status, framework (has to be an empty space for MongoDb) and connection string identifier:

EF Sqlite

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": true,
      "Framework": "EntityFrameworkCore",
      "ConnectionStringIdentifier": "Sqlite"
    },
    ...

EF MySQL

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": true,
      "Framework": "EntityFrameworkCore",
      "ConnectionStringIdentifier": "MySql"
    },
    ...

EF SQL Server

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": true,
      "Framework": "EntityFrameworkCore",
      "ConnectionStringIdentifier": "SqlServer"
    },
    ...  

EF Postgre

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": "true",
      "Framework": "EntityFrameworkCore",
      "ConnectionStringIdentifier": "PostgreSql"
    },
    ...

MongoDB

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": true,
      "Framework": "",
      "ConnectionStringIdentifier": "MongoDb"
    },
    ...

YesSql Sqlite

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": true,
      "Framework": "YesSql",
      "ConnectionStringIdentifier": "Sqlite"
    },
    ...

YesSql MySQL

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": true,
      "Framework": "YesSql",
      "ConnectionStringIdentifier": "MySql"
    },
    ...

YesSql SQL Server

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": true,
      "Framework": "YesSql",
      "ConnectionStringIdentifier": "SqlServer"
    },
    ...

YesSql Postgre

"Elsa": {
  "Features": {
    "DefaultPersistence": {
      "Enabled": true,
      "Framework": "YesSql",
      "ConnectionStringIdentifier": "PostgreSql"
    },
    ...

Workflow Settings is an optional feature and is controlled by IWorkflowSettingsProvider that currently has the database and configuration providers.

The database provider uses one of available database persistence while the configuration one uses Environment Variables using IConfiguration

The Environment Variable for the configuration provider can be set in the format as follows:

Name: ":disabled" Value:

Configure connection strings for each persistence

  "ConnectionStrings": {
    ...
    "MySql": "Server=LAPTOP-B76STK67;Database=Elsa;Uid=myUsername;Pwd=myPassword;",
    "SqlServer": "Server=LAPTOP-B76STK67;Database=Elsa;Integrated Security=true;MultipleActiveResultSets=True;Max Pool Size=500;Connection Timeout=3600",
    "Sqlite": "Data Source=elsa.sqlite.db;Cache=Shared;",
    "MongoDb": "mongodb://localhost:27017/Elsa",
    "PostgreSql": "Server=127.0.0.1;Port=5433;Database=elsa;User Id=postgres;Password=Password12!;"
  },

Connection strings

MySql https://www.connectionstrings.com/mysql/ SQL Server https://www.connectionstrings.com/sql-server/ Postgres https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING MongoDb https://docs.mongodb.com/manual/reference/connection-string/