@@ -95,16 +95,16 @@ class DmnService(
95
95
)
96
96
97
97
sources?.forEach {
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
- }
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)
108
108
}
109
109
110
110
// handle the configured static variables
@@ -157,24 +157,18 @@ 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
- 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
- if (beslisTabelVariables[it.key] != null ) {
160
+ productService.getSourceAsJson(it.key, it.value)?.let { source ->
161
+ beslisTabelVariables[it.key]?.let { variable ->
162
+ {
167
163
variablesMapping.putAll(
168
164
mapBeslisTabelVariablesWithSource(
169
- beslisTabelVariables[it.key] !! ,
165
+ variable ,
170
166
source,
171
167
),
172
168
)
173
169
}
174
- } else {
175
- logger.warn(BESLISTABLE_NOT_FOUND_BY_KEY , it.key)
176
- }
177
- }
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)
178
172
}
179
173
180
174
// check if the beslisTabelVariables contains a producttype configuration,
0 commit comments