Are database transactions supported in Elsa.Client.Services.IWorkflowDefinitionsApi? #6781
agalekseev
started this conversation in
Design & tech
Replies: 1 comment
-
code to reproduce (tested on Elsa image elsaworkflows/elsa-dashboard-and-server:sha-2c431f5)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We use Elsa 2.14.1 and calling Elsa.Client.Services.IWorkflowDefinitionsApi.SaveAsync endpoint (/v1/workflow-definitions/{workflowDefinitionVersionId}) to store dynamically generated workflow in ECR container connected to external DB (Postgres). But, sometimes Elsa's database loses "latest" version of a workflow definition, simply no record with "IsLatest" column set to true for a particular workflow.
Same issue with 2 concurrent users trying to update workflow definition with the same id. It seems, in general, that Elsa server does not use db transactions to save entities to db, nor isolates concurrent users, please, correct me if I'm wrong.
Is it possible to use transactional behavior in Elsa Server API somehow? Maybe some extension exists? Or does it need to be added manually during configuration as code hooks or configs?
Beta Was this translation helpful? Give feedback.
All reactions