syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/3] syncope git commit: [SYNCOPE-602] Adding workflow variable for form submitter
Date Fri, 07 Nov 2014 08:54:21 GMT
[SYNCOPE-602] Adding workflow variable for form submitter


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/da760280
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/da760280
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/da760280

Branch: refs/heads/master
Commit: da760280e76f71d415b40df6ce1e73ae4cf5a456
Parents: 972f5db
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Nov 7 09:53:56 2014 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Nov 7 09:53:56 2014 +0100

----------------------------------------------------------------------
 .../core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/da760280/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
b/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
index 4f0d876..2587706 100644
--- a/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
+++ b/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
@@ -105,6 +105,8 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
 
     public static final String WF_EXECUTOR = "wfExecutor";
 
+    public static final String FORM_SUBMITTER = "formSubmitter";
+
     public static final String USER_TO = "userTO";
 
     public static final String ENABLED = "enabled";
@@ -814,6 +816,8 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         Set<String> preTasks = getPerformedTasks(user);
         try {
             formService.submitTaskFormData(form.getTaskId(), form.getPropertiesForSubmit());
+            runtimeService.setVariable(
+                    user.getWorkflowId(), FORM_SUBMITTER, EntitlementUtil.getAuthenticatedUsername());
         } catch (ActivitiException e) {
             throwException(e, "While submitting form for task " + form.getTaskId());
         }


Mime
View raw message