RunJob is a command line tool that takes an XML based “task” file containing command sequences for a FIM solution and executes them, interacting with FIM to initiate and monitor Run Profiles, and providing mechanisms for calling out to additional tools as needed as part of the Run Sequence (for example, to transmit files generated by FIM to a target server for consumption).

In addition to its execution capability RunJob contains an internal operation sequencer, allowing sections of a Run Sequence to be repeated, included, skipped or completely halted based on the results of the Script as it is executed in real time.

<?xml version="1.0" encoding="utf-8" ?>
<Task name="Run full cycle">
	<!-- Display a welcome message -->
	<step task="echo" text="Executing the Full Cycle"/>

	<!-- Display the sequence -->
	<step task="echo" text="Import from HR" label="ImportHR"/>
	<!-- Execute the required run profiles, and abort if there are errors -->
	<step task="run" maname="SAP HR" profile="Full Import" action="abort" />

	<!-- Ensure that we abort the run if there are more than 100 deletes staged -->
	<step task="verify" maname="SAP HR" stage-delete="-100" action="abort" />

	<!-- Otherwise allow the synchronisation to take place -->
	<step task="run" maname="SAP HR" profile="Delta Sync" action="abort" />

	<!-- set the "retry" flag - we will allow one repeat attempt -->
	<step task="set" flag="retry"/>
	<!-- Display the sequence (and set the Update AD label for later user -->
	<step task="echo" text="Process AD" label="Update AD"/>

	<!-- Execute the required run profiles and SET the "ADIssue" flag if there are any problems in the run -->
	<step task="run" maname="MySampleCo AD" profile="Export" action="set" flag="ADIssue"/>
	<step task="run" maname="MySampleCo AD" profile="Delta Import" action="set" flag="ADIssue"/>

	<!-- Execute the required run profile and display a suitable warning if there are any problems in the run -->
	<step task="run" maname="MySampleCo AD" profile="Delta Sync" action="echo" text="Problems performing a delta sync on MySampleCo AD - please check operations history"/>

	<!-- Check to see if we can retry AD (test executes the action if the test 'fails' -->
	<step task="test" flag="retry" action="finished"/>

	<!-- Check to see if we didn't get an issue (test executes the action if the flag is not set) -->
	<step task="test" flag="ADIssue" action="finished"/>

	<!-- Display a suitable message -->
	<step task="echo" text="Attempting a retry on AD to resolve issues"/>

	<!-- Clear the retry flag, preventing future repeats -->
	<step task="unset" flag="retry"/>
	<!-- Jump to the "Update AD" section of the task -->
	<step task="jumpto" action="Update AD"/>

	<!-- Display the 'All done' message and set a label for the last clean up steps-->	
	<step task="echo" text="All Finished" label="finished"/>

	<!-- Execute the clear run history tool to ensure that only appropriate logs are maintained -->
	<step task="command" command="MiisClearRunHistory.exe" params="/pr:30"/>

Last edited Nov 1, 2011 at 12:39 AM by jasonbanks, version 4