Sun IDM 8.1:Using the Identity Manager IDE

 

Intro

* IDM IDE is used to:
– CRUD configuration and generic objects, forms, workflows, rules, email templates, and rule libraries
– Download/upload objects to repository
– Debug forms, rules, and workflows
– Create projects that are associated with specific repositories

Download and Install IDE

* Download IDE from here. E.g. IDM 8.1 GA
* Install downloaded plugin into Netbeans using Tools > Plugins > Downloaded > Add Plugins…

IDM projects

* An IDM Project is tied to one and only one specific repository
* Each IDE project is tied to a specific IDM version which is provided in the compatibility bundle

Identity Manager Project

* Fully featured dev environment including:
– a sample CBE (Configuration Build Environment)
– can manage Java code and JSPs
– interact with NetBeans embedded app server so you can deploy idm.war file locally
– integrated Java, JSP, workflow, form and XPRESS debugging
– embedded database repository
* Compatibility bundle is included in idm.war
* Upgrade project to a newer version:
– Shutdown NetBeans
– Manually upgrade all your objects, custom JSPs, and the contents of your project’s idm-staging directory
– replace the existing nbproject/ide-bundle.zip with that from the version to which you are upgrading.

Create IDM Project

idm81_ide_createProj_1
idm81_ide_createProj_2
idm81_ide_createProj_3

* Create embedded repository: creates an embedded repository for the default sandbox CBE target (based on hsql DB Server @ jdbc:hsqldb:hsql://127.0.0.1:54881/idm)
– Initialize repository: imports init.xml file from idm.war. Do not enable this if you want to reuse a repository from another project
– Automatically Publish Identity Manager Objects: publish every time you Run or Debug project

idm81_ide_createProj_4_embeddedRepo

* Manually setup repository:
– copy jdbc jar file, e.g. mysql-connector-java-5.1.6-bin.jar, into project’s custom/WEB-INF/lib directory
– right click project name and select IDM > Run LH Command
– enter setup into LH Command field and then click OK
* Setup repository, e.g. using MySQL:
– welcome screeen:

idm81_ide_createProj_6_runLH

– db connection:

idm81_ide_createProj_6_runLH_mysql

– setup demo user:

idm81_ide_createProj_6_runLH_demo

– smtp setting:

idm81_ide_createProj_6_runLH_SMTP

– apply configuration:

idm81_ide_createProj_6_runLH_execute

– done:

idm81_ide_createProj_6_runLH_done

Set Current CBE Target

* Right click IDM project and select Properties
* Set IDM Instance: IDM Properties > IDM Instance > Current CBE Target

idm81_ide_setIDMInst_1

Manage Embedded Repository

* IdM > Repository > Manage Embedded Repository

idm81_ide_mngEmbedRepo_1

Identity Manager Project (Remote)

* Used to make small modifications and to perform debugging on an external server
– no build environment
– cannot launch idm.war file
* Compatibility bundle location:
Identity Manager install root/sample/ide-bundle.zip

Working with Repository Objects

Supported Object Types

* Configuration object: a persistent object that contains forms and workflow processes.
* Email templates: templates used to send notification of varioius changes and actions to user and administrators.
* Form: an object associated with a web page that contains rules about how a browser should display user view attributes on that page. Form can contain business logic.
* Generic object: An object typically used to represent views, such as simple collections of name/value pairs. Generic objects have an Extension of type Object.
* Library: An object used to organize closely related objects, typically rules, into a single object in the repository. Organizing objects into libraries makes it easier for workflow and form designers to identity useful objects.
* MetaView: In Identity Manager, a meta view is a unified view of all resources, providing a common data model in which to view a set of resources and how attributes on these resources flow from one to another.
* Rule: Objects in the Identity Manager repository that contain functions written in the XPRESS, XML Object, or JavaScript languages. Within Identity Manager, rules store frequently used logic or static variables for reuse in forms, workflows, and roles.
* Workflow Process: A workflow is a logical, repeatable process during which documents, information, or tasks are passed from one participant to another. Identity Manager workflows comprise multiple processes that control user accounts, such as account creation, update, enabling, disabling, and deletion.
* Workflow Subprocess: An object used to create a workflow subprocess to be included in a workflow.

* Check out view

Getting objects from repository

* Right click Custom Identity Manager Objects, select IDM and then appropriate actions:

idm81_ide_IDM-popupMenu

– Download Object(s)
– Open object

idm81_ide_openObject_1

– Open object reference

idm81_ide_openObjectReference_1
idm81_ide_openObjectReference_2
idm81_ide_openObjectReference_3

– Reload object(s)
– Upload object(s)

Removing Object IDs

* Used to move objects from one repository to another
* Identity Manager IDE locates and removes all object IDs and objectRef IDs that conform to a specified expression — without removing any hard-coded, predefined IDs.

Automatically Upload Objects to Repository

* Only available for embedded repository: IDM > Manage Embedded Repository > Automatically Publish Identity Manager Objects

idm81_ide_IDM-autoPublish

Using CBE Pattern Substitution

* Used when uploading objects to an embedded or external instance
* Enabled by Properties > IDM Properties > Miscellaneous > Apply Pattern Substitution

idm81_ide_IDM-patternSub

* Pattern substitutions are defined in target-name.properties, which is defined in build.xml and defaults to IDM project root directory.
* For example, sandbox-target.properties:

#Target Properties
#Fri Nov 03 10:00:07 CST 2006
%%IDM_URL%%=http\://localhost\:9191/idm
%%TARGET_NAME%%=sandbox
%%NOTIFICATION_REDIRECT%%=
%%TABLESPACE%%=abc_sandbox
%%SMTP_HOST%%=mail.xyzcompany.com
%%DEFAULT_FROM_ADDRESS%%=admin@xyzcompany.com
%%LOG_DIR%%=C\:/temp
%%CUSTOM_SERVER_REPOSITORY%%=nbproject/private/sandbox-ServerRepository.xml

Create New Objects

* File > New File… > Sun Identity Manager Objects

idm81_ide_IDM-createNewObj_1

Edit Object Properties

* Expression builder dialog?
* Add elements to an object

Delete Objects

Diff Objects

Working with XML

IDE Debugger

* Start debugger: Proj > IDM > Attach Identity Manager Debugger
* Set breakpoints: click left margin of the source editor, immediately adjacent to the tag where you want to add a breakpoint.
* Using watches
* Step through:
– F7: step into
– F8: step over
– Ctr-F7: step out

Debugging Forms

* Launch form tester: from form xml source, right click form element and select Test Form
* To avoid login every time you test a form, Set System Configuration > allowInterAppAuthentication to true

Test Rules

* Setup Rule Tester input values: from rule xml source, right click rule element and select Test Rule… (note the …). Enter input test values:

idm81_ide_IDM-testRule_1_input

* Launch Rule Tester: from rule xml source, right click rule element and select Test Rule
* Start IDM Debugger: Run > Debug Main Project
* Set a breakpoint for the rule
* Launch Rule Tester to test together with debugging.

Debugging Workflows

Tutorial

Import debugger-tutorial.xml

* Login IDM as configurator
* Select Configure > Import Exchange File
* Browse to C:\prog\apache-tomcat-6.0.41\webapps\idm\sample\debugger-tutorial.xml

idm81_ide_IDM-tutorial_prepare_1

* Click Import

idm81_ide_IDM-tutorial_prepare_2

Start Debugging

* From IDE, download objects:
– debugger-tutorial-workflow1
– debugger-tutorial-workflow2
* Restart Tomcat
* Launch IDE Debugger: Run > Debug Main Project

Example 1: Debugging a Workflow and a Rule

* Open debugger-tutorial-workflow1.xml object
* Set breakpoint at the start of the workflow to the right of WFProcess
* Login IDM, select Server Tasks > Run Tasks
* Click debugger-tutorial-workflow1

Example 2: Debugging a Workflow Containing a Manual Action and a Form

* Open debugger-tutorial-workflow2.xml object
* Set breakpoint at the start of the workflow to the right of WFProcess
* Login IDM, select Server Tasks > Run Tasks
* Click debugger-tutorial-workflow2

Example 3: Debugging the Tabbed User Form and Refresh View

* Create a new XPRESS breakpoint:

idm81_ide_IDM-tutorial_breakpoint_refreshView_1

* From IDM create a new user: Accounts > New User
* Enter first name and last name
* Click a different tab to trigger a refresh view operation

Debugging Java and XPRESS

* Create Java classs:

package testpackage;
 
public class TestClass {
 
    public static String concat(String s1, String s2) {
        return s1 + s2;
    }
}

* Create TestRule.xml:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC 'waveset.dtd' 'waveset.dtd'>
<Rule id='#ID#Rule:TestRule' name='TestRule'>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
    <invoke class='testpackage.TestClass' name='concat'>
        <s>myprefix.</s>
        <ref>arg2</ref>
    </invoke> 
</Rule>

* Clean, rebuild
* Test Rule

References

* Using the Identity Manager IDE
* Identity Manager IDE Wiki
* DENTITYMANAGERIDE Downloads
* Sun Java[TM] System Identity Manager 7.0 Deployment Tools

This entry was posted in SunIDM and tagged , . Bookmark the permalink.

2 Responses to Sun IDM 8.1:Using the Identity Manager IDE

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.