You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2021/08/31 11:23:21 UTC
[syncope] branch 2_1_X updated: Upgrading Flowable
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/2_1_X by this push:
new a881397 Upgrading Flowable
a881397 is described below
commit a8813972c9962ed2475f5e63c8ab61b0feb447eb
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Tue Aug 31 12:50:43 2021 +0200
Upgrading Flowable
---
.../core/flowable/impl/FlowableUserRequestHandler.java | 11 ++++++-----
.../core/flowable/support/DomainProcessEngineFactoryBean.java | 4 ++--
pom.xml | 2 +-
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java
index 0925eb2..6fb4860 100644
--- a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java
+++ b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java
@@ -475,7 +475,7 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
return adminUser.equals(authUser)
? getForm(getTask(taskId))
- : getForm(query.taskCandidateOrAssigned(authUser).singleResult());
+ : getForm(query.or().taskCandidateUser(authUser).taskAssignee(authUser).endOr().singleResult());
}
@Transactional(readOnly = true)
@@ -484,7 +484,7 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
final String userKey,
final int page,
final int size,
- final List<OrderByClause> orderByClauses) {
+ final List<OrderByClause> ob) {
TaskQuery query = engine.getTaskService().createTaskQuery().taskWithFormKey();
if (userKey != null) {
@@ -493,8 +493,8 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
String authUser = AuthContextUtils.getUsername();
return adminUser.equals(authUser)
- ? getForms(query, page, size, orderByClauses)
- : getForms(query.taskCandidateOrAssigned(authUser), page, size, orderByClauses);
+ ? getForms(query, page, size, ob)
+ : getForms(query.or().taskCandidateUser(authUser).taskAssignee(authUser).endOr(), page, size, ob);
}
protected Pair<Integer, List<UserRequestForm>> getForms(
@@ -582,7 +582,8 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
String authUser = AuthContextUtils.getUsername();
if (!adminUser.equals(authUser)) {
List<Task> tasksForUser = engine.getTaskService().createTaskQuery().
- taskWithFormKey().taskId(taskId).taskCandidateOrAssigned(authUser).list();
+ taskWithFormKey().taskId(taskId).
+ or().taskCandidateUser(authUser).taskAssignee(authUser).endOr().list();
if (tasksForUser.isEmpty()) {
throw new WorkflowException(
new IllegalArgumentException(authUser + " is not candidate nor assignee of task " + taskId));
diff --git a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/support/DomainProcessEngineFactoryBean.java b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/support/DomainProcessEngineFactoryBean.java
index 689320a..4b7f1d2 100644
--- a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/support/DomainProcessEngineFactoryBean.java
+++ b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/support/DomainProcessEngineFactoryBean.java
@@ -25,9 +25,9 @@ import javax.sql.DataSource;
import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.ProcessEngine;
import org.flowable.common.engine.impl.cfg.SpringBeanFactoryProxyMap;
+import org.flowable.engine.impl.el.ProcessExpressionManager;
import org.flowable.engine.impl.util.EngineServiceUtil;
import org.flowable.idm.spring.SpringIdmEngineConfiguration;
-import org.flowable.spring.SpringExpressionManager;
import org.flowable.spring.SpringProcessEngineConfiguration;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.DisposableBean;
@@ -75,7 +75,7 @@ public class DomainProcessEngineFactoryBean
conf.setBeans(new SpringBeanFactoryProxyMap(ctx));
}
if (conf.getExpressionManager() == null) {
- conf.setExpressionManager(new SpringExpressionManager(ctx, conf.getBeans()));
+ conf.setExpressionManager(new ProcessExpressionManager(conf.getBeans()));
}
if (EngineServiceUtil.getIdmEngineConfiguration(conf) == null) {
SpringIdmEngineConfiguration spiec = ctx.getBean(SpringIdmEngineConfiguration.class);
diff --git a/pom.xml b/pom.xml
index 430533f..dd97d8e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -424,7 +424,7 @@ under the License.
<groovy.version>3.0.8</groovy.version>
- <flowable.version>6.6.0</flowable.version>
+ <flowable.version>6.7.0</flowable.version>
<camel.version>2.25.4</camel.version>