* Add logging to DefaultActivityExecutionMapper constructor Introduced an ILogger dependency to DefaultActivityExecutionMapper and added a debug log statement in GetPersistableDictionary. This aids in tracking log persistence mode for improved debugging and state visibility. * Simplify activity execution log mapping logic. Replaced asynchronous mapping with synchronous mapping to simplify the logic flow. This change reduces task overhead and improves code clarity while maintaining functionality. * Update activity execution mapping and comment out unused method Replaced direct dictionary usage with a cloned dictionary to ensure data integrity in `DefaultActivityExecutionMapper`. Commented out an unused method in `ActivityExecutionExtensions` to suppress its execution for now. * Add logging to ActivityExecutionLogStore for property tracking Integrate ILogger to track and log details of activity execution records, specifically focusing on properties and their serialization. This enhancement improves debugging and provides better insights into the execution flow. * Introduce Metadata field for activity execution handling Replaces the use of Properties with Metadata across activity execution models and services for storing lightweight, persistent data. Updated serialization, database schema, and relevant APIs to support this change while ensuring backward compatibility. Adjusted logging and extension methods for Metadata integration. * Reset V3.5 Runtime Migrations * Add EF Core migrations for MySQL and SQL Server schema updates Introduced migrations to support schema changes for MySQL and SQL Server. Changes include new columns for bookmarks and activity execution records, updates to existing columns, and creation of additional indexes. These updates aim to enhance database structure and query performance. * Add support for metadata in workflow execution context Introduce a `Metadata` property to `ActivityExecutionContextState` to enhance workflow state management. Updated `WorkflowStateExtractor` to handle metadata merging and preservation. Added an alias for `RetryAttemptRecordList` in `ExpressionOptions` for improved type handling. * Remove logger dependency from DefaultActivityExecutionMapper Eliminated the ILogger dependency and related logging calls from DefaultActivityExecutionMapper to simplify the class. This reduces unnecessary coupling and streamlines the activity execution mapping process.
294 lines
7.8 KiB
JSON
294 lines
7.8 KiB
JSON
{
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Information",
|
|
"OpenTelemetry": "Debug",
|
|
"Microsoft.Hosting.Lifetime": "Information",
|
|
"Elsa": "Information",
|
|
"Elsa.Workflows.Runtime.Middleware.Workflows.WorkflowHeartbeatMiddleware": "Debug"
|
|
}
|
|
},
|
|
"HostBuilder": {
|
|
"reloadConfigOnChange": true
|
|
},
|
|
"AllowedHosts": "*",
|
|
"ConnectionStrings": {
|
|
"Sqlite": "Data Source=App_Data/elsa.sqlite.db;Cache=Shared;",
|
|
"SqlServer": "Server=localhost,1433;Initial Catalog=Elsa;User=sa;Password=!Elsa2025@;Encrypt=false;PersistSecurityInfo=false",
|
|
"MySql": "Server=localhost;Database=elsa;Uid=admin;Pwd=password;",
|
|
"PostgreSql": "Server=localhost;Username=elsa;Database=elsa;Port=5432;Password=elsa;SSLMode=Prefer;MaxPoolSize=2000;Timeout=60",
|
|
"Citus": "Server=localhost;Username=citus;Database=citus;Port=9700;Password=citus;SSLMode=Prefer;MaxPoolSize=2000;Timeout=60",
|
|
"YugabyteDb": "Host=localhost;Port=5433;Database=elsa;Username=yugabyte;Password=yugabyte;Pooling=true",
|
|
"Oracle": "Data Source=(DESCRIPTION = (ADDRESS_LIST = (FAILOVER =ON) (LOAD_BALANCE = OFF) (ADDRESS = (PROTOCOL =TCP)(HOST=localhost)(PORT=1521))) (CONNECT_DATA = (SID= FREE) ));User Id=ELSA;Password=elsa;",
|
|
"CockroachDb": "Host=localhost;Port=26257;Database=elsa;SslMode=Disable;Username=root;IncludeErrorDetail=true",
|
|
"MongoDb": "mongodb://localhost:27017/elsa-workflows",
|
|
"AzureServiceBus": "",
|
|
"RabbitMq": "amqp://guest:guest@localhost:5672",
|
|
"Redis": "localhost:6379,abortConnect=false"
|
|
},
|
|
"DatabaseProvider": "Sqlite",
|
|
"Multitenancy": {
|
|
"Tenants": [
|
|
{
|
|
"Id": null,
|
|
"Name": "Default",
|
|
"Configuration": {
|
|
"Http": {
|
|
"Prefix": "",
|
|
"Host": "localhost:5001"
|
|
},
|
|
"ConnectionStrings": {
|
|
"Sqlite": "Data Source=App_Data/elsa.sqlite.db;Cache=Shared;"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Id": "tenant-1",
|
|
"Name": "Tenant 12 dd",
|
|
"Configuration": {
|
|
"Http": {
|
|
"Prefix": "/tenant-1",
|
|
"Host": "localhost:5001"
|
|
},
|
|
"ConnectionStrings": {
|
|
"Sqlite": "Data Source=App_Data/elsa.sqlite.db;Cache=Shared;"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Smtp": {
|
|
"Host": "localhost",
|
|
"Port": 2525,
|
|
"DefaultSender": "noreply@crmservices.com"
|
|
},
|
|
"Http": {
|
|
"BaseUrl": "https://localhost:5001",
|
|
"BasePath": "/workflows",
|
|
"ApiRoutePrefix": "elsa/api",
|
|
"AvailableContentTypes": [
|
|
"application/json",
|
|
"application/xml",
|
|
"text/plain",
|
|
"text/html"
|
|
]
|
|
},
|
|
"Identity": {
|
|
"Tokens": {
|
|
"SigningKey": "sufficiently-large-secret-signing-key",
|
|
"AccessTokenLifetime": "1:00:00:00",
|
|
"RefreshTokenLifetime": "7:00:00:00"
|
|
},
|
|
"Roles": [
|
|
{
|
|
"Id": "admin",
|
|
"Name": "Administrator",
|
|
"Permissions": [
|
|
"*"
|
|
],
|
|
"TenantId": "default"
|
|
}
|
|
],
|
|
"Users": [
|
|
{
|
|
"Id": "a2323f46-42db-4e15-af8b-94238717d817",
|
|
"Name": "admin",
|
|
"HashedPassword": "TfKzh9RLix6FPcCNeHLkGrysFu3bYxqzGqduNdi8v1U=",
|
|
"HashedPasswordSalt": "JEy9kBlhHCNsencitRHlGxmErmSgY+FVyMJulCH27Ds=",
|
|
"Roles": [
|
|
"admin"
|
|
],
|
|
"TenantId": ""
|
|
},
|
|
{
|
|
"Id": "b0cd0e506e713a9d",
|
|
"Name": "alice",
|
|
"Roles": [
|
|
"admin"
|
|
],
|
|
"HashedPassword": "8B0fFK/f/kk9GkVtzXfRJ2Y6cNyYVvLTfKouWcAcuPg=",
|
|
"HashedPasswordSalt": "xlNWvEng8fRvo0McyJopbRJ2MJ9NIYV/4IY5dOZeiiw=",
|
|
"TenantId": "tenant-2"
|
|
},
|
|
{
|
|
"Id": "789d5056cb3bb8e9",
|
|
"Name": "bob",
|
|
"Roles": [
|
|
"admin"
|
|
],
|
|
"HashedPassword": "GMHHvUw7RfIIBq+GAWZ/AlHR50TbgONYfGQ92Xge0EI=",
|
|
"HashedPasswordSalt": "V4uHKg1PFBc1bsngCQoptibOu14faj9obSn5B23h1wE=",
|
|
"TenantId": "tenant-1"
|
|
}
|
|
],
|
|
"Applications": [
|
|
{
|
|
"Id": "d57030226341448daff5a2935aba2d3f",
|
|
"Name": "Postman",
|
|
"Roles": [
|
|
"admin"
|
|
],
|
|
"ClientId": "HXr0Vzdm9KCZbwsJ",
|
|
"ClientSecret": "a<~QGGHTEA%u4;CU&'Wga5ED:_&Gd1C)",
|
|
"HashedApiKey": "Z5ClHs3mbzx8Pnw3+PxbMq8A/Y+VKMCCDTGYtax8JFM=",
|
|
"HashedApiKeySalt": "kBisa1X8FwBfN2zmyGMFRgIVVBleghhQAJ4WGyTkaD0=",
|
|
"HashedClientSecret": "jEv58d0SVbGQ3nBZM0lkzHghG4Y+lMKW80wipz+9vHk=",
|
|
"HashedClientSecretSalt": "xRKy14Ok1/tU3kLf/8V1fcbLIegy9vcM90Peu2tzohU=",
|
|
"TenantId": "default"
|
|
}
|
|
]
|
|
},
|
|
"Environments": {
|
|
"Environments": [
|
|
{
|
|
"Name": "Local",
|
|
"ServerUrl": "https://localhost:5001/elsa/api"
|
|
},
|
|
{
|
|
"Name": "Staging",
|
|
"ServerUrl": "https://staging.acme.com/elsa/api"
|
|
},
|
|
{
|
|
"Name": "Production",
|
|
"ServerUrl": "https://production.acme.com/elsa/api"
|
|
}
|
|
]
|
|
},
|
|
"AppRole": "Default",
|
|
"Runtime": {
|
|
"DistributedLocking": {
|
|
"Provider": "File",
|
|
"LockAcquisitionTimeout": "00:00:10"
|
|
},
|
|
"DistributedLockProvider": "File",
|
|
"WorkflowDispatcher": {
|
|
"Channels": [
|
|
{
|
|
"Name": "Low"
|
|
},
|
|
{
|
|
"Name": "Medium"
|
|
},
|
|
{
|
|
"Name": "High"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Scripting": {
|
|
"Python": {
|
|
"PythonDllPath": "",
|
|
"Scripts": [
|
|
"def greet(name): return f'Hello {name}!'",
|
|
"def say_hello_world(): return greet('World')"
|
|
]
|
|
}
|
|
},
|
|
"AzureServiceBus": {
|
|
"Queues": [
|
|
{
|
|
"Name": "queue1"
|
|
},
|
|
{
|
|
"Name": "queue2"
|
|
}
|
|
],
|
|
"Topics": [
|
|
{
|
|
"Name": "topic1",
|
|
"Subscriptions": [
|
|
{
|
|
"Name": "subscription1"
|
|
},
|
|
{
|
|
"Name": "subscription2"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"Kafka": {
|
|
"Topics": [
|
|
{
|
|
"Id": "topic-1",
|
|
"Name": "topic-1"
|
|
},
|
|
{
|
|
"Id": "topic-2",
|
|
"Name": "topic-2"
|
|
}
|
|
],
|
|
"SchemaRegistries": [
|
|
{
|
|
"Id": "schema-registry-1",
|
|
"Name": "Schema Registry 1",
|
|
"Config": {
|
|
"Url": "http://localhost:8081"
|
|
}
|
|
}
|
|
],
|
|
"Producers": [
|
|
{
|
|
"Id": "producer-1",
|
|
"Name": "Producer 1",
|
|
"FactoryType": "Elsa.Kafka.Factories.GenericProducerFactory`2[[System.String, System.Private.CoreLib], [Elsa.Server.Web.Messages.OrderReceived, Elsa.Server.Web]], Elsa.Kafka",
|
|
"Config": {
|
|
"BootstrapServers": "localhost:9092"
|
|
},
|
|
"SchemaRegistryId": "schema-registry-1"
|
|
}
|
|
],
|
|
"Consumers": [
|
|
{
|
|
"Id": "consumer-1",
|
|
"Name": "Consumer 1",
|
|
"FactoryType": "Elsa.Kafka.Factories.GenericConsumerFactory`2[[System.String, System.Private.CoreLib], [Elsa.Server.Web.Messages.OrderReceived, Elsa.Server.Web]], Elsa.Kafka",
|
|
"Config": {
|
|
"BootstrapServers": "localhost:9092",
|
|
"GroupId": "group-1",
|
|
"AutoOffsetReset": "earliest",
|
|
"EnableAutoCommit": "true"
|
|
},
|
|
"SchemaRegistryId": "schema-registry-1"
|
|
}
|
|
]
|
|
},
|
|
"Secrets": {
|
|
"Management": {
|
|
"SweepInterval": "04:00:00"
|
|
}
|
|
},
|
|
"Webhooks": {
|
|
"Sinks": [
|
|
{
|
|
"Id": "1",
|
|
"Name": "Run Task",
|
|
"Filters": [
|
|
{
|
|
"EventType": "Elsa.RunTask"
|
|
}
|
|
],
|
|
"Url": "https://localhost:6001/webhooks/run-task"
|
|
}
|
|
]
|
|
},
|
|
"Resilience": {
|
|
"Strategies": [
|
|
{
|
|
"$type": "HttpResilienceStrategy",
|
|
"Id": "1",
|
|
"DisplayName": "Retry 3 times, exponential",
|
|
"MaxRetryAttempts": 3,
|
|
"BackoffType": "Exponential"
|
|
},
|
|
{
|
|
"$type": "HttpResilienceStrategy",
|
|
"Id": "2",
|
|
"DisplayName": "Retry 10 times, linear",
|
|
"MaxRetryAttempts": 10,
|
|
"BackoffType": "Linear"
|
|
}
|
|
]
|
|
}
|
|
}
|