Can you recover the task's workflow creator in the Notification template
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>
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
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: @{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
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.
Maybe you can try to use the Session object, something like…
${Session.getPrincipal().getName()}
…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.
Thibaud
From my iPad