diff --git a/activiti-cloud-runtime-bundle-service/activiti-cloud-services-runtime-bundle/activiti-cloud-services-core/src/main/java/org/activiti/cloud/services/core/ProcessVariableValueConverter.java b/activiti-cloud-runtime-bundle-service/activiti-cloud-services-runtime-bundle/activiti-cloud-services-core/src/main/java/org/activiti/cloud/services/core/ProcessVariableValueConverter.java index 4c34e00d5f..75c211f486 100644 --- a/activiti-cloud-runtime-bundle-service/activiti-cloud-services-runtime-bundle/activiti-cloud-services-core/src/main/java/org/activiti/cloud/services/core/ProcessVariableValueConverter.java +++ b/activiti-cloud-runtime-bundle-service/activiti-cloud-services-runtime-bundle/activiti-cloud-services-core/src/main/java/org/activiti/cloud/services/core/ProcessVariableValueConverter.java @@ -38,6 +38,7 @@ public class ProcessVariableValueConverter { typeRegistry.put("boolean", Boolean.class); typeRegistry.put("double", Double.class); typeRegistry.put("date", Date.class); + typeRegistry.put("datetime", Date.class); typeRegistry.put("localdate", LocalDate.class); typeRegistry.put("bigdecimal", BigDecimal.class); typeRegistry.put("json", JsonNode.class); diff --git a/activiti-cloud-runtime-bundle-service/activiti-cloud-services-runtime-bundle/activiti-cloud-services-core/src/test/java/org/activiti/cloud/services/core/ProcessVariableValueConverterTest.java b/activiti-cloud-runtime-bundle-service/activiti-cloud-services-runtime-bundle/activiti-cloud-services-core/src/test/java/org/activiti/cloud/services/core/ProcessVariableValueConverterTest.java index e2d50d48b9..103e9d7dd8 100644 --- a/activiti-cloud-runtime-bundle-service/activiti-cloud-services-runtime-bundle/activiti-cloud-services-core/src/test/java/org/activiti/cloud/services/core/ProcessVariableValueConverterTest.java +++ b/activiti-cloud-runtime-bundle-service/activiti-cloud-services-runtime-bundle/activiti-cloud-services-core/src/test/java/org/activiti/cloud/services/core/ProcessVariableValueConverterTest.java @@ -132,6 +132,17 @@ void testProcessVariableValueConverterDateValue() { assertThat(dateValue).isEqualTo(dateFormatterProvider.parse(DATE_1970_01_01T01_01_01_001Z)); } + @Test + void testProcessVariableValueConverterDatetimeValue() { + // when + Date dateValue = variableValueConverter.convert( + new ProcessVariableValue("Datetime", DATE_1970_01_01T01_01_01_001Z) + ); + + // then + assertThat(dateValue).isEqualTo(dateFormatterProvider.parse(DATE_1970_01_01T01_01_01_001Z)); + } + @Test void testProcessVariableValueConverterBigDecimalValue() { assertThat(