Open DumboJetEngine opened 1 week ago
Hi @DumboJetEngine,
Thank you for your interest in our product.
add the Camunda.Api.Client nuget package to the project
Is this Camunda client created based on our OpenAPI? I found https://www.nuget.org/packages/Camunda.Api.Client that doesn't seem to have been updated since 2020 and I don't think it is compatible with Camunda 7.21. Further, we don't provide support the clients created by third-party tools.
Would it be possible to simplify the project without the usage of NuGet client and share an end-to-end minimal example that reproduces the issue? For that you can consider using: https://github.com/camunda/camunda-engine-unittest template.
Could you try to run your scenario with enabled asynchronous continuation on Activity_Initialize
task and observe if the errors still persist? Screenshot:
In case you need to upload more data relevant to the investigation of the issue, please create a simple repository or upload files as gist in GitHub. Thank you in advance for that.
Best, Yana
Hello.
I might try to hit your API without this client, to see if that changes anything, but I honestly don't think it will.
I might try to hit your API without this client, to see if that changes anything, but I honestly don't think it will.
That might be the case, I just wanted to lay out all of the options. If you manage to create a standalone reproducible example will speed up reproducing the bug and its analysis.
Hello again.
I've used a simple HTTP client to reproduce the problem this time:
https://gist.github.com/DumboJetEngine/7bcdeccc222d4339fe70bc008f56f652
Test with MaxDegreeOfParallelism = 1
and MaxDegreeOfParallelism = 10
to see the difference.
Here is the bpmn file I've used: https://gist.github.com/DumboJetEngine/4fd2efb3462a879f210afc6636916069
I don't see asynchronous continuations affecting anything (when it comes to errors at least).
Environment (Required on creation)
( I have customized pretty much nothing on Camunda. It uses the default H2 database, as far as I understand. Isn't that database a valid production candidate? )
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
I have a Camunda 7 workflow with a sub-process that accesses parent variables. Specifically, the parent does this in a script task (groovy code):
And the sub-process calls the setSuccess() and setError("sth") functions.
The workflow does not contain any user tasks, so once I start a process instance, it executes and it gets done/destroyed, after I get the result variables back.
All is working fine when I call the workflow once at a time. But when I bombard it with parallel calls (each time creating a new process instance), then I get weird errors revolving around variables.
This is the C# code that calls the workflow in parallel (using the latest
Camunda.Api.Client
nuget package):When MaxDegreeOfParallelism is bigger than 1, I get all kinds of unexpected errors, like:
Here are some stack traces (they were too long to post here): https://mega.nz/file/cR0VSLDA#W1f_a4Xxs6OI0hREfAc1SBwx0nzvDrQb3Jn1qPDoGpE
And here is the workflow file: https://mega.nz/file/NM1kDDxK#zsiqoi-7meHYLV4cYl7Qa9CAmQdtyFAW3aMf4cNAKA0
Steps to reproduce (Required on creation)
Camunda.Api.Client
nuget package to the project.actionNames
, make sure there are many (> 100) strings.MaxDegreeOfParallelism = 1
and then withMaxDegreeOfParallelism = 10
, to see the difference.Observed Behavior (Required on creation)
When using
MaxDegreeOfParallelism = 10
various errors related to setting or getting the variables appear, coming from the execution engine.Expected behavior (Required on creation)
Not getting any error, no matter what degree of parallelism you use, since a process instance is supposed to be isolated from other process instance.
Root Cause (Required on prioritization)
Solution Ideas
Hints
Links
Breakdown
Dev2QA handover