Can you recover the task's workflow creator in the Notification template


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 ${}. You can consult the document following this link: : <a href=“${docUrl}“>${htmlEscape(docTitle)}</a>

0 votes

2 answers




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")


2 votes

Not using studio and on Nuxeo 5.5.

nodeLastActor is undefined here. Is there another way?


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: @{}

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}.


0 votes

I'm not using a custom chain or anything beside modifying the template with extension "" point="templates" and extension "" point="notifications"

I'm trying to figure out what I can put in my .ftl files so I can inform the person receiving the email who started the workflow.


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.

Maybe you can try to use the Session object, something like…


…should return the login of the current user.. Still, it is not always the one who started the workflow.

Unfortunately, I don't know what was available or not in this version.


From my iPad