Upgrading your scripts for Groovy 3 compatibility
Groovy 3 introduces a list of breaking changes that can affect Collibra Groovy workflow scripts. You can consult the full list in the Groovy 3 release notes. There are two breaking changes that can most likely affect Collibra workflows:
- If a Groovy switch statement has a default branch, it must be the last branch.
- Groovy is now more compliant with the JavaBeans specification for one edge case scenario involving any field having a name starting with an uppercase letter (GROOVY-9618).
- Enums cannot have a non-private constructor.
- To use an interface “Function” as a parameter it must be typed, for example:
_methodHandler(Function<Integer, Integer> requiredFunction)
.
You can upgrade the workflows groovy script code to be compatible with these changes before we upgrade Collibra to the version containing Groovy 3.