Article
The IDM Job scheduler was introduced with IDM 3.5. The Job scheduler is an IDM utility that allows events to be scheduled. IDM Jobs can be configured and scheduled to disable accounts, to start a workflow, etc. IDM Jobs can be configured using iManager or Designer.
To implement an IDM Job, it is necessary to create the Job, configure its parameters (scope, notifications, etc) and to schedule when it will run. Jobs can be configured to run manually or to run based on a schedule.

In certain circumstances, it might be necessary to start a Job from a Policy. This article explains how to accomplish this via an extension function call using the DXCommand class.
Since there are no specific Actions to start an IDM Job from a Policy, an alternative is to use the DXCommand class to trigger an IDM Job. The DxCommand Class is a command line Java program that supports various DirXML-related instructions.
Documentation
The documentation for the DxCommand Class can be found by clicking the following link:
http://developer.novell.com/documentation/dirxml/d...
The documentation for the DirXML Command Line Utility (DXCMD) can be found by clicking the following link:
http://www.novell.com/documentation/secure_identit...
Sample Code
The following sample code starts an IDM Job from a Policy. The code logic is as follows:
- A variable is defined to invoke the DXCommand class.
- The variable Type must be Object.
- An XPath expression calls the commandLine Method.
- The following line arguments are used: user, password, “startJob” and Job name.
Note: When configuring the Policy’s Namespace definition, make sure Java Extension is selected.
<?xml version="1.0" encoding="UTF-8"?><policy xmlns:jcmd="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.util.DxCommand">
<rule>
<description>Start a Job</description>
<conditions/>
<actions>
<do-set-local-variable name="VarStartJob" scope="policy">
<arg-object>
<token-xpath expression="jcmd:commandLine(" -user admin.corp -password novell -startjob 'IDMJob.Generic Null.DriverSet.services.corp'")"/>
</arg-object>
</do-set-local-variable>
</actions>
</rule>
</policy>
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
User Comments
Hide the password as well
Submitted by geoffc on 7 August 2008 - 6:49am.
You can easily use a Named password to store the Admin.corp password in the example as well.
In fact, Lothar in his Password Notifier driver showed a way to look at who the security equals for the driver is, get that DN, then get the nspmDistributionPassword from that user, store them in a pair of variables, then you could replace the XPATH commmand of:
jcmd:commandLine(" -user admin.corp -password novell -startjob 'IDMJob.Generic Null.DriverSet.services.corp'
With:
jcmd:commandLine(" -user $USERNAME -password $PASSWORD -startjob 'IDMJob.Generic Null.DriverSet.services.corp'
For more fun and games, you could set up a standard named job in each driver, and then use a variable $JOBNAME, that you build by setting it to the string of IDMJob (or whatever your default name is, probably best to have a GCV on the driverset, then use a GCV on the driver if you need to override it with a different value) then the GCV dirxml.auto.driverdn (Though you would probably have to parseDN that GCV into dot notation from backslash, which it defaults too).
Thus you could have a very generic rule, that you could include in your toolkit for any driver, with just setting one GCV value for the IDM Job name.
- Be the first to comment! To leave a comment you need to Login or Register
THis is very useful.
Submitted by anonymous (not verified) on 8 August 2008 - 10:57am.
Thank you for sharing.
- Be the first to comment! To leave a comment you need to Login or Register


2