Overview#

This is a rule from David Gersic using the workorder Driver in IDM 3.5 placed on the Publisher Command Transform. The HR driver takes "employee status == terminated" and changes it to a "account disabled". This rule, then, takes the disable and schedules it to be deleted.

Shows a DirXML Example and XPATH Example for working with Delete users In 150 Days. Delete users In 150 Days:

 <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC "policy-builder-dtd" "C:\Program Files\Novell\Designer\plugins\com.novell.idm.policybuilder_3.0.1.200907020449\DTD\dirxmlscript3.6.dtd"><policy xmlns:jSystem="http://www.novell.com/nxsl/java/java.lang.System" xmlns:jdate="http://www.novell.com/nxsl/java/java.util.Date" xmlns:jformat="http://www.novell.com/nxsl/java/java.text.SimpleDateFormat" xmlns:jtimezone="http://www.novell.com/nxsl/java/java.util.TimeZone">
	<rule>
		<description>Schedule Account Delete for Inactive Employees - Today +150 Days</description>
		<conditions>
			<and>
				<if-op-attr name="Login Disabled" op="changing-to">TRUE</if-op-attr>
			</and>
		</conditions>
		<actions>
			<do-set-local-variable name="order-dest-dn">
				<arg-string>
					<token-dest-dn/>
				</arg-string>
			</do-set-local-variable>
			<do-set-local-variable name="wo-dest-dn" scope="policy">
				<arg-string>
					<token-text xml:space="preserve">NIU\IDM\WorkOrder</token-text>
					<token-text xml:space="preserve">\Scheduled Delete - </token-text>
					<token-attr name="CN"/>
					<token-text xml:space="preserve"> - </token-text>
					<token-xpath expression="jformat:format(jformat:new('MM/dd/yyyy'),jdate:new())"/>
				</arg-string>
			</do-set-local-variable>
			<do-add-dest-object class-name="DirXML-WorkOrder" when="after">
				<arg-dn>
					<token-local-variable name="wo-dest-dn"/>
				</arg-dn>
			</do-add-dest-object>
			<do-add-dest-attr-value class-name="DirXML-WorkOrder" name="DirXML-nwoContent" when="after">
				<arg-dn>
					<token-local-variable name="wo-dest-dn"/>
				</arg-dn>
				<arg-value type="string">
					<token-local-variable name="order-dest-dn"/>
				</arg-value>
			</do-add-dest-attr-value>
			<do-add-dest-attr-value class-name="DirXML-WorkOrder" name="DirXML-DueDate" when="after">
				<arg-dn>
					<token-local-variable name="wo-dest-dn"/>
				</arg-dn>
				<arg-value type="string">
					<token-xpath expression="round(jdate:getTime(jdate:new()) div 1000)+12960000"/>
				</arg-value>
			</do-add-dest-attr-value>
			<do-add-dest-attr-value class-name="DirXML-WorkOrder" name="DirXML-nwoStatus" when="after">
				<arg-dn>
					<token-local-variable name="wo-dest-dn"/>
				</arg-dn>
				<arg-value type="string">
					<token-text xml:space="preserve">pending</token-text>
				</arg-value>
			</do-add-dest-attr-value>
			<do-add-dest-attr-value class-name="DirXML-WorkOrder" name="DirXML-nwoDeleteDueDate" when="after">
				<arg-dn>
					<token-local-variable name="wo-dest-dn"/>
				</arg-dn>
				<arg-value type="string">
					<token-xpath expression="round(jdate:getTime(jdate:new()) div 1000)+12960300"/>
				</arg-value>
			</do-add-dest-attr-value>
		</actions>
	</rule>
</policy>

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-4) was last changed on 19-Aug-2014 11:06 by jim