03-20-2013 06:09 PM
Hi,
Is there a way/variable to recover who is assigning you a task when creating a workflow, so as to write it in the notification email?
For example:
A task on the document ${htmlEscape(docTitle)} was assigned to you or to a group you belong to by ${someVariableNameForTaskCreator.name}. You can consult the document following this link: : <a href="${docUrl}">${htmlEscape(docTitle)}</a>
03-21-2013 01:14 PM
Hi,
Looks like you could use nodeLastActor (cf. rhz help section when you are in the Studio and in a template):
${nodeLastActor} => gives the login (for example "john") ${Fn.getPrincipal(workflowInitiator) .firstName} ${Fn.getPrincipal(workflowInitiator) .lastName} => Give first/last name (for example "John Doe")
Thibaud
03-22-2013 10:04 AM
Not using studio and on Nuxeo 5.5.
03-22-2013 12:36 PM
Ah ok.
You then probably can use a context variable that you set to the current user in the chain before using in your mail:
[…previous actions…]
Execution Context > Set Context Variable
name: theCurrentUser
value: @{CurrentUser.name}
Notification Send E-Mail
[…next actions…]
In your eMail, you can then use the theCurrentUser variable filled with the login. So, you can get first/last name if you prefer:
[...]
A task [...] assigned to you by ${Fn.getPrincipal(theCurrentUser).firstName} ${Fn.getPrincipal(theCurrentUser).lastName}.
[...]
Thibaud
03-22-2013 05:21 PM
I'm not using a custom chain or anything beside modifying the template with extension "org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="templates" and extension "org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="notifications"
03-22-2013 07:24 PM
Ah. Actually, There was no easy way - unless I missed something in the original question - to detect in the question that it was about version 5.5, without using a chain or the Studio.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.