MiisApp – Importing selected objects

MiisApp was designed to be a toolset for non-administrative users who needed to interact with MIIS in certain, well-specified ways. Some of these tasks do not directly involve MIIS itself, but are for setting up the data appropriately – such as the forms for viewing source data.

An issue that came up from time to time was the need to re-sync an individual user (or small group of users). I won’t go into all the various reasons why this would happen, they were different each time and frankly I can’t remember, but they typically involved a particular user without all their correct group memberships in the target directory. It would all be sorted out at the next Full Import/Sync – but that took about four hours and could not be scheduled during the working day. For those cases where it couldn’t wait I provided a method to force a full sync of an individual object.

The method itself was really quite simple – just add the object into all relevant Delta Tables, and it will be included in the next Delta Import/Sync.

The only thing I had to avoid was attempting this while the DTS Package was running. Unfortunately I couldn’t find any programmatic way to tell if a DTS was currently in operation, so the solution is a bit of a fudge – if the last log line produced by my scheduling script indicates the DTS has been started then I don’t attempt the Delta Table insertions.

The code I wrote opens Notepad to allow the object identifiers to be pasted in by the user, and then inserts the objects in the relevant Delta Tables. You can see the code here.