|
255 | 255 | import org.flowable.common.engine.impl.interceptor.CommandInterceptor; |
256 | 256 | import org.flowable.common.engine.impl.interceptor.EngineConfigurationConstants; |
257 | 257 | import org.flowable.common.engine.impl.javax.el.ELResolver; |
| 258 | +import org.flowable.common.engine.impl.joda.JodaDeprecationLogger; |
258 | 259 | import org.flowable.common.engine.impl.persistence.deploy.DefaultDeploymentCache; |
259 | 260 | import org.flowable.common.engine.impl.persistence.deploy.DeploymentCache; |
260 | 261 | import org.flowable.common.engine.impl.persistence.entity.TableDataManager; |
|
304 | 305 | import org.flowable.variable.api.types.VariableTypes; |
305 | 306 | import org.flowable.variable.service.VariableServiceConfiguration; |
306 | 307 | import org.flowable.variable.service.history.InternalHistoryVariableManager; |
| 308 | +import org.flowable.variable.service.impl.JodaTimeVariableSupport; |
307 | 309 | import org.flowable.variable.service.impl.db.IbatisVariableTypeHandler; |
308 | 310 | import org.flowable.variable.service.impl.types.BigDecimalType; |
309 | 311 | import org.flowable.variable.service.impl.types.BigIntegerType; |
|
315 | 317 | import org.flowable.variable.service.impl.types.EmptyCollectionType; |
316 | 318 | import org.flowable.variable.service.impl.types.InstantType; |
317 | 319 | import org.flowable.variable.service.impl.types.IntegerType; |
318 | | -import org.flowable.variable.service.impl.types.JodaDateTimeType; |
319 | | -import org.flowable.variable.service.impl.types.JodaDateType; |
320 | 320 | import org.flowable.variable.service.impl.types.JsonType; |
321 | 321 | import org.flowable.variable.service.impl.types.LocalDateTimeType; |
322 | 322 | import org.flowable.variable.service.impl.types.LocalDateType; |
@@ -514,6 +514,8 @@ public class CmmnEngineConfiguration extends AbstractBuildableEngineConfiguratio |
514 | 514 | */ |
515 | 515 | protected boolean jsonVariableTypeTrackObjects = true; |
516 | 516 |
|
| 517 | + protected JodaTimeVariableSupport jodaTimeVariableSupport = JodaTimeVariableSupport.READ_AS_JAVA_TIME; |
| 518 | + |
517 | 519 | protected List<CaseInstanceMigrationCallback> caseInstanceMigrationCallbacks; |
518 | 520 |
|
519 | 521 | // Set Http Client config defaults |
@@ -1408,8 +1410,7 @@ public void initVariableTypes() { |
1408 | 1410 | variableTypes.addType(new InstantType()); |
1409 | 1411 | variableTypes.addType(new LocalDateType()); |
1410 | 1412 | variableTypes.addType(new LocalDateTimeType()); |
1411 | | - variableTypes.addType(new JodaDateType()); |
1412 | | - variableTypes.addType(new JodaDateTimeType()); |
| 1413 | + jodaTimeVariableSupport.registerJodaTypes(variableTypes); |
1413 | 1414 | variableTypes.addType(new DoubleType()); |
1414 | 1415 | variableTypes.addType(new BigDecimalType()); |
1415 | 1416 | variableTypes.addType(new BigIntegerType()); |
@@ -2967,6 +2968,19 @@ public CmmnEngineConfiguration setJsonVariableTypeTrackObjects(boolean jsonVaria |
2967 | 2968 | return this; |
2968 | 2969 | } |
2969 | 2970 |
|
| 2971 | + public JodaTimeVariableSupport getJodaTimeVariableSupport() { |
| 2972 | + return jodaTimeVariableSupport; |
| 2973 | + } |
| 2974 | + |
| 2975 | + public CmmnEngineConfiguration setJodaTimeVariableSupport(JodaTimeVariableSupport jodaTimeVariableSupport) { |
| 2976 | + //noinspection deprecation |
| 2977 | + if (JodaTimeVariableSupport.WRITE == jodaTimeVariableSupport) { |
| 2978 | + JodaDeprecationLogger.LOGGER.warn("Using deprecated joda time write support for the CMMN engine configuration"); |
| 2979 | + } |
| 2980 | + this.jodaTimeVariableSupport = jodaTimeVariableSupport; |
| 2981 | + return this; |
| 2982 | + } |
| 2983 | + |
2970 | 2984 | public CaseDiagramGenerator getCaseDiagramGenerator() { |
2971 | 2985 | return caseDiagramGenerator; |
2972 | 2986 | } |
|
0 commit comments