Author: andreapatricelli Date: Tue May 20 09:43:31 2014 New Revision: 1596167
URL: http://svn.apache.org/r1596167 Log: [SYNCOPE-447] improved information sent to NotificationManager in AbstractTaskJob to create task (cumulative) notification, improved optin template to reflect task execution if present Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java?rev=1596167&r1=1596166&r2=1596167&view=diff ============================================================================== --- syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java (original) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java Tue May 20 09:43:31 2014 @@ -141,12 +141,12 @@ public abstract class AbstractTaskJob im notificationManager.createTasks( AuditElements.EventCategoryType.TASK, - task.getClass().getSimpleName(), + this.getClass().getSimpleName(), null, - null, // searching for before object is too much expensive ... + this.getClass().getSimpleName(), // searching for before object is too much expensive ... result, task, - (Object[]) null); + execution); auditManager.audit( AuditElements.EventCategoryType.TASK, Modified: syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm?rev=1596167&r1=1596166&r2=1596167&view=diff ============================================================================== --- syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm (original) +++ syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm Tue May 20 09:43:31 2014 @@ -35,7 +35,7 @@ under the License. #end </ul> -becase one of the following events occurred: +because one of the following events occurred: <ul> #foreach($event in $events) <li>$event</i> @@ -51,5 +51,23 @@ You have been provided with the followin #end </ul> #end + +#if(${output.class.simpleName} == "TaskExec") +Below you can read execution details of task $output.getTask().getClass().getSimpleName(), id $output.getId(). +Task Details: +<ul> +<li> +START DATE: $output.getStartDate() +</li> +<li> +MESSAGE:<br/> +$output.getMessage() +</li> +<li> +END DATE: $output.getEndDate() +</li> +</ul> +#end + </body> </html> Modified: syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm?rev=1596167&r1=1596166&r2=1596167&view=diff ============================================================================== --- syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm (original) +++ syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm Tue May 20 09:43:31 2014 @@ -20,7 +20,7 @@ This message was sent to the following r * $recipient.getAttrMap().get("surname").getValues().get(0) #end -becase one of the following events occurred: +because one of the following events occurred: #foreach($event in $events) * $event #end @@ -31,3 +31,16 @@ You have been provided with the followin * $membership.roleName #end #end + +#if(${output.class.simpleName} == "TaskExec") +Below you can read execution details of task $output.getTask().getClass().getSimpleName(), id $output.getId() + +Task Details: + + * START DATE: $output.getStartDate() + + * MESSAGE: +$output.getMessage() + + * END DATE: $output.getEndDate() +#end
