Any way to tell if mod type is delete in rules extension?
I have a Rules Extension that does some tying up of attributes on creates, but on delete, things are failing as some attributes don't exist for some reason. Is there a way in the extension to tell if the modification type is a delete? Specifically, when I'm in the MapAttributesForExport() method I would like to know what the modification type is. This way I could just skip doing anything and let the delete flow. At the moment deletes are failing. Even better, is there a way not to fire the extension on delete?
August 12th, 2010 9:02pm

Within the MapAttributesForExport() method there is not a way to tell what the triggering operation is. (Not without some serious hacking around the transaction object - which you probably don't want to do.) From a matter of design, the MapAttributesForExport() method should NOT know what the operation is, its sole job is to calculate the output value from a series of input values. Note that if you are combining values that are sometimes not present you can use the "IsPresent" propery to test for existance before you try and access the value property. Changing the value on an export flow doesn't make sense if the thing you are changing is being deleted. If on the other hand you actually meant that you want to change some values on disconnection, then you have an opportunity to do that in your Metaverse extension in the DeprovisionAction routine.
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2010 3:57am

Thanks Rex. No, I don't want to change any values on delete, we are staging deletions, not deactivations or the like. It's just that I have this existing rules extension that seems not to have been designed with Delete in mind. I can check if the attributes are present of course, but I wanted to keep it robust, so if it was a create operation and no attribute was present, this would correctly be reported as an exception. No worries, thanks for the reponse.
August 13th, 2010 11:39am

Maybe just a matter of adding some .IsPresent tests?http://www.wapshere.com/missmiis
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2010 2:28pm

I can check if the attributes are present of course, but I wanted to keep it robust, so if it was a create operation and no attribute was present, this would correctly be reported as an exception. No worries, thanks for the reponse. As Rex mentioned, the MapAttributesForExport() method is to calculate values that will be exported out to a target system. The use of IsPresent, as Carol suggested, is key to keeping attribute flow code robust. If you are looking to make your creation process more robust, the place for catching and reporting on missing attribute information would be in your provisioning code itself, before you get to a point where you would be trying to export that information. Marc Mac Donell, ILM MVP, VP Identity and Access Solutions, Avaleris Inc.
August 13th, 2010 2:44pm

Yes, this isn't a problem as such, as I can work-around it, I was just wondering if there was a solid solution. Infact, looking into things in more detail, I don't think this method should even fire for a delete? I think there's a problem with my deletion functionality. I'm deleting from the Portal, but it's coming through as an ADD when I view the object in the FIMMA connector space. Very odd. I'll diagnose it some more and raise another question if need be. (all ma's are set to "stage a delete on the object for the next export run) Thanks...
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2010 3:23pm

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

Other recent topics Other recent topics