FIM ECMA2.2 Exception support

Hi,

I'm writing an MA to do Lync provisioning, and I want the MA to throw an Exception if there is an error (either during import or export), but to continue processing and not terminate the operation. For instance, if I have 3 users I want to add to Lync, and say any one of them is badly formatted, I want the MA to throw an exception only for that user but add the other 2 users.

In pseudocode, I have this for now

public PutExportEntriesResults PutExportEntries(IList<CSEntryChange> csentries) { foreach (CSEntryChange csentryChange in csentries) { try { // Add user to Lync

// On error

throw new ExtensibleExtensionException("Error occured");

} catch (Exception ex) { //handle exception } } }


This works in that it exports only the correct users, however it doesn't report anything back to the sync service (i.e. no export errors are seen in the console). I know this is probably because I'm handling the exception within the MA and not "leaking" it out, but if I don't handle it (i.e. remove the try catch block and just throw the exception), then all the adds fail since the exception then becomes an unhandled exception.

For 3 users (out of which 1 is incorrect), I would like to see 2 Adds and 1 exception shown in the console, but with the code above all I see is 3 adds and no errors (even though only 2 adds were performed in Lync).

How can I fix it so that I see the errors in the console?

Thanks



July 2nd, 2013 6:27pm

On export errors, MAExportError.ExportErrorCustomContinueRun and ExportErrorCustomStopRun are of particular interest; these allow custom error names and descriptions to appear in the FIM Sync Service console.

There's not a lot to handle on import errors: either it succeeds or it doesn't, and in the latter case we definitely want FIM to know about the problem and skip the obsoletion logic.  Under some circumstances FIM will halt the import step automatically without an exception, such as when the number of entries yielded in one call is greater than the import page size.

Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2013 12:20am

Found it with guidance from this link:

http://social.technet.microsoft.com/Forums/en-US/5ffcf3e7-9cc9-4922-a900-97e25ca936dc/how-does-the-csentrychangeresult-work

Now I'll work on handling import errors

July 3rd, 2013 5:19am

Great, thanks for the info about those properties
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2013 7:17am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics