Skip to content

Commit

Permalink
Merge branch 'release/4.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Jun 12, 2024
2 parents 49ee895 + 31fd472 commit 5f08e5c
Show file tree
Hide file tree
Showing 59 changed files with 2,369 additions and 75 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>4.1.5</version>
<version>4.1.6</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
6 changes: 3 additions & 3 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.1.5</version>
<version>4.1.6</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>3.1.5</springboot.version>
<springboot.version>3.2.6</springboot.version>
<camunda-commons-typed-values.version>7.21.0</camunda-commons-typed-values.version>

<axon-bom.version>4.9.4</axon-bom.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.6.1</version>
<version>3.7.0</version>
</plugin>

<plugin>
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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</version>
</parent>

<artifactId>polyflow-taskpool-event</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions docs/reference-guide/components/view-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ Following operations are supported:
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.

!!! info
When filtering in the Task API, only the queries that include Data Entries (`AllTasksWithDataEntriesQuery`, `TasksWithDataEntriesForGroupQuery`, `TasksWithDataEntriesForUserQuery`)
support filtering on the attributes or payload of correlated data entries. Filters on Data Entry attributes or payload are ignored in queries that do not include Data Entries
(`AllTasksQuery`, `TasksForGroupQuery`, `TasksForUserQuery`, `TasksForCandidateUserAndGroupQuery`).

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.

Expand Down
12 changes: 11 additions & 1 deletion docs/reference-guide/components/view-jpa.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,17 @@ The JPA View uses several tables to store the results. These are:
* `PLF_TASK_AUTHORIZATIONS`: table for authorization information of user tasks
* `PLF_TASK_CORRELATIONS`: table for user task correlation information
* `PLF_TASK_PAYLOAD_ATTRIBUTES`: table for user task attribute search index
* `PLF_VIEW_TASK_AND_DATA_ENTRY_PAYLOAD`: view for convenient taskWithDataEntry queries execution
* `TRACKING_TOKEN`: table for Axon Tracking Tokens

If you are interested in DDLs for the view, feel free to generate one using the following call of Apache Maven
`mvn -Pgenerate-sql -f view/jpa`. Currently, DDLs for the databases H2, MSSQL and PostgreSQL are generated into `target/` directory.
`mvn -Pgenerate-sql -f view/jpa`. Currently, DDLs for the databases H2, MSSQL and PostgreSQL are generated into `target/` directory.
The DDL for the `PLF_VIEW_TASK_AND_DATA_ENTRY_PAYLOAD` cannot be auto-generated, therefore you need to use the following statement to create it:
```
create view PLF_VIEW_TASK_AND_DATA_ENTRY_PAYLOAD as
((select pc.TASK_ID, dea.PATH, dea.VALUE
from PLF_TASK_CORRELATIONS pc
join PLF_DATA_ENTRY_PAYLOAD_ATTRIBUTES dea on pc.ENTRY_ID = dea.ENTRY_ID and pc.ENTRY_TYPE = dea.ENTRY_TYPE)
union
select * from PLF_TASK_PAYLOAD_ATTRIBUTES);
```
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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</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.1.5</version>
<version>4.1.6</version>
</parent>

<artifactId>polyflow-variable-serializer</artifactId>
Expand Down
4 changes: 2 additions & 2 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>4.1.5</version>
<version>4.1.6</version>
<packaging>pom</packaging>

<name>POM: ${project.artifactId}</name>
Expand Down Expand Up @@ -78,7 +78,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<executions>
<execution>
<id>enforce-maven</id>
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>4.1.5</version>
<version>4.1.6</version>
</parent>

<artifactId>polyflow-form-url-resolver</artifactId>
Expand Down
7 changes: 6 additions & 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>4.1.5</version>
<version>4.1.6</version>
</parent>

<artifactId>polyflow-view-jpa</artifactId>
Expand Down Expand Up @@ -48,6 +48,11 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import io.holunda.polyflow.view.jpa.task.toTask
import io.holunda.polyflow.view.jpa.update.updateTaskQuery
import io.holunda.polyflow.view.query.PageableSortableQuery
import io.holunda.polyflow.view.query.task.*
import io.holunda.polyflow.view.task
import mu.KLogging
import org.axonframework.config.ProcessingGroup
import org.axonframework.eventhandling.EventHandler
Expand Down Expand Up @@ -55,8 +54,7 @@ class JpaPolyflowViewTaskService(
override fun query(query: TasksWithDataEntriesForUserQuery): TasksWithDataEntriesQueryResult {
val authorizedPrincipals: Set<AuthorizationPrincipal> = setOf(user(query.user.username)).plus(query.user.groups.map { group(it) })
val criteria = toCriteria(query.filters)
val taskSpecification = criteria.toTaskSpecification()
val dataEntrySpecification = criteria.toDataEntrySpecification()
val taskSpecification = criteria.toTaskWithDataEntriesSpecification()
val sort = query.apply {
sanitizeSort(Task::class)
}.mapTaskSort()
Expand All @@ -80,8 +78,7 @@ class JpaPolyflowViewTaskService(
task = taskEntity.toTask(objectMapper),
dataEntries = taskEntity.correlations.map { id ->
dataEntryRepository.findAll(
dataEntrySpecification
.and(DataEntryRepository.isAuthorizedFor(authorizedPrincipals))
DataEntryRepository.isAuthorizedFor(authorizedPrincipals)
.and(DataEntryRepository.hasEntryId(id.entryId))
.and(DataEntryRepository.hasEntryType(id.entryType))
)
Expand All @@ -105,8 +102,7 @@ class JpaPolyflowViewTaskService(
)
val dataAuthorizationSpecification = DataEntryRepository.isAuthorizedFor(authorizedPrincipals)
val criteria = toCriteria(query.filters)
val taskSpecification = criteria.toTaskSpecification()
val dataEntrySpecification = criteria.toDataEntrySpecification()
val taskSpecification = criteria.toTaskWithDataEntriesSpecification()
val sort = query.apply {
sanitizeSort(Task::class)
}.mapTaskSort()
Expand All @@ -118,8 +114,7 @@ class JpaPolyflowViewTaskService(
task = taskEntity.toTask(objectMapper),
dataEntries = taskEntity.correlations.map { id ->
dataEntryRepository.findAll(
dataEntrySpecification
.and(dataAuthorizationSpecification)
dataAuthorizationSpecification
.and(DataEntryRepository.hasEntryId(id.entryId))
.and(DataEntryRepository.hasEntryType(id.entryType))
)
Expand All @@ -135,8 +130,7 @@ class JpaPolyflowViewTaskService(

override fun query(query: AllTasksWithDataEntriesQuery): TasksWithDataEntriesQueryResult {
val criteria = toCriteria(query.filters)
val taskSpecification = criteria.toTaskSpecification()
val dataEntrySpecification = criteria.toDataEntrySpecification()
val taskSpecification = criteria.toTaskWithDataEntriesSpecification()
val sort = query.apply {
sanitizeSort(Task::class)
}.mapTaskSort()
Expand All @@ -147,8 +141,7 @@ class JpaPolyflowViewTaskService(
task = taskEntity.toTask(objectMapper),
dataEntries = taskEntity.correlations.map { id ->
dataEntryRepository.findAll(
dataEntrySpecification
.and(DataEntryRepository.hasEntryId(id.entryId))
DataEntryRepository.hasEntryId(id.entryId)
.and(DataEntryRepository.hasEntryType(id.entryType))
)
}.flatten().map { it.toDataEntry(objectMapper) }
Expand Down Expand Up @@ -313,7 +306,7 @@ class JpaPolyflowViewTaskService(
emitTaskUpdate(updated)

}.ifPresent { entity ->
logger.warn { "Will not create task '${event.id}' because it already exists in the database"}
logger.warn { "Will not create task '${event.id}' because it already exists in the database" }
emitTaskUpdate(entity)
}
}
Expand Down Expand Up @@ -428,7 +421,7 @@ class JpaPolyflowViewTaskService(
taskRepository
.findById(event.id)
.ifEmpty {
logger.warn { "Cannot update task '${event.id}' because it does not exist in the database"}
logger.warn { "Cannot update task '${event.id}' because it does not exist in the database" }
}.ifPresent { entity ->
when (event.assignmentUpdateType) {
CamundaTaskEventType.CANDIDATE_GROUP_ADD -> entity.authorizedPrincipals.add(group(event.groupId).toString())
Expand Down
Loading

0 comments on commit 5f08e5c

Please sign in to comment.