throw new JbpmException("failed to add " + addresses + " to senders", e);
}
}
Environment environment = Environment.getCurrent();
IdentitySession identitySession = environment.get(IdentitySession.class);
AddressResolver addressResolver = environment.get(AddressResolver.class);
// resolve and tokenize users
String userList = fromTemplate.getUsers();
if (userList != null) {
String[] userIds = tokenizeActors(userList, execution);
List<User> users = identitySession.findUsersById(userIds);
addSenders(resolveAddresses(users, addressResolver), email);
}
// resolve and tokenize groups
String groupList = fromTemplate.getGroups();
if (groupList != null) {
for (String groupId : tokenizeActors(groupList, execution)) {
Group group = identitySession.findGroupById(groupId);
addSenders(addressResolver.resolveAddresses(group), email);
}
}
}