Previous Topic: utilNext Topic: taskContextInformation


eventContextInformation

Contains information about the event generated by the current task, such as event name and approval status. This information is called context information for the event.

The _eventContextInformation object is created from the ExposedEventContextInformation class in package com.netegrity.imapi.

This object is available for email messages based on Approved, Pending, and Rejected templates. For information about these templates, see Email Templates.

Methods: All the following methods return a String.

Method

Description

getAdminName()

Returns the name of the person who submitted the task that generated the event.

Deprecated in CA IdentityMinder 5.6. Use one of the following inherited methods:

  • getAdministrator()
  • getAdminFriendlyName()

getApprovalStatus()

Returns the approval status of the event. One of these values:

APPROVAL_STATUS_APPROVED
APPROVAL_STATUS_REJECTED

getApprovalTime()

Returns the time the event was approved.

getEventName()

Returns the name of the event.

For a list of event names, see CA IdentityMinder Events.

getOrgName()

Returns the friendly name of the organization where the task is being executed.

Deprecated in CA IdentityMinder 5.6. Use the inherited method getObjectOrganizationFriendlyName().

getPassword()

If the primary objects is type USER, returns the user’s password.

getPrimaryObjectTypeName()

Returns the type of primary object.

Primary object types returned:

ACCESSROLE
ACCESSTASK
ADMINROLE
ADMINTASK
GROUP
ORGANIZATION
USER

getPrimaryObjectName()

Returns the name of the primary object affected by the event.

A primary object is the object directly affected by the event. A secondary object is the object that the primary object is bound to, if any.

For example:

  • The primary object type for CreateUserEvent is USER. The secondary object is the object where the user is created--that is, ORGANIZATION.
  • The primary object type for CreateAdminRoleEvent is ADMINROLE. This object is not bound to other objects, so no secondary object exists.

With a primary object of type USER, getPrimaryObjectName() might return John Jones.

getSecondaryObjectTypeName()

If a secondary object was affected by the event, returns the object type.

Secondary object types returned:

ACCESSROLE
ACCESSTASK
ADMINROLE
ADMINTASK
GROUP
ORGANIZATION
USER

getSecondaryObjectName()

If a secondary object was affected by the event, returns the object name.

See getPrimaryObjectName() for information about primary and secondary objects.

With a secondary object of type ORGANIZATION, the method getSecondaryObjectName() might return HR.

Note: The methods in _eventContextInformation are provided through the interface ExposedEventContextInformation. Since ExposedEventContextInformation inherits methods in the core CA IdentityMinder API, _eventContextInformation can also call these methods from an email template, along with the methods in the above table. For more information about these inherited methods, see Additional Methods.

Example--Email notification about a Pending event:

<% 
_cc = "" ;
_bcc = ""; 
_subject = _eventContextInformation.getEventName() +
                                             " Approval Request";
%>
<!--- Start of Body --->
<html>
<body text="Navy">

The following item has been added to your work list for approval:
<br><br><br>
Event: <b><%=_eventContextInformation.getEventName()%></b> <br>
<%=_eventContextInformation.getPrimaryObjectTypeName()%>:
<b><%=_eventContextInformation.getPrimaryObjectName()%></b><br>
In <%=_eventContextInformation.getSecondaryObjectTypeName()%>: 
<b><%=_eventContextInformation.getSecondaryObjectName()%></b><br>
</body>
</html>

Possible email body:

From: lsmith@security.com [mailto:lsmith@security.com] 
To: vimperioso@security.com
Subject: CreateUserEvent Approval Request

The following item has been added to your work list for approval:

Event: CreateUserEvent
USER: Richard Ferrigamo
In ORGANIZATION: Mortgages & Loans

Note: The value of the From field is derived from the email.properties file. To change the value, edit the following file:

<iam_im.ear>\config\com\netegrity\config\email.properties

where <iam_im.ear> is the installed location of CA IdentityMinder in the application server domain--for example:

For WebLogic:

<WebLogic_home>\user_projects\<domain>\applications\iam_im.ear

For JBoss:

<Identity Manager_home>\jboss-3.2.2\server\default\deploy\iam_im.ear

For WebSphere:

<im_admin_tools_dir >\WebSphere-ear\iam_im.ear

To add additional information about the user affected by the event to the email in the previous example, add text that resembles the following:

<% user = _eventContextInformation.getEvent().getUser(); %>
<b>User information:</b><br>
Last Name: <b><%=user.getAttribute("%LAST_NAME%")%></b><br>   
First Name: <b><%=user.getAttribute("%FIRST_NAME%")%></b><br>
Full Name: <b><%=user.getAttribute("%FULL_NAME%")%></b><br>
Email: <b><%=user.getAttribute("%EMAIL%")%></b><br>
Organization Membership: <b><%=user.getAttribute("%ORG_MEMBERSHIP%")%></b><br>

Possible email body:

From: lsmith@security.com [mailto:lsmith@security.com] 
To: vimperioso@security.com
Subject: CreateUserEvent Approval Request

The following item has been added to your work list for approval:

Event: CreateUserEvent
USER: Richard Ferrigamo
In ORGANIZATION: Mortgages & Loans
User information:
Last Name: Ferrigamo
First Name: Richard
Full Name: Richard Ferrigamo
Email: rferrigamo@mybank.org
Organization Membership: Mortgages & Loans