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 2019/01/16 07:11:56 UTC

[syncope] branch 2_1_X updated (1cc5b53 -> 7616b9e)

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a change to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git.


    from 1cc5b53  Upgrading Flowable
     new 3c5f712  Upgrading Bootstrap
     new 7616b9e  Small cleanup after Flowable upgrade

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../syncope/core/flowable/impl/FlowableRuntimeUtils.java   | 14 +++-----------
 .../core/flowable/impl/FlowableUserRequestHandler.java     | 14 +++++++-------
 .../core/flowable/impl/FlowableUserWorkflowAdapter.java    |  5 ++---
 pom.xml                                                    |  2 +-
 4 files changed, 13 insertions(+), 22 deletions(-)


[syncope] 02/02: Small cleanup after Flowable upgrade

Posted by il...@apache.org.
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

commit 7616b9ef8326c676ea2e522669ecc4a342b94e7b
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Wed Jan 16 08:11:23 2019 +0100

    Small cleanup after Flowable upgrade
---
 .../syncope/core/flowable/impl/FlowableRuntimeUtils.java   | 14 +++-----------
 .../core/flowable/impl/FlowableUserRequestHandler.java     | 14 +++++++-------
 .../core/flowable/impl/FlowableUserWorkflowAdapter.java    |  5 ++---
 3 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableRuntimeUtils.java b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableRuntimeUtils.java
index c46b728..e88e25f 100644
--- a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableRuntimeUtils.java
+++ b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableRuntimeUtils.java
@@ -36,7 +36,6 @@ import org.flowable.engine.history.HistoricActivityInstance;
 import org.flowable.engine.repository.ProcessDefinition;
 import org.flowable.engine.runtime.ProcessInstance;
 import org.flowable.task.api.Task;
-import org.flowable.task.api.TaskQuery;
 import org.identityconnectors.common.security.EncryptorFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -129,7 +128,7 @@ public final class FlowableRuntimeUtils {
     }
 
     public static void updateStatus(final DomainProcessEngine engine, final String procInstId, final User user) {
-        List<Task> tasks = createTaskQuery(engine, false).processInstanceId(procInstId).list();
+        List<Task> tasks = engine.getTaskService().createTaskQuery().processInstanceId(procInstId).list();
         if (tasks.isEmpty() || tasks.size() > 1) {
             LOG.warn("While setting user status: unexpected task number ({})", tasks.size());
         } else {
@@ -137,18 +136,11 @@ public final class FlowableRuntimeUtils {
         }
     }
 
-    public static TaskQuery createTaskQuery(final DomainProcessEngine engine, final boolean onlyFormTasks) {
-        TaskQuery taskQuery = engine.getTaskService().createTaskQuery();
-        if (onlyFormTasks) {
-            taskQuery.taskWithFormKey();
-        }
-        return taskQuery;
-    }
-
     public static String getFormTask(final DomainProcessEngine engine, final String procInstId) {
         String result = null;
 
-        List<Task> tasks = createTaskQuery(engine, true).processInstanceId(procInstId).list();
+        List<Task> tasks = engine.getTaskService().createTaskQuery().
+                taskWithFormKey().processInstanceId(procInstId).list();
         if (tasks.isEmpty() || tasks.size() > 1) {
             LOG.debug("While checking if form task: unexpected task number ({})", tasks.size());
         } else {
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 1f539fb..22bd357 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
@@ -128,7 +128,7 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
         userRequest.setStartTime(procInst.getStartTime());
         userRequest.setUsername(userDAO.find(split.getRight()).getUsername());
         userRequest.setExecutionId(procInst.getId());
-        userRequest.setActivityId(FlowableRuntimeUtils.createTaskQuery(engine, false).
+        userRequest.setActivityId(engine.getTaskService().createTaskQuery().
                 processInstanceId(procInst.getProcessInstanceId()).singleResult().getTaskDefinitionKey());
         return userRequest;
     }
@@ -461,7 +461,7 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
 
         Pair<Integer, List<UserRequestForm>> forms;
 
-        TaskQuery query = FlowableRuntimeUtils.createTaskQuery(engine, true);
+        TaskQuery query = engine.getTaskService().createTaskQuery().taskWithFormKey();
         if (userKey != null) {
             query.processInstanceBusinessKeyLike(FlowableRuntimeUtils.getProcBusinessKey("%", userKey));
         }
@@ -539,7 +539,7 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
     protected Pair<Task, TaskFormData> parseTask(final String taskId) {
         Task task;
         try {
-            task = FlowableRuntimeUtils.createTaskQuery(engine, true).taskId(taskId).singleResult();
+            task = engine.getTaskService().createTaskQuery().taskWithFormKey().taskId(taskId).singleResult();
             if (task == null) {
                 throw new FlowableException("NULL result");
             }
@@ -563,8 +563,8 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
 
         String authUser = AuthContextUtils.getUsername();
         if (!adminUser.equals(authUser)) {
-            List<Task> tasksForUser = FlowableRuntimeUtils.createTaskQuery(engine, true).
-                    taskId(taskId).taskCandidateOrAssigned(authUser).list();
+            List<Task> tasksForUser = engine.getTaskService().createTaskQuery().
+                    taskWithFormKey().taskId(taskId).taskCandidateOrAssigned(authUser).list();
             if (tasksForUser.isEmpty()) {
                 throw new WorkflowException(
                         new IllegalArgumentException(authUser + " is not candidate nor assignee of task " + taskId));
@@ -586,7 +586,7 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
         Task task;
         try {
             engine.getTaskService().claim(taskId, authUser);
-            task = FlowableRuntimeUtils.createTaskQuery(engine, true).taskId(taskId).singleResult();
+            task = engine.getTaskService().createTaskQuery().taskWithFormKey().taskId(taskId).singleResult();
         } catch (FlowableException e) {
             throw new WorkflowException("While reading task " + taskId, e);
         }
@@ -601,7 +601,7 @@ public class FlowableUserRequestHandler implements UserRequestHandler {
         Task task;
         try {
             engine.getTaskService().unclaim(taskId);
-            task = FlowableRuntimeUtils.createTaskQuery(engine, true).taskId(taskId).singleResult();
+            task = engine.getTaskService().createTaskQuery().taskWithFormKey().taskId(taskId).singleResult();
         } catch (FlowableException e) {
             throw new WorkflowException("While unclaiming task " + taskId, e);
         }
diff --git a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserWorkflowAdapter.java b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserWorkflowAdapter.java
index 24e765d..e5734eb 100644
--- a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserWorkflowAdapter.java
+++ b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserWorkflowAdapter.java
@@ -173,7 +173,7 @@ public class FlowableUserWorkflowAdapter extends AbstractUserWorkflowAdapter imp
             variables.putAll(moreVariables);
         }
 
-        List<Task> tasks = FlowableRuntimeUtils.createTaskQuery(engine, false).processInstanceId(procInstID).list();
+        List<Task> tasks = engine.getTaskService().createTaskQuery().processInstanceId(procInstID).list();
         String task = null;
         if (tasks.size() == 1) {
             try {
@@ -461,8 +461,7 @@ public class FlowableUserWorkflowAdapter extends AbstractUserWorkflowAdapter imp
 
         List<String> availableTasks = new ArrayList<>();
         try {
-            Task currentTask = FlowableRuntimeUtils.createTaskQuery(engine, false).
-                    processInstanceId(procInstID).singleResult();
+            Task currentTask = engine.getTaskService().createTaskQuery().processInstanceId(procInstID).singleResult();
 
             Process process = engine.getRepositoryService().
                     getBpmnModel(FlowableRuntimeUtils.getLatestProcDefByKey(


[syncope] 01/02: Upgrading Bootstrap

Posted by il...@apache.org.
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

commit 3c5f712c43b55f1760d5ce45aef9cfce94651f4e
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Wed Jan 16 07:49:20 2019 +0100

    Upgrading Bootstrap
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index dafadd0..93dcbc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -449,7 +449,7 @@ under the License.
     <jquery-slimscroll.version>1.3.8</jquery-slimscroll.version>
     <jquery-cookie.version>1.4.1-1</jquery-cookie.version>
     
-    <bootstrap.version>3.3.7</bootstrap.version>
+    <bootstrap.version>3.4.0</bootstrap.version>
     <bootstrap-select.version>1.12.4</bootstrap-select.version>
     <bootstrap-fileinput.version>4.4.8</bootstrap-fileinput.version>
     <bootbox.version>4.4.0</bootbox.version>