Generate package Caspian.WorkflowFramework.1.1.0-preview.1.nupkg
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<PackageId>Caspian.WorkflowFramework</PackageId>
|
||||
<Version>1.0.1-preview.3</Version>
|
||||
<Version>1.1.0-preview.1</Version>
|
||||
<Authors>Digital banking team</Authors>
|
||||
<Company>Caspian</Company>
|
||||
<Product>Caspian.WorkflowFramework</Product>
|
||||
@@ -20,72 +20,58 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
<PackageReference Include="Caspian.Elsa" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Expressions" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Alterations" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Alterations.Core" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Alterations.MassTransit" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Api.Client" Version="1.0.2-preview1" />
|
||||
<PackageReference Include="Caspian.Elsa.Api.Common" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Caching" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Caching.Distributed.ProtoActor" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Common" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Connections.Api" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Connections.Core" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Connections.Models" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.CSharp" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Dapper.Migrations" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.DropIns" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.DropIns.Core" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Dsl" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Email" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.Common" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.MySql" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.Oracle" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.PostgreSql" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.Sqlite" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.SqlServer" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Environments" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Features" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Hangfire" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Hosting.Management" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Http" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Identity" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.JavaScript" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.JavaScript.Libraries" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Liquid" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Mediator" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.ProtoActor.Core" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Python" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz.EntityFrameworkCore.MySql" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz.EntityFrameworkCore.PostgreSql" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz.EntityFrameworkCore.Sqlite" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz.EntityFrameworkCore.SqlServer" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Retention" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.SasTokens" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Scheduling" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Sql.PostgreSql" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Sql.Sqlite" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Sql.SqlServer" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Tenants" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Tenants.AspNetCore" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Testing.Shared" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Testing.Shared.Component" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Testing.Shared.Integration" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Webhooks" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.WorkflowContexts" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.WorkflowProviders.BlobStorage" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Workflows.Api" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Workflows.Core" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Workflows.Management" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Workflows.Runtime" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Workflows.Runtime.Distributed" Version="1.0.1" />
|
||||
<PackageReference Include="Caspian.Elsa.WorkflowContexts" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Workflows.Runtime.Distributed" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Alterations" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Alterations.MassTransit" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Caching.Distributed.MassTransit" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Caching.Distributed.ProtoActor" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.CSharp" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Dapper" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Dapper.Migrations" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.DropIns" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Email" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Elasticsearch" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Environments" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.MySql" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.Oracle" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.PostgreSql" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.Sqlite" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.EntityFrameworkCore.SqlServer" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.FileStorage" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Hangfire" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Http" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Identity" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Kafka" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Labels" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Liquid" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.MassTransit" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.MassTransit.AzureServiceBus" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.MassTransit.RabbitMq" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.MongoDb" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.OpenTelemetry" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz.EntityFrameworkCore.MySql" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz.EntityFrameworkCore.PostgreSql" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Quartz.EntityFrameworkCore.Sqlite" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Retention" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Secrets.Api" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Secrets.Persistence.EntityFrameworkCore.PostgreSql" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Secrets.Persistence.EntityFrameworkCore.Sqlite" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Secrets.Persistence.EntityFrameworkCore.SqlServer" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Secrets.Scripting" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Sql.MySql" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Sql.PostgreSql" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Sql.Sqlite" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Sql.SqlServer" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Sql" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Tenants.AspNetCore" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa.Webhooks" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="Caspian.Elsa" Version="1.1.0-preview.1" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.3.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.7" />
|
||||
<PackageReference Include="San.MongoLogger" Version="1.0.0-preview.9" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,14 +1,33 @@
|
||||
using Caspian.WorkflowFramework.Contracts;
|
||||
using Caspian.WorkflowFramework.Services;
|
||||
using Elsa.Extensions;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Elsa.Caching.Options;
|
||||
using Elsa.Common.RecurringTasks;
|
||||
using Elsa.Common.Serialization;
|
||||
using Elsa.EntityFrameworkCore.Extensions;
|
||||
using Elsa.EntityFrameworkCore.Modules.Alterations;
|
||||
using Elsa.EntityFrameworkCore.Modules.Identity;
|
||||
using Elsa.EntityFrameworkCore.Modules.Management;
|
||||
using Elsa.EntityFrameworkCore.Modules.Runtime;
|
||||
using Elsa.EntityFrameworkCore.Modules.Identity;
|
||||
using Elsa.Email;
|
||||
using Elsa.EntityFrameworkCore.Modules.Tenants;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Kafka.Factories;
|
||||
using Elsa.OpenTelemetry.Middleware;
|
||||
using Elsa.Secrets.Management.Tasks;
|
||||
using Elsa.Secrets.Persistence;
|
||||
using Elsa.Server.Web;
|
||||
using Elsa.Server.Web.Messages;
|
||||
using Elsa.Workflows;
|
||||
using Elsa.Workflows.IncidentStrategies;
|
||||
using Elsa.Workflows.LogPersistence;
|
||||
using Elsa.Workflows.Management;
|
||||
using Elsa.Workflows.Options;
|
||||
using Elsa.Workflows.Runtime.Distributed.Extensions;
|
||||
using Elsa.Workflows.Runtime.Options;
|
||||
using Elsa.Workflows.Runtime.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using San.MongoLogger;
|
||||
using San.MongoLogger.Models;
|
||||
|
||||
@@ -16,57 +35,144 @@ namespace Caspian.WorkflowFramework;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
public static void AddWorkflowFramework(this IHostApplicationBuilder builder, string connectionString)
|
||||
public static void AddWorkflowFramework(this IHostApplicationBuilder builder, string sqlServerConnectionString)
|
||||
{
|
||||
//var configuration = new ConfigurationBuilder()
|
||||
// .AddJsonFile(appsettingName, optional: false, reloadOnChange: true)
|
||||
// .Build();
|
||||
//var sqlServerConnectionString = configuration.GetConnectionString("SqlServer")!;
|
||||
|
||||
var sqlDatabaseProvider = Enum.Parse<SqlDatabaseProvider>("SqlServer");
|
||||
const bool useDbContextPooling = false;
|
||||
const bool runEFCoreMigrations = true;
|
||||
const bool useCaching = true;
|
||||
const bool useReadOnlyMode = false;
|
||||
const WorkflowRuntime workflowRuntime = WorkflowRuntime.Distributed;
|
||||
const bool disableVariableWrappers = false;
|
||||
const bool disableVariableCopying = false;
|
||||
|
||||
// Optionally create type aliases for easier configuration.
|
||||
TypeAliasRegistry.RegisterAlias("OrderReceivedProducerFactory", typeof(GenericProducerFactory<string, OrderReceived>));
|
||||
TypeAliasRegistry.RegisterAlias("OrderReceivedConsumerFactory", typeof(GenericConsumerFactory<string, OrderReceived>));
|
||||
|
||||
// Add Elsa services.
|
||||
builder.Services.AddScoped<IPropertyUIHandler, CustomCheckListOptionsProvider>();
|
||||
|
||||
builder.Services.AddMongoLogger<LogModel>(builder.Configuration);
|
||||
|
||||
builder.Services.AddElsa(elsa =>
|
||||
{
|
||||
// Configure Management layer to use EF Core.
|
||||
elsa.UseWorkflowManagement(management => management
|
||||
.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)));
|
||||
|
||||
// Configure Runtime layer to use EF Core.
|
||||
elsa.UseWorkflowRuntime(runtime => runtime
|
||||
.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)));
|
||||
|
||||
// Expose Elsa API endpoints.
|
||||
elsa.UseWorkflowsApi();
|
||||
|
||||
// Enable C# workflow expressions
|
||||
elsa.UseCSharp();
|
||||
|
||||
// Enable JavaScript workflow expressions
|
||||
elsa.UseJavaScript(options => options.AllowClrAccess = true);
|
||||
elsa
|
||||
.UseWorkflows(workflows =>
|
||||
{
|
||||
workflows.WithDefaultWorkflowExecutionPipeline(pipeline => pipeline.UseWorkflowExecutionTracing());
|
||||
workflows.WithDefaultActivityExecutionPipeline(pipeline => pipeline.UseActivityExecutionTracing());
|
||||
workflows.UseCommitStrategies(strategies =>
|
||||
{
|
||||
strategies.AddStandardStrategies();
|
||||
//می خوایم سریع انجام شه
|
||||
//strategies.Add("Every 10 seconds", new PeriodicWorkflowStrategy(TimeSpan.FromSeconds(10)));
|
||||
});
|
||||
})
|
||||
.UseWorkflowManagement(management =>
|
||||
{
|
||||
management.UseEntityFrameworkCore(ef =>
|
||||
{
|
||||
ef.UseSqlServer(sqlServerConnectionString);
|
||||
});
|
||||
|
||||
//// Configure CORS to allow designer app hosted on a different origin to invoke the APIs.
|
||||
//builder.Services.AddCors(cors => cors
|
||||
// .AddDefaultPolicy(policy => policy
|
||||
// .AllowAnyOrigin() // For demo purposes only. Use a specific origin instead.
|
||||
// .AllowAnyHeader()
|
||||
// .AllowAnyMethod()
|
||||
// .WithExposedHeaders("x-elsa-workflow-instance-id"))); // Required for Elsa Studio in order to support running workflows from the designer. Alternatively, you can use the `*` wildcard to expose all headers.
|
||||
if (useCaching)
|
||||
management.UseCache();
|
||||
|
||||
management.SetDefaultLogPersistenceMode(LogPersistenceMode.Inherit);
|
||||
management.UseReadOnlyMode(useReadOnlyMode);
|
||||
management.AddVariableTypeAndAlias<OrderReceived>("Application");
|
||||
})
|
||||
.UseWorkflowRuntime(runtime =>
|
||||
{
|
||||
runtime.UseEntityFrameworkCore(ef =>
|
||||
{
|
||||
ef.UseContextPooling = useDbContextPooling;
|
||||
|
||||
// Add Health Checks.
|
||||
builder.Services.AddHealthChecks();
|
||||
var migrationsAssembly = typeof(Elsa.EntityFrameworkCore.SqlServer.IdentityDbContextFactory).Assembly;
|
||||
var connectionString = sqlServerConnectionString;
|
||||
ef.DbContextOptionsBuilder = (_, db) => db.UseElsaSqlServer(migrationsAssembly, connectionString, null, configure => configure.CommandTimeout(60000));
|
||||
|
||||
ef.RunMigrations = runEFCoreMigrations;
|
||||
});
|
||||
|
||||
if (workflowRuntime == WorkflowRuntime.Distributed)
|
||||
{
|
||||
runtime.UseDistributedRuntime();
|
||||
}
|
||||
|
||||
if (useCaching)
|
||||
runtime.UseCache();
|
||||
})
|
||||
.UseCSharp(options =>
|
||||
{
|
||||
options.DisableWrappers = disableVariableWrappers;
|
||||
//options.AppendScript("string Greet(string name) => $\"Hello {name}!\";");
|
||||
//options.AppendScript("string SayHelloWorld() => Greet(\"World\");");
|
||||
})
|
||||
.UseJavaScript(options =>
|
||||
{
|
||||
options.AllowClrAccess = true;
|
||||
options.DisableWrappers = disableVariableWrappers;
|
||||
options.DisableVariableCopying = disableVariableCopying;
|
||||
options.RegisterType<OrderReceived>();
|
||||
//options.ConfigureEngine(engine =>
|
||||
//{
|
||||
// engine.Execute("function greet(name) { return `Hello ${name}!`; }");
|
||||
// engine.Execute("function sayHelloWorld() { return greet('World'); }");
|
||||
//});
|
||||
})
|
||||
.UseWorkflowContexts();
|
||||
|
||||
//elsa.AddFastEndpointsAssembly<Program>();
|
||||
});
|
||||
|
||||
// Optionally configure recurring tasks using alternative schedules.
|
||||
builder.Services.Configure<RecurringTaskOptions>(options =>
|
||||
{
|
||||
options.Schedule.ConfigureTask<TriggerBookmarkQueueRecurringTask>(TimeSpan.FromSeconds(300));
|
||||
options.Schedule.ConfigureTask<PurgeBookmarkQueueRecurringTask>(TimeSpan.FromSeconds(300));
|
||||
options.Schedule.ConfigureTask<UpdateExpiredSecretsRecurringTask>(TimeSpan.FromHours(4));
|
||||
options.Schedule.ConfigureTask<RestartInterruptedWorkflowsTask>(TimeSpan.FromSeconds(15));
|
||||
});
|
||||
|
||||
builder.Services.Configure<RuntimeOptions>(options => { options.InactivityThreshold = TimeSpan.FromSeconds(15); });
|
||||
builder.Services.Configure<BookmarkQueuePurgeOptions>(options => options.Ttl = TimeSpan.FromSeconds(10));
|
||||
builder.Services.Configure<CachingOptions>(options => options.CacheDuration = TimeSpan.FromDays(1));
|
||||
builder.Services.Configure<IncidentOptions>(options => options.DefaultIncidentStrategy = typeof(ContinueWithIncidentsStrategy));
|
||||
//builder.Services.AddHealthChecks();
|
||||
|
||||
builder.Services.AddScoped<IWorkflowService, WorkflowService>();
|
||||
}
|
||||
|
||||
public static void UseWorkflowFramework(this IApplicationBuilder app)
|
||||
{
|
||||
try
|
||||
{
|
||||
app.UseMongoLogger<LogModel>();
|
||||
//try
|
||||
//{
|
||||
// app.UseMongoLogger<LogModel>();
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// var d = ex;
|
||||
//}
|
||||
|
||||
// Configure the pipeline.
|
||||
var env = app.ApplicationServices.GetRequiredService<IWebHostEnvironment>();
|
||||
if (env.IsDevelopment())
|
||||
app.UseDeveloperExceptionPage();
|
||||
|
||||
// Health checks.
|
||||
//app.MapHealthChecks("/");
|
||||
|
||||
// Captures unhandled exceptions and returns a JSON response.
|
||||
app.UseJsonSerializationErrorHandler();
|
||||
|
||||
//app.UseWorkflows();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var d = ex;
|
||||
}
|
||||
|
||||
//app.UseWorkflowsApi(); // Use Elsa API endpoints.
|
||||
app.UseWorkflows(); // Use Elsa middleware to handle HTTP requests mapped to HTTP Endpoint activities.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Elsa.Server.Web;
|
||||
|
||||
public enum ApplicationRole
|
||||
{
|
||||
Default,
|
||||
Api,
|
||||
Worker,
|
||||
Monitor
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Elsa.Server.Web;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the transport options for distributed caching.
|
||||
/// </summary>
|
||||
public enum DistributedCachingTransport
|
||||
{
|
||||
None,
|
||||
Memory,
|
||||
MassTransit,
|
||||
ProtoActor
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Elsa.Server.Web;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the type of messaging broker used in MassTransit.
|
||||
/// </summary>
|
||||
public enum MassTransitBroker
|
||||
{
|
||||
Memory,
|
||||
AzureServiceBus,
|
||||
RabbitMq
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Elsa.Server.Web;
|
||||
|
||||
public enum PersistenceProvider
|
||||
{
|
||||
Memory,
|
||||
EntityFrameworkCore,
|
||||
MongoDb,
|
||||
Dapper
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Elsa.Server.Web;
|
||||
|
||||
public enum SqlDatabaseProvider
|
||||
{
|
||||
SqlServer,
|
||||
Sqlite,
|
||||
MySql,
|
||||
PostgreSql,
|
||||
Citus,
|
||||
YugabyteDb,
|
||||
Oracle,
|
||||
CockroachDb
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Elsa.Server.Web;
|
||||
|
||||
public enum WorkflowRuntime
|
||||
{
|
||||
Default,
|
||||
Distributed,
|
||||
ProtoActor
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Elsa.Server.Web.Messages;
|
||||
|
||||
public class OrderReceived
|
||||
{
|
||||
public string OrderId { get; set; } = null!;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Reflection;
|
||||
using Elsa.Workflows.UIHints.CheckList;
|
||||
|
||||
namespace Elsa.Server.Web;
|
||||
|
||||
/// <summary>
|
||||
/// Provides static drop-down options for a given property.
|
||||
/// </summary>
|
||||
public class CustomCheckListOptionsProvider : CheckListOptionsProviderBase
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override ValueTask<ICollection<CheckListItem>> GetItemsAsync(PropertyInfo propertyInfo, object? context, CancellationToken cancellationToken)
|
||||
{
|
||||
var items = new[]
|
||||
{
|
||||
"Apple", "Banana", "Cherry"
|
||||
};
|
||||
var selectListItems = items.Select(x => new CheckListItem(x, x)).ToList();
|
||||
|
||||
return new(selectListItems);
|
||||
}
|
||||
}
|
||||
+1
-14
@@ -7,19 +7,6 @@
|
||||
<add key="Elsa 3 Preview" value="https://f.feedz.io/elsa-workflows/elsa-3/nuget/index.json" />
|
||||
<add key="Webhooks Core Preview" value="https://f.feedz.io/sfmskywalker/webhooks-core/nuget/index.json" />
|
||||
<add key="Local Package source" value="D:\MyNugetPackages" />
|
||||
<add key="Caspian Elsa Core" value="D:\NugetPackages_ElsaCore" />
|
||||
</packageSources>
|
||||
<packageSourceMapping>
|
||||
<packageSource key="NuGet official package source">
|
||||
<package pattern="*" />
|
||||
</packageSource>
|
||||
<packageSource key="Elsa 3 Preview">
|
||||
<package pattern="Elsa" />
|
||||
<package pattern="Elsa.*" />
|
||||
<package pattern="Elsa.Studio.*" />
|
||||
</packageSource>
|
||||
<packageSource key="Webhooks Core Preview">
|
||||
<package pattern="WebhooksCore" />
|
||||
<package pattern="WebhooksCore.*" />
|
||||
</packageSource>
|
||||
</packageSourceMapping>
|
||||
</configuration>
|
||||
@@ -7,7 +7,7 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Data Source=.;Initial Catalog=WorkflowFrameworkTest;User ID=sa;Password=123456;Integrated Security=false;TrustServerCertificate=True;"
|
||||
"DefaultConnection": "Data Source=.;Initial Catalog=WfDb;User ID=sa;Password=123456;Integrated Security=false;TrustServerCertificate=True;"
|
||||
},
|
||||
"LogDatabaseSettings": {
|
||||
"LogsCollectionName": "TestWorkflowCollection",
|
||||
|
||||
Reference in New Issue
Block a user