Skip to content

Commit

Permalink
Merge branch 'release/4.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Oct 10, 2024
2 parents 73da1a9 + e4be6cc commit 695feb5
Show file tree
Hide file tree
Showing 50 changed files with 243 additions and 81 deletions.
21 changes: 13 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "Type: dependencies"

- package-ecosystem: maven
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 19
labels:
- "Type: dependencies"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "Type: dependencies"
4 changes: 2 additions & 2 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
Expand All @@ -58,6 +58,6 @@ jobs:

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion bom/datapool-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
12 changes: 6 additions & 6 deletions bom/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-root</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -21,7 +21,7 @@
<springboot.version>3.2.6</springboot.version>
<camunda-commons-typed-values.version>7.21.0</camunda-commons-typed-values.version>

<axon-bom.version>4.10.0</axon-bom.version>
<axon-bom.version>4.10.2</axon-bom.version>
<axon-kotlin.version>4.10.0</axon-kotlin.version>
<axon-gateway-extension.version>2.1.0</axon-gateway-extension.version>

Expand Down Expand Up @@ -435,7 +435,7 @@
<!-- for loading and unpacking artifacts -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.0</version>
</plugin>

<plugin>
Expand Down Expand Up @@ -519,7 +519,7 @@

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.1</version>
<version>3.5.1</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<runOrder>random</runOrder>
Expand All @@ -540,7 +540,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.3.1</version>
<version>3.5.1</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -620,7 +620,7 @@
<!-- Install -->
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.2</version>
<version>3.1.3</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
2 changes: 1 addition & 1 deletion bom/taskpool-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/bus-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/datapool/datapool-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-datapool-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-datapool-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/datapool/datapool-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-datapool-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-datapool-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/datapool/datapool-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-datapool-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-datapool-event</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/datapool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/spring-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/taskpool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/taskpool/taskpool-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-taskpool-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-taskpool-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/taskpool/taskpool-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-taskpool-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-taskpool-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/taskpool/taskpool-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-taskpool-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-taskpool-event</artifactId>
Expand Down
1 change: 1 addition & 0 deletions docs/reference-guide/components/view-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Following operations are supported:
| `<` | Less than | all, payload | `followUpDate`, `dueDate` | none | all, payload | all, payload |
| `>` | Greater than | all, payload | `followUpDate`, `dueDate` | none | all, payload | all, payload |
| `=` | Equals | all, payload | payload, `businessKey`, `followUpDate`, `dueDate`, `priority` | `entryId`, `entryType`, `type`, payload, `processingState`, `userStatus` | all, payload | all, payload |
| `[]` | Between | comparable | `followUpDate`, `dueDate` | none | none | none |
| `%` | Like | all, payload | `businessKey`, `name`, `description`, `processName`, `textSearch` | none | none | none |

!!! info
Expand Down
5 changes: 5 additions & 0 deletions docs/reference-guide/components/view-jpa.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ In addition, the `stored-items` property is holding a set of items to be persist
stored items are: `task`, `data-entry`, `process-instance` and `process-definition`. By setting this property, you can disable
storage of items not required by your application and save space consumption of your database. The property defaults to `data-entry`.

With the `payload-attribute-column-length` property one can specify a maximum length for payload attribute values if they are strings. Values that exceed
this length will automatically be trimmed to the max length in order to prevent exceptions when handling the event. This is especially necessary because
relational databases have limits on the length of composite primary keys. Since the combination of (id, path, value) for tasks or (id, type, path, value) for
data entries must be unique, the primary key is very large, which limits the amount of space available for the value.

The `include-correlated-data-entries-in-data-entry-queries` flag controls whether a data entry query (`DataEntriesForUserQuery` or `DataEntriesQuery`) considers
the payload of correlated data entries. The data entry attributes (such as `entry_type`, `state.state`, ...) of correlated data entries are not considered.
*Note:* Only one level of correlation depth is considered here and there is no option yet to change the depth.
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/engine-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-camunda-bpm-engine-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/springboot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-camunda-bpm-springboot-autoconfigure</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/springboot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-camunda-bpm-springboot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/taskpool-collector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-camunda-bpm-taskpool-collector</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/taskpool-job-sender/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-camunda-bpm-taskpool-job-sender</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/common/datapool-sender/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-datapool-sender</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion integration/common/tasklist-url-resolver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-tasklist-url-resolver</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/common/taskpool-sender/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-taskpool-sender</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/common/variable-serializer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>4.2.1</version>
<version>4.2.2</version>
</parent>

<artifactId>polyflow-variable-serializer</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,18 @@ typealias JsonPathFilterFunction = (path: String) -> Boolean
* @param limit limit of levels to convert. Defaults to -1 meaning there is no limit.
* @param filters filter object to identify properties to include into the result.
*/
fun VariableMap.toJsonPathsWithValues(limit: Int = -1, filters: List<Pair<JsonPathFilterFunction, FilterType>> = emptyList()): Set<Pair<String, Any>> {
fun VariableMap.toJsonPathsWithValues(limit: Int = -1, filters: List<Pair<JsonPathFilterFunction, FilterType>> = emptyList(), valueLengthLimit: Int? = null): Set<Pair<String, Any>> {
return this.entries
.map { it.toPair() }
.map { it.toJsonPathWithValue(prefix = "", limit = limit, filter = filters) }
.map { it.toJsonPathWithValue(prefix = "", limit = limit, filter = filters, valueLengthLimit) }
.flatten().toSet()
}

internal fun Pair<String, Any?>.toJsonPathWithValue(
prefix: String = "",
limit: Int = -1,
filter: List<Pair<JsonPathFilterFunction, FilterType>>
filter: List<Pair<JsonPathFilterFunction, FilterType>>,
valueLengthLimit: Int?
): List<Pair<String, Any>> {
// level limit check
val currentLevel = prefix.count { ".".contains(it) }
Expand All @@ -72,9 +73,15 @@ internal fun Pair<String, Any?>.toJsonPathWithValue(
"$prefix.${this.first}"
}

val value = this.second
var value = this.second
return if (value != null && value.isPrimitiveType()) {

// trim strings to the value length limit if provided
if(valueLengthLimit != null && value is String && value.length > valueLengthLimit) {
// TODO: logging
value = value.substring(0 until valueLengthLimit)
}

// check the filters
if (!filter.filter { (_, type) -> type == FilterType.EXCLUDE }.all { (filter, _) ->
filter.invoke(key).not()
Expand All @@ -91,10 +98,10 @@ internal fun Pair<String, Any?>.toJsonPathWithValue(
@Suppress("UNCHECKED_CAST")
(value as Map<String, Any?>).entries
.map { it.toPair() }
.map { it.toJsonPathWithValue(key, limit, filter) }
.map { it.toJsonPathWithValue(key, limit, filter, valueLengthLimit) }
.flatten()
} else if (value is List<*>) {
value.map { (key to it).toJsonPathWithValue(prefix, limit, filter) }.flatten()
value.map { (key to it).toJsonPathWithValue(prefix, limit, filter, valueLengthLimit) }.flatten()
} else {
// ignore complex objects, in default scenarios, complex objects got already deserialized by the sender in ProjectingCommandAccumulator.serializePayloadIfNeeded
listOf()
Expand All @@ -104,7 +111,7 @@ internal fun Pair<String, Any?>.toJsonPathWithValue(
internal fun Any.isPrimitiveType(): Boolean {
return when (this) {
// TODO: ask Jackson for the supported list of types
is String, is Boolean, is Number, is Int, is Long, is Float, is Date, is Instant -> true
is String, is Boolean, is Number, is Date, is Instant -> true
else -> false
}
}
Expand Down
Loading

0 comments on commit 695feb5

Please sign in to comment.