JavaScript extension reference

The reference section is arranged alphabetically.

There are a number of IBM Security Identity Manager specific objects available for use. ISIM uses JavaScript extensions to package JavaScript objects and APIs. An extension can also be a package of other extensions (for example, ModelExtension).

After an extension is defined, it can be registered in the scriptframework.properties file to be used in a specific JavaScript context. Use the Update Property page from the Appliance Dashboard of the IBM Security Identity Manager virtual appliance console. See Manage the server properties. In some cases, an environment needs to be created for an extension.

Table 1 shows these script extensions..

Script Extension Object Name Object Type
AttributesExtension (deprecated) ATTRIBUTES Map
EmailContextExtension EmailContext EmailContext
EnroleExtension Enrole

erro.

Enrole
Error
IdentityPolicyExtension IdentityPolicy IdentityPolicy
LoopCountExtension loopcount int
PersonPlacementRulesExtension entry Map
PostOfficeExtension PostOffice PostOffice
ProvisioningPolicyExtension parameters
reason
Map
int (0: New Account, 1: Existing Account)
AccountModelExtension Account constructor
AccountSearch constructor
Account
AccountSearch
OrganizationModelExtension ContainerSearch constructor ContainerSearch
PersonModelExtension Person constructor
ExtendedPerson constructor
PersonSearch constructor
Person
ExtendedPerson
PersonSearch
RoleModelExtension Role constructor
RoleSearch constructor
Role
RoleSearch
ServiceModelExtension Service constructor
ServiceSearch
Service
ServiceSearch
ReminderExtension reminderCtx Reminder
ServiceExtension service DirectoryObject
SubjectExtension subject Person For Orphan Adoption Rule JavaScript, the subject is a Map, which contains the account attributes returned from reconciliation. The entries in the map are referred by the name of the account attributes, which might vary based on the service type.
WorkflowExtension process
activity
Participant constructor
ParticipantType
$RelevantDataName
Activity
Participant
ParticipantType
ProcessDataProcess


Finding methods and properties for a specific JavaScript object

This example demonstrates how to find methods and properties for a specific JavaScript object.

If we are writing a workflow script, look in the scriptframework.properties file to see which extensions are available. By default, workflow loads the model extensions, the WorkflowExtension, and the LoopCountExtension.

Table 1shows that WorkflowExtension defines scripting objects that include process, activity, a Participant constructor, an object named ParticipantType, and a series of workflow-specific pieces of data.

In another column in the table, notice that the process object is of type Process. Now, locate Process in this reference to see that Process type has a property called name, and a method called getParent().

To understand how to use maps, notice that objects, such as parameters from ProvisioningPolicyExtension, have a type of Map. A Map, also known as a dictionary, is a named JavaScript object that can hold many other objects which can be accessed by name. The parameters object holds another object named uid. To access uid, we can type parameters.uid[0]. (In this case uid is an array, so we must type [0] to get the first element of the array.) The values that a map holds will vary between each map. For more information, locate the specific map in the JavaScript reference.