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.
The documentation for the DxCommand Class can be found by clicking the following link:
The documentation for the DirXML Command Line Utility (DXCMD) can be found by clicking the following link:
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">
<description>Start a Job</description>
<do-set-local-variable name="VarStartJob" scope="policy">
<token-xpath expression="jcmd:commandLine(" -user admin.corp -password novell -startjob 'IDMJob.Generic Null.DriverSet.services.corp'")"/>
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.