March 25, 2019
Hot Topics:

Identity Management with Microsoft Identity Integration Server

  • July 22, 2005
  • By Jeffrey Juday
  • Send Email »
  • More Articles »

Copying Data to the Metaverse: Import and Synchronization

Management agents control importing (staging), exporting, and synchronization through run profiles. Run profiles consist of a series of operations called steps, which can be combined (e.g., import and synchronization or separated). Figure 10 shows the configuration screen for a run step.

Click here for a larger image.

Figure 10. The Configuration Screen for a Run Step

Run profiles can be executed manually or exported to VBScript to be scheduled in some other tool, such as a job in the SQL Server agent.

The example created a run profile called "Import" that imports (stages) the Northwind object type. It also created a synchronization run profile called "Sync" that moves the staged Northwind objects into the Metaverse according to the projection rules and attribute flows you defined previously. It then continued the synchronization process with the "TestDatabase" Connector Space managed by the agent called "MetaverseToExternalDB". Figure 11 presents a summary of the results you will see when you run the "Sync" run profile.

Figure 11. Results From Running The "Sync" Run Profile

You may have noticed that when you run a synchronization step the synchronization process continues with all Connector Spaces impacted by the changes to the data. You may have also noticed the Provisioning Adds section.

MIIS Export and Provisioning

As mentioned previously, provisioning is the process by which the accounts are created. In order to create new objects in an outbound Connector Space, you must create and configure a Metaverse rules extension assembly using Visual Studio.NET. To begin, select "Options" in the Tools menu. The "Options" dialog will appear (see Figure 12).

Click here for a larger image.

Figure 12. The "Options" Dialog

The "Create Rules Extension Project" option opens a new Visual Studio.NET project, complete with a class and the appropriate stub functions. The IMVSynchronization.Provision function is the only function you must code to perform provisioning. Sample code appears below:
     void IMVSynchronization.Provision (MVEntry mventry)
               CSEntry csentry;
               ConnectedMA ManagementAgent;  // Management agent object
               int Connectors = 0;           // Management agent connectors
               ReferenceValue DN;            // Distinguished name attribute
               csentry = null;
                           ManagementAgent = mventry.ConnectedMAs["MetaverseToExternalDB"];
                           Connectors = ManagementAgent.Connectors.Count;
                       if ( Connectors == 0 )
                             DN = ManagementAgent.EscapeDNComponent(mventry["EmpID"].Value.ToString());
                           csentry = ManagementAgent.Connectors.StartNewConnector("TestDatabase");
                           csentry.DN = DN;
                           csentry["EmployeeID"].Value = mventry["EmpID"].Value.ToString();

You use two key objects to add new accounts to the Connector Space: MVEntry and CSentry. MVEntry controls access to the object traveling from the Metaverse. CSentry represents the object created in the Connector Space.

When MIIS determines that a new object must be created in the Connector Space, it invokes the provision function, passing the appropriate Metaverse object via the MVentry class. To create a new Connector Space object, simply call "StartNewConnection" on the Connectors Collection in the management agent to create the CSentry object and then call "CommitNewConnector" on the CSEntry object to save the object to the Connector Space.

All that remains is to create a run profile to export from the Connector space to the destination data source.

Debugging and Testing the Management Agent and the Metaverse Rules Extention

As mentioned previously, the Metaverse rules extension is a .NET assembly you build in Visual Studio. Like any Visual Studio.NET assembly project, you can use the processes option on the Visual Studio Tools menu to debug your assemblies. The MIIS process is called MIIserver.exe.

Now, as you make changes to the Northwind database, execute the run profiles to copy the data to the Metaverse and then to the destination database. Observe how records are added and updated when new records are added or updated in Northwind.

Further Investigation

MIIS is well documented. You can download a series of whitepapers on subjects ranging from Metaverse design to designing data flows. Access the whitepapers from the MIIS homepage. You can also download a free trial version on MIIS from the MIIS web site. You will need the Enterprise or Development edition of SQL Server 2000 to run the trial.

Identity Management for Your Apps

Consider MIIS for identity management with technologies like Active Directory or applications utilizing SQL Server 2000. You can leverage your existing .NET development skills to extend and augment MIIS.

Download the Code

To download the code for the sample class, click here.

About the Author

Jeffrey Juday is a software developer with Crowe Chizek in South Bend, Indiana. He has been developing software with Microsoft tools for more than 12 years in a variety of industries. Jeff currently builds solutions using BizTalk 2004, ASP.NET, SharePoint, and SQL Server 2000. You can reach Jeff at jjuday@crowechizek.com.

Page 3 of 3

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date