Repository navigation
Commit a6ce53e
authored
Fix potential issues when retrieving variables with unresolvable variable values (#4299)
* Fix potential issues when retrieving variables with unresolvable variable values
A variable whose value cannot be resolved (e.g. a serialized value that can no longer be
deserialized, or a custom variable type that fails to load its value) failed every read that
returned variables, like the variable instance queries, the queries including variables and
the variable REST endpoints.
- The (historic) variable instance queries and the queries including variables return such a
variable with a null value instead of failing, and mark it as having an unresolvable value
(HasUnresolvableValue on the runtime and historic variable entities), so reading its value
again returns null instead of failing again.
- getVariable(s) of the RuntimeService, CmmnRuntimeService, TaskService and CmmnTaskService
still fail for such a variable, as do variable access during process / case execution and
case reactivation.
- The variable REST endpoints read the variable instances and resolve their values when the
REST response is created, so such a variable is returned with a null value and a
valueUnresolvable marker (only present when true) instead of failing the whole response.
* Resolve variable values in the REST layer instead of marking unresolvable variable entities
The variable entities are no longer changed: HasUnresolvableValue and VariableValueUtil are removed and the
(historic) variable instance queries and service getters fail again for a variable whose value cannot be resolved.
- The queries that include variables get an include*Variables(..., boolean excludeVariableInitialization) overload
(case, historic case, process, historic process, plan item, historic plan item and task queries). The variable
values are then not resolved while the query result is mapped, but only when they are read.
- The REST query endpoints include the variables without initializing them and create the response in the same
command as the query. The REST response factories create the REST variables from the variable instances and mark
a variable whose value cannot be resolved with valueUnresolvable, without a value.
- The REST type of such a variable is determined from the variable type by the REST variable converters
(RestVariableConverter#isVariableTypeSupported), falling back to the binary or serializable type.
* Return a server error for the binary data of a variable whose value cannot be resolved
- The variable data endpoints resolve the value of the requested variable strictly again, so a variable whose value
cannot be resolved results in a server error instead of a REST variable without a value.
- The historic process instance and historic task instance variable data endpoints include the variables without
initializing them and only resolve the value of the requested variable, so another variable whose value cannot be
resolved no longer fails the request.
- An unresolvable variable value is logged once at warn level, the base variable resources use a logger for the
concrete resource class.1 parent d149602 commit a6ce53e
61 files changed
Lines changed: 2549 additions & 261 deletions
File tree
- modules
- flowable-cmmn-api/src/main/java/org/flowable/cmmn/api
- history
- runtime
- flowable-cmmn-engine/src
- main/java/org/flowable/cmmn/engine/impl
- history
- runtime
- test/java/org/flowable/cmmn/test/runtime
- flowable-cmmn-rest/src
- main/java/org/flowable/cmmn/rest/service/api
- history
- caze
- planitem
- task
- variable
- runtime
- caze
- planitem
- task
- variable
- test/java/org/flowable/cmmn/rest/service/api
- runtime
- flowable-common-rest/src/main/java/org/flowable/common/rest/variable
- flowable-engine/src
- main/java/org/flowable/engine
- history
- impl
- runtime
- test/java/org/flowable/engine/test/api/variables
- flowable-rest/src
- main/java/org/flowable/rest/service/api
- history
- runtime
- process
- task
- test/java/org/flowable/rest/service/api
- runtime
- flowable-task-service-api/src/main/java/org/flowable/task/api
- flowable-task-service/src/main/java/org/flowable/task/service/impl
- flowable-variable-service/src/main/java/org/flowable/variable/service/impl/persistence/entity
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
200 | 214 | | |
201 | 215 | | |
202 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
252 | 266 | | |
253 | 267 | | |
254 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
408 | 415 | | |
409 | 416 | | |
410 | 417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
940 | 942 | | |
941 | 943 | | |
942 | 944 | | |
943 | | - | |
| 945 | + | |
| 946 | + | |
944 | 947 | | |
945 | | - | |
946 | | - | |
947 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
948 | 953 | | |
949 | 954 | | |
950 | 955 | | |
| |||
1050 | 1055 | | |
1051 | 1056 | | |
1052 | 1057 | | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1053 | 1072 | | |
1054 | 1073 | | |
1055 | 1074 | | |
| |||
1555 | 1574 | | |
1556 | 1575 | | |
1557 | 1576 | | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1558 | 1581 | | |
1559 | 1582 | | |
1560 | 1583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
740 | 742 | | |
741 | 743 | | |
742 | 744 | | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
743 | 752 | | |
744 | 753 | | |
745 | 754 | | |
| |||
842 | 851 | | |
843 | 852 | | |
844 | 853 | | |
845 | | - | |
| 854 | + | |
| 855 | + | |
846 | 856 | | |
847 | 857 | | |
848 | 858 | | |
| |||
1032 | 1042 | | |
1033 | 1043 | | |
1034 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1035 | 1049 | | |
1036 | 1050 | | |
1037 | 1051 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
1073 | 1075 | | |
1074 | 1076 | | |
1075 | 1077 | | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1076 | 1092 | | |
1077 | 1093 | | |
1078 | 1094 | | |
| |||
1106 | 1122 | | |
1107 | 1123 | | |
1108 | 1124 | | |
1109 | | - | |
| 1125 | + | |
| 1126 | + | |
1110 | 1127 | | |
1111 | 1128 | | |
1112 | 1129 | | |
| |||
1383 | 1400 | | |
1384 | 1401 | | |
1385 | 1402 | | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
1386 | 1407 | | |
1387 | 1408 | | |
1388 | 1409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
1183 | 1185 | | |
1184 | 1186 | | |
1185 | 1187 | | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
1186 | 1195 | | |
1187 | 1196 | | |
1188 | 1197 | | |
| |||
1206 | 1215 | | |
1207 | 1216 | | |
1208 | 1217 | | |
1209 | | - | |
| 1218 | + | |
| 1219 | + | |
1210 | 1220 | | |
1211 | 1221 | | |
1212 | 1222 | | |
| |||
1415 | 1425 | | |
1416 | 1426 | | |
1417 | 1427 | | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
1418 | 1433 | | |
1419 | 1434 | | |
1420 | 1435 | | |
| |||
0 commit comments