Skip to content

Commit 68a1952

Browse files
Merge branch 'main' of github.com:flowable/flowable-engine into flowable-release-8.1.0
2 parents 0a4b147 + cab1781 commit 68a1952

File tree

16 files changed

+735
-448
lines changed

16 files changed

+735
-448
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
java: [17, 21]
17+
java: [17, 21, 25]
1818
steps:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-java@v3
@@ -31,4 +31,16 @@ jobs:
3131
# Need to do install first in order for the OSGi tests to work
3232
run: ./mvnw install ${MAVEN_ARGS} -DskipTests=true -Dmaven.javadoc.skip=true
3333
- name: Test
34-
run: ./mvnw verify -Pdistro,errorLogging,include-spring-boot-samples ${MAVEN_ARGS} -Dmaven.test.redirectTestOutputToFile=false
34+
run: ./mvnw verify -Pdistro,errorLogging,include-spring-boot-samples ${MAVEN_ARGS} -Dmaven.test.redirectTestOutputToFile=true
35+
- name: Publish Test Results
36+
if: always() # important: runs even if tests fail
37+
uses: EnricoMi/publish-unit-test-result-action@v2.22.0
38+
with:
39+
files: |
40+
**/target/surefire-reports/*.xml
41+
- name: Upload Surefire reports
42+
uses: actions/upload-artifact@v6.0.0
43+
if: success() || failure() # always run even if the previous step fails
44+
with:
45+
name: surefire-${{matrix.java}}-txt
46+
path: '**/target/surefire-reports/*-output.txt'
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# Licensed to the Apache Software Foundation (ASF) under one
2-
# or more contributor license agreements. See the NOTICE file
3-
# distributed with this work for additional information
4-
# regarding copyright ownership. The ASF licenses this file
5-
# to you under the Apache License, Version 2.0 (the
6-
# "License"); you may not use this file except in compliance
7-
# with the License. You may obtain a copy of the License at
8-
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing,
12-
# software distributed under the License is distributed on an
13-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
# KIND, either express or implied. See the License for the
15-
# specific language governing permissions and limitations
16-
# under the License.
17-
wrapperVersion=3.3.2
1+
wrapperVersion=3.3.4
182
distributionType=only-script
19-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
Flowable (V7)
22
========
33

4-
[Maven Central:
5-
![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.flowable/flowable-engine/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.flowable/flowable-engine)
6-
7-
[Docker Images:
8-
![Docker Hub](https://shields.io/docker/pulls/flowable/flowable-rest)](https://hub.docker.com/r/flowable/flowable-rest)
9-
10-
[License:
11-
![license](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/flowable/flowable-engine/blob/main/LICENSE)
4+
[![Maven Central](https://img.shields.io/maven-central/v/org.flowable/flowable-engine?label=Maven%20Central)](https://central.sonatype.com/search?q=g:org.flowable%20%26%26%20%28a:flowable-engine%20a:flowable-cmmn-engine%20a:flowable-dmn-engine%29)
5+
[![Docker](https://shields.io/docker/pulls/flowable/flowable-rest)](https://hub.docker.com/r/flowable/flowable-rest)
6+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/flowable/flowable-engine/blob/main/LICENSE)
127

138
![Flowable Actions CI](https://github.com/flowable/flowable-engine/actions/workflows/main.yml/badge.svg?branch=main)
149

lgtm.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

modules/flowable-app-rest/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@
456456
<plugin>
457457
<groupId>org.springframework.boot</groupId>
458458
<artifactId>spring-boot-maven-plugin</artifactId>
459+
<version>${spring.boot.version}</version>
459460
<configuration>
460461
<arguments>
461462
<argument>--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/flowable?characterEncoding=UTF-8</argument>

modules/flowable-cmmn-rest/src/test/java/org/flowable/cmmn/rest/service/api/runtime/TaskCollectionResourceTest.java

Lines changed: 235 additions & 156 deletions
Large diffs are not rendered by default.

modules/flowable-dependencies/pom.xml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
<properties>
2020
<!-- External dependencies -->
2121
<angus-mail.version>2.0.4</angus-mail.version>
22-
<artemis.version>2.42.0</artemis.version>
22+
<artemis.version>2.44.0</artemis.version>
2323
<camel.version>4.8.0</camel.version>
24-
<commons-codec.version>1.19.0</commons-codec.version>
25-
<commons-io.version>2.20.0</commons-io.version>
26-
<commons-lang3.version>3.18.0</commons-lang3.version>
27-
<cxf.version>4.0.5</cxf.version>
24+
<commons-codec.version>1.20.0</commons-codec.version>
25+
<commons-io.version>2.21.0</commons-io.version>
26+
<commons-lang3.version>3.20.0</commons-lang3.version>
27+
<cxf.version>4.0.10</cxf.version>
2828
<drools.version>9.44.0.Final</drools.version>
2929
<groovy.version>4.0.28</groovy.version>
3030
<hikari.version>7.0.2</hikari.version>
@@ -51,12 +51,12 @@
5151
<reactor-netty.version>1.3.0</reactor-netty.version>
5252
<slf4j.version>2.0.17</slf4j.version>
5353
<!-- When updating one spring version, make sure that all of them are updated to their latest compatible versions -->
54-
<spring.amqp.version>4.0.0</spring.amqp.version>
55-
<spring.boot.version>4.0.0</spring.boot.version>
56-
<spring.kafka.version>4.0.0</spring.kafka.version>
57-
<spring.ldap.version>4.0.0</spring.ldap.version>
58-
<spring.framework.version>7.0.1</spring.framework.version>
59-
<spring.security.version>7.0.0</spring.security.version>
54+
<spring.amqp.version>4.0.1</spring.amqp.version>
55+
<spring.boot.version>4.0.1</spring.boot.version>
56+
<spring.kafka.version>4.0.1</spring.kafka.version>
57+
<spring.ldap.version>4.0.1</spring.ldap.version>
58+
<spring.framework.version>7.0.2</spring.framework.version>
59+
<spring.security.version>7.0.2</spring.security.version>
6060
<swagger.version>1.6.2</swagger.version>
6161

6262
<!-- JDBC Driver dependencies -->
@@ -437,13 +437,10 @@
437437
</dependency>
438438
<dependency>
439439
<groupId>org.apache.activemq</groupId>
440-
<artifactId>artemis-jakarta-client</artifactId>
441-
<version>${artemis.version}</version>
442-
</dependency>
443-
<dependency>
444-
<groupId>org.apache.activemq</groupId>
445-
<artifactId>artemis-jakarta-server</artifactId>
440+
<artifactId>artemis-bom</artifactId>
446441
<version>${artemis.version}</version>
442+
<type>pom</type>
443+
<scope>import</scope>
447444
</dependency>
448445
</dependencies>
449446
</dependencyManagement>

modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/misc/TypeConverterImpl.java

Lines changed: 97 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ protected Boolean coerceToBoolean(Object value) {
4343
if (value instanceof String) {
4444
return Boolean.valueOf((String)value);
4545
}
46+
if (value instanceof LambdaExpression lambdaExpression) {
47+
return coerceToBoolean(resolveLambdaExpression(lambdaExpression));
48+
}
4649
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), Boolean.class));
4750
}
4851

@@ -59,6 +62,9 @@ protected Character coerceToCharacter(Object value) {
5962
if (value instanceof String) {
6063
return Character.valueOf(((String)value).charAt(0));
6164
}
65+
if (value instanceof LambdaExpression lambdaExpression) {
66+
return coerceToCharacter(resolveLambdaExpression(lambdaExpression));
67+
}
6268
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), Character.class));
6369
}
6470

@@ -85,6 +91,9 @@ protected BigDecimal coerceToBigDecimal(Object value) {
8591
if (value instanceof Character) {
8692
return new BigDecimal((short)((Character)value).charValue());
8793
}
94+
if (value instanceof LambdaExpression lambdaExpression) {
95+
return coerceToBigDecimal(resolveLambdaExpression(lambdaExpression));
96+
}
8897
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), BigDecimal.class));
8998
}
9099

@@ -111,6 +120,9 @@ protected BigInteger coerceToBigInteger(Object value) {
111120
if (value instanceof Character) {
112121
return BigInteger.valueOf((short)((Character)value).charValue());
113122
}
123+
if (value instanceof LambdaExpression lambdaExpression) {
124+
return coerceToBigInteger(resolveLambdaExpression(lambdaExpression));
125+
}
114126
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), BigInteger.class));
115127
}
116128

@@ -134,6 +146,9 @@ protected Double coerceToDouble(Object value) {
134146
if (value instanceof Character) {
135147
return Double.valueOf((short)((Character)value).charValue());
136148
}
149+
if (value instanceof LambdaExpression lambdaExpression) {
150+
return coerceToDouble(resolveLambdaExpression(lambdaExpression));
151+
}
137152
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), Double.class));
138153
}
139154

@@ -157,6 +172,9 @@ protected Float coerceToFloat(Object value) {
157172
if (value instanceof Character) {
158173
return Float.valueOf((short)((Character)value).charValue());
159174
}
175+
if (value instanceof LambdaExpression lambdaExpression) {
176+
return coerceToFloat(resolveLambdaExpression(lambdaExpression));
177+
}
160178
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), Float.class));
161179
}
162180

@@ -180,6 +198,9 @@ protected Long coerceToLong(Object value) {
180198
if (value instanceof Character) {
181199
return Long.valueOf((short)((Character)value).charValue());
182200
}
201+
if (value instanceof LambdaExpression lambdaExpression) {
202+
return coerceToLong(resolveLambdaExpression(lambdaExpression));
203+
}
183204
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), Long.class));
184205
}
185206

@@ -203,6 +224,9 @@ protected Integer coerceToInteger(Object value) {
203224
if (value instanceof Character) {
204225
return Integer.valueOf((short)((Character)value).charValue());
205226
}
227+
if (value instanceof LambdaExpression lambdaExpression) {
228+
return coerceToInteger(resolveLambdaExpression(lambdaExpression));
229+
}
206230
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), Integer.class));
207231
}
208232

@@ -226,6 +250,9 @@ protected Short coerceToShort(Object value) {
226250
if (value instanceof Character) {
227251
return Short.valueOf((short)((Character)value).charValue());
228252
}
253+
if (value instanceof LambdaExpression lambdaExpression) {
254+
return coerceToShort(resolveLambdaExpression(lambdaExpression));
255+
}
229256
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), Short.class));
230257
}
231258

@@ -249,6 +276,9 @@ protected Byte coerceToByte(Object value) {
249276
if (value instanceof Character) {
250277
return Byte.valueOf(Short.valueOf((short)((Character)value).charValue()).byteValue());
251278
}
279+
if (value instanceof LambdaExpression lambdaExpression) {
280+
return coerceToByte(resolveLambdaExpression(lambdaExpression));
281+
}
252282
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), Byte.class));
253283
}
254284

@@ -262,9 +292,20 @@ protected String coerceToString(Object value) {
262292
if (value instanceof Enum<?>) {
263293
return ((Enum<?>)value).name();
264294
}
295+
if (value instanceof LambdaExpression lambdaExpression) {
296+
return coerceToString(resolveLambdaExpression(lambdaExpression));
297+
}
265298
return value.toString();
266299
}
267300

301+
protected Object resolveLambdaExpression(LambdaExpression lambdaExpression) {
302+
Object value = lambdaExpression;
303+
while (value instanceof LambdaExpression expression && expression.getFormalParameters().isEmpty()) {
304+
value = expression.invoke();
305+
}
306+
return value;
307+
}
308+
268309
@SuppressWarnings("unchecked")
269310
protected <T extends Enum<T>> T coerceToEnum(Object value, Class<T> type) {
270311
if (value == null || "".equals(value)) {
@@ -280,6 +321,9 @@ protected <T extends Enum<T>> T coerceToEnum(Object value, Class<T> type) {
280321
throw new ELException(LocalMessages.get("error.coerce.value", value, value.getClass(), type), e);
281322
}
282323
}
324+
if (value instanceof LambdaExpression lambdaExpression) {
325+
return coerceToEnum(resolveLambdaExpression(lambdaExpression), type);
326+
}
283327
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), type));
284328
}
285329

@@ -325,59 +369,68 @@ protected <T> T coerceToFunctionalInterface(LambdaExpression lambdaExpression, C
325369
return proxy.get();
326370
}
327371

328-
@SuppressWarnings("unchecked")
329-
protected Object coerceToType(Object value, Class<?> type) {
330-
if (type == null) {
331-
return value;
332-
}
333-
334-
if (value instanceof LambdaExpression lambdaExpression) {
335-
if (LambdaExpression.class == type) {
336-
return lambdaExpression;
337-
}
338-
if (isFunctionalInterface(type)) {
339-
return coerceToFunctionalInterface(lambdaExpression, (Class<?>) type);
340-
}
341-
342-
if (lambdaExpression.getFormalParameters().isEmpty()) {
343-
// If the value is a LambdaExpression without formal parameters we need to resolve its value
344-
value = coerceToType(lambdaExpression.invoke(), type);
345-
}
346-
}
347-
348-
if (Object.class.equals(type)) {
349-
return value;
350-
}
372+
protected Object coerceToPrimitive(Object value, Class<?> type) {
373+
if (type == long.class) {
374+
return coerceToLong(value);
375+
}
376+
if (type == double.class) {
377+
return coerceToDouble(value);
378+
}
379+
if (type == boolean.class) {
380+
return coerceToBoolean(value);
381+
}
382+
if (type == int.class) {
383+
return coerceToInteger(value);
384+
}
385+
if (type == float.class) {
386+
return coerceToFloat(value);
387+
}
388+
if (type == short.class) {
389+
return coerceToShort(value);
390+
}
391+
if (type == byte.class) {
392+
return coerceToByte(value);
393+
}
394+
if (type == char.class) {
395+
return coerceToCharacter(value);
396+
}
351397

398+
throw new ELException(LocalMessages.get("error.coerce.type", value, value.getClass(), type));
399+
}
352400

401+
@SuppressWarnings("unchecked")
402+
protected Object coerceToType(Object value, Class<?> type) {
353403
if (type == String.class) {
354404
return coerceToString(value);
355405
}
356-
if (value == null && !type.isPrimitive()) {
406+
if (type.isPrimitive()) {
407+
return coerceToPrimitive(value, type);
408+
}
409+
if (value == null) {
357410
return null;
358411
}
359-
if (type == Long.class || type == long.class) {
412+
if (type == Long.class) {
360413
return coerceToLong(value);
361414
}
362-
if (type == Double.class || type == double.class) {
415+
if (type == Double.class) {
363416
return coerceToDouble(value);
364417
}
365-
if (type == Boolean.class || type == boolean.class) {
418+
if (type == Boolean.class) {
366419
return coerceToBoolean(value);
367420
}
368-
if (type == Integer.class || type == int.class) {
421+
if (type == Integer.class) {
369422
return coerceToInteger(value);
370423
}
371-
if (type == Float.class || type == float.class) {
424+
if (type == Float.class) {
372425
return coerceToFloat(value);
373426
}
374-
if (type == Short.class || type == short.class) {
427+
if (type == Short.class) {
375428
return coerceToShort(value);
376429
}
377-
if (type == Byte.class || type == byte.class) {
430+
if (type == Byte.class) {
378431
return coerceToByte(value);
379432
}
380-
if (type == Character.class || type == char.class) {
433+
if (type == Character.class) {
381434
return coerceToCharacter(value);
382435
}
383436
if (type == BigDecimal.class) {
@@ -389,9 +442,21 @@ protected Object coerceToType(Object value, Class<?> type) {
389442
if (type.getSuperclass() == Enum.class) {
390443
return coerceToEnum(value, (Class<? extends Enum>)type);
391444
}
445+
if (value instanceof LambdaExpression lambdaExpression) {
446+
if (LambdaExpression.class == type) {
447+
return lambdaExpression;
448+
}
449+
450+
if (isFunctionalInterface(type)) {
451+
return coerceToFunctionalInterface(lambdaExpression, (Class<?>) type);
452+
}
453+
454+
value = resolveLambdaExpression(lambdaExpression);
455+
}
392456
if (value == null || value.getClass() == type || type.isInstance(value)) {
393457
return value;
394458
}
459+
395460
if (value instanceof String) {
396461
return coerceStringToType((String)value, type);
397462
}

0 commit comments

Comments
 (0)