-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Java External Task client unable to load value of local file variable #4523
Labels
group:support
All requests that are linked to a customer request. DRI: Tassilo
type:bug
Issues that describe a user-facing bug in the project.
version:7.22.0
Comments
venetrius
added
type:bug
Issues that describe a user-facing bug in the project.
group:support
All requests that are linked to a customer request. DRI: Tassilo
labels
Aug 7, 2024
Let's try to fix it in the NodeJS XTaC as well or create a follow-up issue. |
I still have to create a new task for External JavaScript Client or apply a fix in this ticket. |
@gbetances089 QA hand over note.
Please see linked Jira issue for example BPMN. |
venetrius
added a commit
that referenced
this issue
Sep 16, 2024
tasso94
pushed a commit
that referenced
this issue
Sep 20, 2024
venetrius
added a commit
that referenced
this issue
Sep 20, 2024
related to: #4523 Co-authored-by: Tassilo Weidner <[email protected]>
1 task
Tested on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
group:support
All requests that are linked to a customer request. DRI: Tassilo
type:bug
Issues that describe a user-facing bug in the project.
version:7.22.0
Environment (Required on creation)
Reported and reproduced on 7.21-ee
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
When trying to access the value of a local file Variable
vars.getValueTyped("localFile") .getValue();
, we get the following error message:Steps to reproduce (Required on creation)
localFile
localFile
variable in the external client:See example bpmn and process in JIRA
Observed Behavior (Required on creation)
When trying to access the value of a local file Variable
vars.getValueTyped("localFile") .getValue();
, we get the following error message:Expected behavior (Required on creation)
The call to VariableMap::getValueTyped should return the actual value of the fileValue and don’t throw an error.
Root Cause (Required on prioritization)
In the class
org.camunda.bpm.client.impl.EngineClient
, the methodgetLocalBinaryVariable
gets called from DeferredFileValueImpl::load with theprocessInstanceId
instead of theexecutionId
.The request sent to the rest-api looks like:
{{GET /execution/{processInstanceId}/localVariables/{name}/data}}
It tries to resolve a variable from the top level process instance execution instead of using the actual child execution where the local variable is set.
When executing the request (with the processInstanceId) in postman, i get the same error. When using the actual executionId of the externalTask
{{GET /execution/{excecutionId}/localVariables/{name}/data}}
, i get the correct variable value/file content.Solution Ideas
Current attempt to retrieve content of a Variable:
Using https://docs.camunda.org/rest/camunda-bpm-platform/7.21/#tag/Process-Instance/operation/getProcessInstanceVariableBinary with the executionId would work for both local and global variables:
The
executionId
can be set on theDeferredFileValueImpl
instance when theinstanceVariable
is returned from ExternalTaskImpl.javagetVariable
,getAllVariablesTyped
,getVariableTyped
functions.Hints
Links
Breakdown
Pull Requests
Follow ups
Dev2QA handover
The text was updated successfully, but these errors were encountered: