Repository navigation
Conversation
…iable When a variable was created with a JSON node of the other Jackson version (e.g. a Jackson 3 node with the Jackson 2 variable json mapper), the node was transformed to the node type of the variable json mapper. When an existing variable was updated, the node was not transformed, so it was not recognized as json and was stored as a serializable variable instead. DefaultVariableInstanceValueModifier now transforms the JSON value in updateVariableValue in the same way as in setVariableValue.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a variable is created with a JSON node of the other Jackson version (e.g. a Jackson 3 node with the Jackson 2
VariableJsonMapper),DefaultVariableInstanceValueModifier#setVariableValuetransforms it to the node type of the variable json mapper.updateVariableValuedid not, so when an existing variable was updated with such a node, thejsontype did not recognize it and the variable was silently changed to theserializabletype. Reading it back returned the node of the other Jackson version, and JSON expressions and anything that excludes serializable variables no longer worked on it.updateVariableValuenow transforms the value in the same way assetVariableValue, through the new protectedtransformJsonValuemethod. Custom modifiers that overrideupdateVariableValueand callsuperget this as well.The tests cover updates with a node of the other Jackson version through
RuntimeServiceandTaskServicein BPMN and CMMN, with both the Jackson 2 and the default Jackson 3 mapper, and an update of a serializable variable that now switches tojson.Check List: