Exemple #1
0
        public bool CompleteExecuting(EmailTemplateUserTask userTask, Func <object[], bool> callBase,
                                      params object[] parameters)
        {
            var activity = parameters[0] as Activity;

            if (activity == null)
            {
                return(false);
            }
            userTask.OwnerId = activity.OwnerId;
            IEnumerable <string> activityConnections = GetActivityConnections();

            foreach (string activityConnection in activityConnections)
            {
                SetParameterByActivity(userTask, activity, activityConnection);
            }
            ProcessUserTaskUtilities.SetEntityColumnValues(userTask, activity);
            userTask.ActivityResult      = activity.ResultId;
            userTask.IsActivityCompleted = true;
            bool result = callBase(parameters);

            activity.SetColumnValue("ProcessElementId", null);
            activity.UseAdminRights = false;
            activity.Save();
            return(result);
        }
Exemple #2
0
        private void FillActivityConnections(Activity activity, EmailTemplateUserTask userTask)
        {
            IEnumerable <string> activityConnections = GetActivityConnections();

            foreach (string activityConnection in activityConnections)
            {
                object propertyValue = userTask.GetPropertyValue(activityConnection);
                ProcessUserTaskUtilities.SetEntityColumnValue(activity, activityConnection, propertyValue);
            }
            ProcessUserTaskUtilities.SetEntityColumnValues(userTask, activity);
        }