@@ -95,16 +95,16 @@ class DmnService(
95
95
)
96
96
97
97
sources?.forEach {
98
- beslisTabelConfiguration.variabelen[ it.key]?. let { variable ->
99
- {
100
- variablesMapping.putAll (
101
- mapBeslisTabelVariablesWithSource(
102
- variable ,
103
- it.value ,
104
- ),
105
- )
106
- }
107
- } ? : logger.warn( BESLISTABLE_NOT_FOUND_BY_KEY , it.key)
98
+ if ( beslisTabelConfiguration.variabelen.containsKey( it.key)) {
99
+ variablesMapping.putAll(
100
+ mapBeslisTabelVariablesWithSource (
101
+ beslisTabelConfiguration.variabelen[it.key] !! ,
102
+ it.value ,
103
+ ) ,
104
+ )
105
+ } else {
106
+ logger.warn( BESLISTABLE_NOT_FOUND_BY_KEY , it.key)
107
+ }
108
108
}
109
109
110
110
// handle the configured static variables
@@ -157,18 +157,20 @@ class DmnService(
157
157
158
158
// loop through the sources and get the Object as Json and map with the variables
159
159
sources?.forEach {
160
- productService.getSourceAsJson(it.key, it.value)?.let { source ->
161
- beslisTabelVariables[it.key]?.let { variable ->
162
- {
163
- variablesMapping.putAll(
164
- mapBeslisTabelVariablesWithSource(
165
- variable,
166
- source,
167
- ),
168
- )
169
- }
170
- } ? : logger.warn(BESLISTABLE_NOT_FOUND_BY_KEY , it.key)
171
- } ? : logger.warn(" Could not find objects for key {} with uuid {}" , it.key, it.value)
160
+ val source = productService.getSourceAsJson(it.key, it.value)
161
+
162
+ if (source == null ) {
163
+ logger.warn(" Could not find objects for key {} with uuid {}" , it.key, it.value)
164
+ } else {
165
+ if (beslisTabelVariables.containsKey(it.key)) {
166
+ variablesMapping.putAll(
167
+ mapBeslisTabelVariablesWithSource(
168
+ beslisTabelVariables[it.key]!! ,
169
+ source,
170
+ ),
171
+ )
172
+ }
173
+ }
172
174
}
173
175
174
176
// check if the beslisTabelVariables contains a producttype configuration,
0 commit comments