-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Failed to generate a unique workflow name after 100 attempts #29
Comments
Yep, makes sense. Although I don't think it matters, but just for my understanding: are you hosting Elsa Studio and Elsa Server from the same ASP.NET Core project, or are you keeping them in separate projects? I noticed that your dependencies for Elsa Studio use some mixed package versions, plus packages that wouldn't be necessary if you're only hosting the Elsa Studio and not Elsa Server. For Elsa Studio, I think you need to remove all but these: <ItemGroup>
<PackageReference Include="Elsa.Studio" Version="3.0.0-preview.78" />
<PackageReference Include="Elsa.Studio.Core.BlazorServer" Version="3.0.0-preview.78" />
<PackageReference Include="Elsa.Studio.Login.BlazorServer" Version="3.0.0-preview.78" />
</ItemGroup> The other packages are either deprecated, not implemented or intended for Elsa Server only. |
I'm hosting Elsa Server and Studio from the same project. I've now updated the dependencies to these, with minimal ElsaStudio dependencies: <ItemGroup>
<PackageReference Include="Elsa" Version="3.0.0-preview.660" />
<PackageReference Include="Elsa.Http" Version="3.0.0-preview.660" />
<PackageReference Include="Elsa.Identity" Version="3.0.0-preview.660" />
<PackageReference Include="Elsa.Studio" Version="3.0.0-preview.78" />
<PackageReference Include="Elsa.Studio.Core.BlazorServer" Version="3.0.0-preview.78" />
<PackageReference Include="Elsa.Studio.Login.BlazorServer" Version="3.0.0-preview.78" />
<PackageReference Include="Elsa.Webhooks" Version="3.0.0-preview.660" />
<PackageReference Include="Elsa.Workflows.Api" Version="3.0.0-preview.660" />
<PackageReference Include="Elsa.Workflows.Designer" Version="3.0.0-preview.660" />
</ItemGroup> my Program.cs. There also might be some useless/duplicated stuff using Elsa.Extensions;
using Elsa.Studio.Backend.Extensions;
using Elsa.Studio.Core.BlazorServer.Extensions;
using Elsa.Studio.Dashboard.Extensions;
using Elsa.Studio.Login.BlazorServer.Extensions;
using Elsa.Studio.Shell.Extensions;
using Elsa.Studio.Workflows.Designer.Extensions;
using Elsa.Studio.Workflows.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
builder.Services.AddRazorPages();
builder.Services.AddCors(cors => cors.AddDefaultPolicy(policy => policy.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()));
//
builder.Services.AddServerSideBlazor(options =>
{
// Register the root components.
options.RootComponents.RegisterCustomElsaStudioElements();
});
builder.Services.AddCore();
builder.Services.AddShell(options => builder.Configuration.GetSection("Shell").Bind(options));
builder.Services.AddRemoteBackendModule(options => builder.Configuration.GetSection("Backend").Bind(options));
builder.Services.AddLoginModule();
builder.Services.AddDashboardModule();
builder.Services.AddWorkflowsModule();
builder.Services.AddElsa(elsa =>
{
elsa.UseIdentity(identity =>
{
identity.UseAdminUserProvider();
identity.TokenOptions = options => options.SigningKey = "secret-token-signing-key";
});
elsa.UseDefaultAuthentication();
//elsa.UseWorkflowManagement(management => management.UseEntityFrameworkCore(m => m.UseSqlite()));
elsa.UseJavaScript();
elsa.UseLiquid();
elsa.UseWorkflowsApi();
elsa.UseHttp(http => http.ConfigureHttpOptions = options => options.BasePath = "/wf");
});
// Configure SignalR.
builder.Services.AddSignalR(options =>
{
// Set MaximumReceiveMessageSize:
options.MaximumReceiveMessageSize = 5 * 1024 * 1000; // 5MB
});
//var app = builder.Build();
var app = builder.Build();
// Configure the HTTP request pipeline.
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseWorkflowsApi();
app.UseWorkflows();
app.MapControllers();
app.MapRazorPages();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");
app.Run(); |
OK. Would it be possible for you to share your (stripped down if necessary) solution so I an take a closer look? |
Hope this works https://github.com/schneidersympatient/elsa-bug-workflow-attempts |
@schneidersympatient I haven't had a chance yet to look into it, but it's possible that the fix from @yspanj solved the issue. If not, please let me know and we'll leave this issue open for fixing. |
Yes, that fixed it, thanks! |
Hi,
whenever I try to use a custom v3 server, as explained in the docs (e.g. here: https://v3.elsaworkflows.io/docs/installation/elsa-server) ElsaStudio fails when trying to create a new Workflow:
It's working when I start the server from the sources, as explained in #18 . However I'd like to host my own server, in order to be independent from the original server repository.
Here are my dependencies. I'm using the feedz.io packages for ElsaStudio.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: