This article addresses issues encountered during Journey Manager upgrades, where services fail due to enhanced static type checking in newer versions. It provides examples of such failures and explains both the immediate and permanent fixes.
Applicable To
Product/Service Name: Temenos Journey Manager
Module/Component: Integration Services, Static Type Checking
Version(s): 20.11.6 and above
Prerequisites
- Understanding Groovy scripting in JM
- Experience using JM SDK and Maven
- Access to modify service code and deploy via SDK
Use Case
After upgrading to a newer version of Journey Manager, users may experience errors due to more stringent static type checking. This is particularly problematic if the code wasn’t verified with these checks during build time.
Steps to Reproduce
1. Upgrade Journey Manager (e.g., from 19.11.6 to 20.11.6).
2. Deploy services using dynamic typing (e.g., MuleSoft services).
3. Observe runtime errors such as:
- Cannot call setAll(java.util.Map<String, Object>) with LinkedHashMap<Object, Object>
Example Errors
- MuleSoft Find Address Service
Error: com.temenos.clientname.integrationservices.manager.mulesoft.address.AddressSearch: 130: [Static type checking] - Cannot call com.temenos.clientname.integrationservices.manager.DynamicDataResultList#setAll(java.util.Map
- MuleSoft Fraud Check Service
Error: 10:03:13,732 ERROR Failed to execute Action [MuleSoft Fraud Check]
Details: Fluent Function Service Error : com.avoka.core.groovy.runtime.GroovyScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
com.temenos.clientname.integrationservices.manager.mulesoft.address.AddressSearch: 125: [Static type checking] - Cannot call com.temenos.clientname.integrationservices.manager.DynamicDataResultList#setAll(java.util.Map
Temporary Solution
Replace dynamic map declaration with static typing:
Initial Code:
Map address = [:]
address.fullAddress = fullAddress
address.lookupKey = id
Changed Code:
Map<String, Object> address = [:] as Map<String, Object>
address.put("fullAddress", fullAddress)
address.put("lookupKey", id)
Permanent Solution
Manually annotate all Groovy classes with @TypeChecked or @CompileStatic.
There is no automatic feature in Maven or JM SDK to enforce this during the build.