elsa-workflows / elsa-workflows/elsa-core

issue with _alterationPlanScheduler.SubmitAsync after mutitenanet enabled

Open
#7,326 0 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

### Discussed in https://github.com/elsa-workflows/elsa-core/discussions/7086

Originally posted by **shouha85** November 20, 2025
any one has idea how await _alterationPlanScheduler.SubmitAsync(plan); will work under specific tenanet
as the following error thrown when i use the above method after "using (_tenantAccessor.PushContext(tenant))", knowing it work just fine without the tenanet configure

System.Exception: Workflow definition with ID 'Elsa.Alterations.ExecuteAlterationPlan' not found
at Elsa.Alterations.Services.DefaultAlterationPlanScheduler.SubmitAsync(AlterationPlanParams planParams, CancellationToken cancellationToken)


I saw in the "ExecuteAlterationPlanWorkflow " class we have the below cont string, but after configure tenanet (with 2 tenanets) in Elsa 3.5 i have now 3 ExecuteAlterationPlan (tenant-2:Elsa.Alterations.ExecuteAlterationPlan, tenant-1:Elsa.Alterations.ExecuteAlterationPlan, Elsa.Alterations.ExecuteAlterationPlan)
so when i push the target tenanet like "tenanet-1" the engine will not find "Elsa.Alterations.ExecuteAlterationPlan" definition
internal const string WorkflowDefinitionId = "Elsa.Alterations.ExecuteAlterationPlan";

please advise

i have check the code and i think the issue is both "DefaultAlterationPlanScheduler, DefaultAlterationJobRunner" isn't aware of tenant,
how we can fix this issue ..

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.