MohammadMu99 commented on PR #7259:
URL: https://github.com/apache/incubator-kie/pull/7259#issuecomment-6788826852
Thanks @martinweiler for the review! All inline comments are addressed in
9dc57e5.
**Events:** each variable change made by the migration now fires
before/after variable-changed events, so data-index and data-audit get updated.
I didn't call `setVariable()` directly: during unmarshalling the process
instance has no knowledge runtime yet, so it wouldn't fire anything. The events
go through the runtime passed to the marshaller listener instead.
The new unit test checks that the events are fired with the right old/new
values (using a mocked runtime). If you'd like, I can also add an integration
test that verifies data-index picks up the migrated variables.
**User tasks:** this PR only changes process variables. Inputs already
copied into open user tasks are not changed. Task outputs should be mapped
through the target process definition, so they would be written to the new
variable name. Updating the inputs of open tasks is planned as a follow-up PR
("task input rules / `scope`", PR 2 in #7273).
**Known limitation:** `default` values are read from JSON as basic types
(whole numbers as `Integer`, objects as maps). With the new type check, a
default for a `Long` or a custom object variable will be rejected. Converting
values to the declared type is planned as a follow-up (PR 1 in #7273).
**Open question:** for `rename` into a variable that already has a value, I
chose to overwrite and log a WARN, since the rule states the intent explicitly.
Happy to switch to skipping instead if you think that's safer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]