This is an automated email from the ASF dual-hosted git repository.
mmoayyed 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 e1c2adf allow flowable suspend to set user suspension (#158)
e1c2adf is described below
commit e1c2adfd5fd40c9b5fa3180b4dc9f79b6601b9b4
Author: Misagh Moayyed <[email protected]>
AuthorDate: Thu Jan 16 13:27:54 2020 +0400
allow flowable suspend to set user suspension (#158)
---
.../src/main/java/org/apache/syncope/core/flowable/task/Suspend.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/task/Suspend.java
b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/task/Suspend.java
index 0a6a85a..399e7dc 100644
---
a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/task/Suspend.java
+++
b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/task/Suspend.java
@@ -18,6 +18,8 @@
*/
package org.apache.syncope.core.flowable.task;
+import org.apache.syncope.core.flowable.impl.FlowableRuntimeUtils;
+import org.apache.syncope.core.persistence.api.entity.user.User;
import org.flowable.engine.delegate.DelegateExecution;
import org.springframework.stereotype.Component;
@@ -26,5 +28,7 @@ public class Suspend extends FlowableServiceTask {
@Override
protected void doExecute(final DelegateExecution execution) {
+ User user = execution.getVariable(FlowableRuntimeUtils.USER,
User.class);
+ user.setSuspended(true);
}
}