ITIM : how to add participants in a mail notification

Recently we add a need to notify by mail domain administrators, on a service which was located on our top organization, where persons belongs to sub-domains.

Therefore, the participant type DOMAIN_ADMIN is not relevant, because it is based on the service "container".

I had to develop a custom javascript to handle this task. It is quite simple :

// Script used to retrieve domain administrators
// Adapt to use the relevant data for Person (could be person, owner, etc)
var subject = Entity.get();
var sitecode = subject.getProperty('parent')[0];
//DEBUG var values='';
var myParticipants = new Array();
var admin = sitecode.getProperty('eradministrator');
for (var i=0;i<admin.length;i++) {
//DEBUG  values=values+":"+admin[i];
  myParticipants[i] = new Participant(ParticipantType.USER, admin[i]);
}
// for Debug only
//DEBUG activity.auditEvent('Properties for eradministrator : ' + values);

// myParticipants is an Array with adminstrators DN
return myParticipants;

Lines which are prefixed by DEBUG are only there to show information in the activity log.

The eradministrator property is already a DN, so there is no need to search for another property.

Catégorie