Skip to content

Commit

Permalink
Merge branch 'release/3.14.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Jul 21, 2023
2 parents df2f6ad + 41ee0ef commit ba346f8
Show file tree
Hide file tree
Showing 39 changed files with 184 additions and 53 deletions.
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>3.14.1</version>
<version>3.14.2</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 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>3.14.1</version>
<version>3.14.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -18,7 +18,7 @@
<url>https://github.com/holunda-io/camunda-bpm-taskpool/</url>

<properties>
<springboot.version>2.7.12</springboot.version>
<springboot.version>2.7.13</springboot.version>
<camunda-commons-typed-values.version>7.18.0</camunda-commons-typed-values.version>

<axon-bom.version>4.6.6</axon-bom.version>
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>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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 @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-datapool-parent</artifactId>
<version>3.14.1</version>
<version>3.14.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 @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-datapool-parent</artifactId>
<version>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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 @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.14.1</version>
<version>3.14.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 @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.2</version>
</parent>

<artifactId>polyflow-taskpool-event</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/project-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You can generate this by executing the following build command:
### Build Documentation

We are using MkDocs for generation of a static site documentation and rely on Markdown as much as possible.
MkDocs is a written in Python 3 and needs to be installed on your machine. For the installation please run the following
MkDocs is written in Python 3 and needs to be installed on your machine. For the installation please run the following
command from your command line:

```bash
Expand Down
23 changes: 16 additions & 7 deletions docs/reference-guide/components/view-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ An optional `sort` parameter allows to sort the results by a field attribute. Th
* java.util.Date
* java.time.Instant

To filter the results, you might supply a list of filters. A filter is an expression in format `fieldName<op>value`, where `fieldName` is addressing the attribute of the search result,
To filter the results, you can supply a list of filters. A filter is an expression in format `fieldName<op>value`, where `fieldName` is addressing the attribute of the search result,
`<op>` is one of `<`, `=`, `%` and `>` and `value` is a string representation of the values. The `fieldName` can point to an attribute of the result entity itself (`Task`, `TaskWithDataEntries`
or `DataEntry`) or point to the attribute inside the payload. To avoid a possible name clash, you must prefix the field name with `task.` if you want to filter on direct attributes of a task,
or `DataEntry`) or point to the attribute inside the payload. To avoid name clashes, you must prefix the field name with `task` if you want to filter on direct attributes of a task,
and you must prefix the field name with `data` if you want to filter on direct attributes of a data entry. For example, `task.priority=50` would deliver tasks with priority set to 50,
and `data.entryType=info.polyflow.Order` will deliver data entries of type `info.polyflow.Order` only.

Expand All @@ -125,12 +125,21 @@ 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` | `entryId`, `entryType`, `type`, payload, `processingState`, `userStatus` | all, payload | all, payload |
| `=` | Equals | all, payload | payload, `businessKey`, `followUpDate`, `dueDate`, `priority` | `entryId`, `entryType`, `type`, payload, `processingState`, `userStatus` | all, payload | all, payload |
| `%` | Like | all, payload | `businessKey`, `name`, `description`, `processName`, `textSearch` | none | none | none |

!!! info
There are several special reserved filters which can be passed to the task query: `task.processName=<value>` check equality of the process name, `task.processName%<value>` makes a like-search on
process name, `task.textSearch%some-substring` makes a special OR-combined like-search on task name, task description and task process name.
There are several special reserved filters which can be passed to the task query: `task.processName=<value>` checks equality of the process name, `task.processName%<value>` makes a like-search on
process name, `task.textSearch%some-substring` makes a special OR-combined like-search on task name, task description and task process name.

If the field name has no prefix of above, it is considered as an attribute inside the payload of data entry or enriched variables of a user task. For example, imagine
you have a data entry with payload attributes `{ "attribute": "value", "another": 45 }`. In order to search for those, just specify `attribute=value` in your filter criteria.
If the field name does not have one of the above prefixes, it is considered as an attribute inside the payload of data entry or enriched variables of a user task. For example, imagine
you have a data entry with payload attributes `{ "attribute": "value", "another": 45 }`. In order to search for those, just specify `attribute=value` in your filter criteria.

Filters are composed with logical AND, meaning that all given filters have to match in order for a task to be included in the result of the query. For example, given the filters
`task.priority=50` and `foo=bar`, the query result would only contain tasks that have a priority of 50 **and** a payload attribute named foo with the value bar.

!!! warning
The [JPA View](view-jpa.md) has a different implementation when applying filters. Filters that target the same attribute are OR-composed before being AND-composed
with filters that target other attributes. For example, given the filters `customerName=ABC`, `customerName=DEF` and `task.priority=50`, the filters for the
customer name would first get OR-composed before being AND-composed with the task priority filter, resulting in a filtering expression logically equivalent to
`(customerName=ABC OR customerName=DEF) AND task.priority=50`.
2 changes: 1 addition & 1 deletion docs/reference-guide/components/view-jpa.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pageId: view-jpa
### Purpose

The JPA View is component responsible for creating read-projections of tasks and business data entries. It currently implements
Datapool View API and Taskpool API and persists the projection as entities and relations in a RDBMS using JPA. It is a useful
Datapool View API and Taskpool API and persists the projection as entities and relations in a RDBMS using JPA. It is useful
if the JPA persistence is already used in the project setup.

### Features
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 @@ -4,7 +4,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>3.14.1</version>
<version>3.14.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 @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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 @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>3.14.1</version>
<version>3.14.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 @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.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>3.14.1</version>
<version>3.14.2</version>
</parent>

<artifactId>polyflow-variable-serializer</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-root</artifactId>
<version>3.14.1</version>
<version>3.14.2</version>
<packaging>pom</packaging>

<name>POM: ${project.artifactId}</name>
Expand All @@ -20,7 +20,7 @@
<version.java>${java.version}</version.java>
<version.java>${java.version}</version.java>

<kotlin.version>1.8.22</kotlin.version>
<kotlin.version>1.9.0</kotlin.version>
<kotlin.compiler.jvmTarget>${java.version}</kotlin.compiler.jvmTarget>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
<kotlin-logging.version>3.0.5</kotlin-logging.version>
Expand All @@ -41,7 +41,7 @@
<!-- cleaning -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.1</version>
</plugin>
<!-- gitflow -->
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion view/form-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-view-parent</artifactId>
<version>3.14.1</version>
<version>3.14.2</version>
</parent>

<artifactId>polyflow-form-url-resolver</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion view/jpa/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-view-parent</artifactId>
<version>3.14.1</version>
<version>3.14.2</version>
</parent>

<artifactId>polyflow-view-jpa</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.hasDueDateBefo
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.hasFollowUpDate
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.hasFollowUpDateAfter
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.hasFollowUpDateBefore
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.hasPriority
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.hasProcessName
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.hasTaskPayloadAttribute
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.likeBusinessKey
Expand Down Expand Up @@ -124,32 +125,48 @@ fun PageableSortableQuery.mapTaskSort(): String {
* Specification for query on task attributes.
*/
internal fun List<Criterion>.toTaskAttributeSpecification(): Specification<TaskEntity>? {
val relevant = this.filterIsInstance<Criterion.TaskCriterion>().map { it.toTaskSpecification() }
return composeAnd(relevant)
val relevant = this.filterIsInstance<Criterion.TaskCriterion>()
// compose criteria with same name with OR and criteria with different names with AND
val relevantByName = relevant.groupBy { it.name }
val orComposedByName = relevantByName.map { (_, criteria) -> composeOr(criteria.map { it.toTaskSpecification() }) }

return composeAnd(orComposedByName)
}

/**
* Specification for query on data entry attributes.
*/
internal fun List<Criterion>.toDataEntryAttributeSpecification(): Specification<DataEntryEntity>? {
val relevant = this.filterIsInstance<Criterion.DataEntryCriterion>().map { it.toDataEntrySpecification() }
return composeAnd(relevant)
val relevant = this.filterIsInstance<Criterion.DataEntryCriterion>()
// compose criteria with same name with OR and criteria with different names with AND
val relevantByName = relevant.groupBy { it.name }
val orComposedByName = relevantByName.map { (_, criteria) -> composeOr(criteria.map { it.toDataEntrySpecification() }) }

return composeAnd(orComposedByName)
}

/**
* Specification on payload.
*/
internal fun List<Criterion>.toDataEntryPayloadSpecification(): Specification<DataEntryEntity>? {
val relevant = this.filterIsInstance<Criterion.PayloadEntryCriterion>().map { it.toDataEntrySpecification() }
return composeAnd(relevant)
val relevant = this.filterIsInstance<Criterion.PayloadEntryCriterion>()
// compose criteria with same name with OR and criteria with different names with AND
val relevantByName = relevant.groupBy { it.name }
val orComposedByName = relevantByName.map { (_, criteria) -> composeOr(criteria.map { it.toDataEntrySpecification() }) }

return composeAnd(orComposedByName)
}

/**
* Specification on payload.
*/
internal fun List<Criterion>.toTaskPayloadSpecification(): Specification<TaskEntity>? {
val relevant = this.filterIsInstance<Criterion.PayloadEntryCriterion>().map { it.toTaskSpecification() }
return composeAnd(relevant)
val relevant = this.filterIsInstance<Criterion.PayloadEntryCriterion>()
// compose criteria with same name with OR and criteria with different names with AND
val relevantByName = relevant.groupBy { it.name }
val orComposedByName = relevantByName.map { (_, criteria) -> composeOr(criteria.map { it.toTaskSpecification() }) }

return composeAnd(orComposedByName)
}


Expand All @@ -164,6 +181,7 @@ internal fun Criterion.TaskCriterion.toTaskSpecification(): Specification<TaskEn
Task::businessKey.name -> hasBusinessKey(this.value)
Task::dueDate.name -> hasDueDate(Instant.parse(this.value))
Task::followUpDate.name -> hasFollowUpDate(Instant.parse(this.value))
Task::priority.name -> hasPriority(this.value.toInt())
else -> throw IllegalArgumentException("JPA View found unsupported task attribute for equals comparison: ${this.name}.")
}
}
Expand Down
Loading

0 comments on commit ba346f8

Please sign in to comment.