Skip to main content

Novell IdM 3.6 : Creating custom Subscriber PostProcessor Java extension for Delimited Text Driver Part 1

I had chance to write a custom PostProcessor extension for a Delimited Text Driver for Novell Identity Manager, 

"the PostProcessor extension should execute the code under another Windows Domain User account. So I decided to run the driver with Remote Loader Configuration, running the DirXML windows Service under another Windows Domain User Account."

Software and settings in my setup:

* Novell Designer 3.0.1 (build  Jan 5, 2009)
* Novell Identity Manager 3.6 / Windows Server 2003 R2
* Novell iManager 2.7.2
* Delimited Text Driver 3.6 ver 2.0 (imported configuration  file from Designer 3.0.1)
* And the Delimited Text Driver was going to run on the remote server (Remote Loader), 
* Java IDE was  (IntelliJIDEA)


i started first with digging into documentation of the driver, and i came a cross this section:

Using Java Interfaces to Customize File Processing:


so in my case i was about to wite a Subscriber PostProcessor extension for my use.

so to complete the process,  i performed following tasks:
  • Create a Java class that implements one of the new interfaces
  • Create a Java .jar file that contains your new class, and deploy it
  • Configure the driver to use the new class

Create a Java class that implements one of the new interfaces:

Writing interface requires you to understand little UML about the interface, so i got to read javaDoc for the delimited text driver, which i found on the Installation media of the Novell Identity Manager 3.6  ..delimited\delimitedtext\javadocs\api docs\index.htm

Class Diagram









While creating your custom class, your class has to implement the interface in package com.novell.nds.dirxml.driver.delimitedtext.PostProcessor, which extends the interface Extension.

Methods that interface PostProcessor requires  to be implement by your class are:

void nextOutputFile(java.io.File outputFile) 
void init(java.lang.String parameterString, Tracer tracer)   (inherited from the interface Extension).

to implement these abstract methods , you need to import some libs into  your java project.

import com.novell.nds.dirxml.driver.delimitedtext.PostProcessor;
import com.novell.nds.dirxml.driver.delimitedtext.StatusException;
import com.novell.nds.dirxml.driver.delimitedtext.Tracer;
import java.io.*;


you will find these imports in JAR "DelimitedTextUtil.jar", in my case  "C:\Novell\RemoteLoader\lib" on the server where i have installed the Remote Loader software and the Delimited Driver shim.

implementation foot print of methods in my class:

public void nextOutputFile(java.io.File outputFile)
  {
  // TODO:  do something with the notified outputFile the driver just created in the output directory.
}


public void init(String paramsHere, Tracer paramHereTracer)
    throws StatusException, Exception
  {
//TODO:  if you want to initialize your classe with some  paramters from the driver, then you need to implement this method. In my case it was not required!

}


Create a Java .jar file that contains your new class, and deploy it

I had to package my class into a JAR file ( excluding external libs).  and copied that .JAR file to the remote server where the Remote Loader was running:  into the path  "C:\Novell\RemoteLoader\lib"


Configure the driver to use the new class


the pre-configured .XML file does not come up with the configuration paramters, so you have to define them on your driver.  Click the Driver, Under the Driver Configuration Tab, goto the  Driver Paramter Section, and click the "Edit Xml".

Find the section name 

subscriber-options
configuration-values
definitions

under these definations add following two definations: ( please mind you have define them as other definations are defined, im writing here just names and values here in another format)

 name="post-processor" type="string"  value= mypackage.CustomPostProcessor
 name="post-processor-params" type="string" value=



so, Finally close the Configuration tab and try to Start the Driver, it should start without any problems and will do the stuff which you expect from your class to do.


Few things which help:

* Before deploying your class, test it localy in the IDE with the scenarios you want to acheive.
* Deploy and run the IdM Delimited Driver with Local setup first, Which in turns can give you good debugging info about your class in DSTrace view.
* After testing the class, you can deploy your code on the remote server, with remote loder configuration.

Debugging remote requires  attaching java Debuger into Remote Loader JVM. which can be little tricky, if you are not familar attaching java debugger already. so its good to run the driver Local first if you want to see if your class hooks with driver configuration.


Comments

Popular posts from this blog

Experience writing a Java based DirXML Driver

Based on the customer project, I wrote a DirXML driver which provision users through Novell Identity Manager 3.5.1 to their company intranet portal ( A Plone System). The portal exposed the RESTful API interfaces. So I started looking first at the Novell SOAP driver to see if it fit our needs. But while reading the driver documentation i felt it required too much XSLT knowledge + more customization and testing on the driver. And again it used the Apache HttpClient, Which is more a HttpClient rather then it targets to any specific protocol implementation. So If you could build SOAP messages at your own so it would help you in transporting these message back and forth between IDM and Application. The Novell SOAP driver comes up with two built in configurations "SPML and DSML", but in my case none of them were suitable. I had always wished to write my own DirXML driver at my own, so I thought why not just take this opportunity to fulfill my wish and at the same time get s...

NetIQ IDM - Adding operation-data to subscriber command transformaiton custom commands

Recently i had to execute EOL cmdlets using psexecute though new NetIQ azure ad driver, since this operation is fire and forget in nature, i would like to track whole request and response for my own generated commands from subscriber command transofrmaiton policy, so i solved it by following policy: < do-set-dest-attr-value direct = "true" name = "psexecute" > < arg-association > < token-resolve datastore = "src" > < arg-dn > < token-text xml:space = "preserve" > {userref} </ token-text > </ arg-dn > </ token-resolve > </ arg-association > < arg-value type = "string" > < token-local-variable name = "cmdlet" /> </ arg-value > </ do-set-dest-attr-value > < do-append-xml-element expression = "../modify[@direct]" na...