Replies: 1 comment 1 reply
-
|
I think it's related to or a duplicate of |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a custom IRecipeStepHandler that:
Saves a YesSql document via _session.SaveAsync(detail)
Updates a cached document via _documentManager.UpdateAsync(doc)
Both calls succeed without error. The exception occurs later, when the shell scope disposes and flushes both writes — the IDocumentManager update and the ISession save both try to commit, causing a SQLite lock conflict.
Function that updates
The issue arises only after it enters the if block (i.e. another step is executed). If import a recipe with a single step (workflowtype) it works ok.
Question: What's the correct pattern for updating both a YesSql document and an IDocumentManager document within a recipe step? Should I use ShellScope.Current.DeferredTask to defer the document manager update to after the recipe transaction completes?
Beta Was this translation helpful? Give feedback.
All reactions