Los métodos en _taskContextInformation y _eventContextInformation se proporcionan a través de los objetos de Identity Manager ExposedTaskContextInformation y ExposedEventContextInformation, respectivamente.
Estos objetos heredan métodos en la API de Identity Manager principal. Por consiguiente, los métodos heredados están también disponibles en _taskContextInformation y _eventContextInformation.
Los siguientes métodos heredados del objeto TaskInfo son especialmente útiles para una plantilla de correo electrónico:
Estos objetos recuperados permiten insertar información específica de administradores y tareas en un correo electrónico. Por ejemplo:
<!-- Define the E-mail Properties --->
<%
_cc = "" ;
_bcc = "" ;
_subject = _eventContextInformation.getEventName() +
" Approval Request";
%>
<!--- Start of Body --->
<html>
<body text="Navy">
Se ha agregado el siguiente elemento a la lista de trabajos para la aprobación: <br>
<br>
User <b><%= _eventContextInformation.getAdministrator().
getAttribute(Packages.com.netegrity.llsdk6.imsapi.
managedobject.User.PROPERTY_FRIENDLY_NAME)%> </b>
from department <b><%= _eventContextInformation.
getAdministrator().getOrg(null).getFriendlyName()
%></b> initiated task <b><%= _eventContextInformation.
getAdminTask().getFriendlyName() %></b>at <b><%= _eventContextInformation.getSessionCreateTime() %></b>
<br><br>
<font color="green">Details: </font><b><%=_eventContextInformation.
getEventName()%></b><br>
<font color="green"><%=_eventContextInformation.
getPrimaryObjectTypeName()%>:</font>
<b><%=_eventContextInformation.getPrimaryObjectName()%></b>
was modified
<br>
<font color="green">Updated Attributes:</font>
<table border="1">
<tr>
<td><b>Name</b></td>
<td><b>Value</b></td>
</tr>
<%
var event = _eventContextInformation.getEvent();
if(event instanceof Packages.com.netegrity.imapi.UserEvent) {
var user = event.getUser();
var attributes = user.getAttributes().keys();
while(attributes.hasMoreElements()) {
var attr = attributes.nextElement();
var value = user.getAttribute(attr);
if(user.hasAttributeChanged(attr)) {
template.add("<tr><td>" + attr +"</td>");
template.add("<td>" + value +"</td></tr>");
}
}
}
%>
</table>
<br>
</body>
</html>
Posible cuerpo de correo electrónico:

Para obtener más información sobre los métodos heredados que están disponibles para la API de plantilla de correo electrónico, consulte los objetos ExposedTaskContextInformation y ExposedEventContextInformation en Javadoc de Identity Manager.
|
Copyright © 2015 CA Technologies.
Todos los derechos reservados.
|
|