Email connector

Hello
Can you tell me how to recover initiator’s email ?
Thanks in advance

I’m assuming you mean the user who started the process.

Lets say you wanted the email to be sent from the person who started the process. Step through the connector wizard until you get to the point where you can set the From Address. Now click the edit expression button (little pencil icon) next to the “From” field. Change the expression type to a script. This will allow you to use Bonita API. To get the email of the person who started this process, you could do something like:

Long startedById = apiAccessor.getProcessAPI().getProcessInstance(processInstanceId).getStartedBy(); String emailAddress = apiAccessor.getIdentityAPI().getUserContactData(startedById, true).getEmail(); return emailAddress;

By initiator you mean the user who started the process, not the actor right?