Skip to content

Commit

Permalink
Merge branch 'release/4.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Feb 23, 2024
2 parents 746466f + 39a8dbb commit e7e8226
Show file tree
Hide file tree
Showing 40 changed files with 54 additions and 61 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.2</version>
<version>4.1.3</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion 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.2</version>
<version>4.1.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>

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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</version>
</parent>

<artifactId>polyflow-taskpool-event</artifactId>
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.1.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</version>
</parent>

<artifactId>polyflow-camunda-bpm-taskpool-collector</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class ProcessInstanceEventCollectorService(
deleteReason = processInstance.deleteReason
)
// finish
HistoricProcessInstance.STATE_COMPLETED,
HistoricProcessInstance.STATE_INTERNALLY_TERMINATED ->
FinishProcessInstanceCommand(
sourceReference = processInstance.sourceReference(repositoryService, camundaTaskpoolCollectorProperties.applicationName),
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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</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.2</version>
<version>4.1.3</version>
</parent>

<artifactId>polyflow-variable-serializer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion 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.2</version>
<version>4.1.3</version>
<packaging>pom</packaging>

<name>POM: ${project.artifactId}</name>
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.2</version>
<version>4.1.3</version>
</parent>

<artifactId>polyflow-form-url-resolver</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions 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.2</version>
<version>4.1.3</version>
</parent>

<artifactId>polyflow-view-jpa</artifactId>
Expand Down Expand Up @@ -233,12 +233,12 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>12.6.0.jre11</version>
<version>12.6.1.jre11</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.1</version>
<version>42.7.2</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ 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 @@ -251,18 +252,6 @@ class JpaPolyflowViewTaskService(
)
}


/**
* Legacy handler to support old query.
*/
@Deprecated("Will be removed in future versions", ReplaceWith("query(query: TaskWithDataEntriesForIdQuery): Optional<TaskWithDataEntries>"))
@QueryHandler
fun legacyQuery(query: TaskWithDataEntriesForIdQuery): TaskWithDataEntries? {
logger.warn { "You are using deprecated API, consider to switch to query(TaskWithDataEntriesForIdQuery): Optional<TaskWithDataEntries>" }
return query(query).orElse(null)
}


@QueryHandler
override fun query(query: TaskWithDataEntriesForIdQuery): Optional<TaskWithDataEntries> {
return Optional.ofNullable(taskRepository.findByIdOrNull(query.id)?.let { taskEntity ->
Expand All @@ -274,16 +263,6 @@ class JpaPolyflowViewTaskService(
}


/**
* Legacy handler to support old query.
*/
@Deprecated("Will be removed in future versions", ReplaceWith("query(TaskForIdQuery): Optional<Task>"))
@QueryHandler
fun legacyQuery(query: TaskForIdQuery): Task? {
logger.warn { "You are using deprecated API, consider to switch to query(TaskForIdQuery): Optional<Task>" }
return query(query).orElse(null)
}

@QueryHandler
override fun query(query: TaskForIdQuery): Optional<Task> {
return Optional.ofNullable(taskRepository.findByIdOrNull(query.id)?.toTask(objectMapper))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ interface ProcessDefinitionRepository : CrudRepository<ProcessDefinitionEntity,
processDefinition.get<List<String>>(ProcessDefinitionEntity::authorizedStarterPrincipals.name)
)
}
}) ?: Specification { _, _, _ -> null }
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface ProcessInstanceRepository : CrudRepository<ProcessInstanceEntity, Stri
state
)
}
}) ?: Specification { _, _, _ -> null }
})

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ import io.holunda.polyflow.view.jpa.auth.AuthorizationPrincipal
import io.holunda.polyflow.view.jpa.composeOr
import io.holunda.polyflow.view.jpa.payload.PayloadAttribute
import io.holunda.polyflow.view.jpa.process.SourceReferenceEmbeddable
import jakarta.persistence.Tuple
import jakarta.persistence.criteria.Path
import org.springframework.data.jpa.domain.Specification
import org.springframework.data.jpa.repository.JpaSpecificationExecutor
import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.CrudRepository
import java.time.Instant


/**
* Repository for accessing tasks.
*/
Expand Down Expand Up @@ -52,7 +55,7 @@ interface TaskRepository : CrudRepository<TaskEntity, String>, JpaSpecificationE
task.get<List<String>>(TaskEntity::authorizedPrincipals.name)
)
}
}) ?: Specification { _, _, _ -> null }
})

/**
* Specification for checking the application name.
Expand Down Expand Up @@ -269,6 +272,7 @@ interface TaskRepository : CrudRepository<TaskEntity, String>, JpaSpecificationE

builder.and(pathEquals, valueAnyOf)
}

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package io.holunda.polyflow.view.jpa.task
import com.fasterxml.jackson.databind.ObjectMapper
import io.holunda.camunda.variable.serializer.toJsonPathsWithValues
import io.holunda.camunda.variable.serializer.toPayloadJson
import io.holunda.polyflow.view.jpa.CountByApplication
import io.holunda.polyflow.view.jpa.DbCleaner
import io.holunda.polyflow.view.jpa.auth.AuthorizationPrincipal.Companion.group
import io.holunda.polyflow.view.jpa.auth.AuthorizationPrincipal.Companion.user
Expand All @@ -27,6 +28,7 @@ import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.likeName
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.likeProcessName
import io.holunda.polyflow.view.jpa.task.TaskRepository.Companion.likeTextSearch
import jakarta.persistence.EntityManager
import jakarta.persistence.Tuple
import org.assertj.core.api.Assertions.assertThat
import org.camunda.bpm.engine.variable.Variables.createVariables
import org.junit.jupiter.api.AfterEach
Expand Down Expand Up @@ -245,4 +247,11 @@ class TaskRepositoryITest {
assertThat(result).containsExactlyInAnyOrder(task2)
}

@Test
fun `should count grouped by applications`() {
val count = taskRepository.getCountByApplication()
assertThat(count).hasSize(2)
assertThat(count[0]).isEqualTo(CountByApplication("other-app", 1))
assertThat(count[1]).isEqualTo(CountByApplication("test-application", 1))
}
}
2 changes: 1 addition & 1 deletion view/mongo/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.2</version>
<version>4.1.3</version>
</parent>

<artifactId>polyflow-view-mongo</artifactId>
Expand Down
Loading

0 comments on commit e7e8226

Please sign in to comment.