MohammadMu99 opened a new pull request, #7330: URL: https://github.com/apache/incubator-kie/pull/7330
**Issue**: https://github.com/apache/incubator-kie/issues/7329 **Referenced Pull Requests**: #7259 Adds a `convert` action to `variableMigrationPlan`, so a migration plan can change the type of a process variable when a new process version changes it: ```json { "action": "convert", "name": "loanAmount", "toType": "bigdecimal" } ``` Supported `toType` values: `string`, `integer`, `long`, `double`, `bigdecimal`, `boolean`. **Changes** - New `CONVERT` action in `VariableMigrationAction` and new `VariableMigrationType` enum (unknown types are rejected when the plan is loaded). - New `toType` field in `VariableMigrationPlan`; `validate()` requires `name` and `toType` for `convert`. - `VariableMigrator` converts through `BigDecimal` with `intValueExact` / `longValueExact`, so values are never silently truncated. A value that cannot be converted fails the migration with a clear error. - Empty values and values already of the target type are left unchanged. - The converted value is checked against the type declared in the target process and written through the existing `change()`, so variable changed events are fired. **Tests** - `MigrationPlanProviderTest`: reading a `convert` rule, missing `toType`, unknown `toType`. - `MigrationPlanServiceTest`: end-to-end conversion during migration, target type mismatch, successful conversions for every type, no-op cases, and values that cannot be converted. -- 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]
