Hello!
When is ExportEntry in MAC called
Answer:It is called when you have PendingExports in your connector space and run the "export" run profile.
If I now change a column in the database. The column is called enddate and is used for setting the date when an employ finish his job i.e leave the employment.
This enddate has a direct flow into MV.
I have this code in MAR for outbound in method void IMASynchronization.MapAttributesForExport (string FlowRuleName, MVEntry mventry, CSEntry csentry)
case "personHomeDirFull":
if (mventry["uid"].IsPresent)
{
if (mventry["enddate"].IsPresent)
{
enddate = DateTime.ParseExact(mventry["enddate"].Value, "yyyyMMdd", CultureInfo.InvariantCulture);
}
//Check if we have enddate. If yes then set a new directory to avslutade and Remove the homeDir
if (mventry["enddate"].IsPresent && DateTime.Today.CompareTo(enddate) > 0)
{
//New homedir because we have an enddate
csentry["homeDirFull"].Value = MIMShrCommon.UserDirectoryOrg + "\\" + mventry["uid"].Value.ToLower();
//Remove the original homeDir
string sourceDirectory = MIMShrCommon.UserDirectory + "\\" + mventry["uid"].Value.ToLower();
if (Directory.Exists(sourceDirectory))
{
Directory.Delete(sourceDirectory, false);
}
}
else
{
csentry["homeDirFull"].Value = MIMShrCommon.UserDirectory + "\\" + mventry["uid"].Value.ToLower();
}
}
break;
As you can see in the code above I change the attribute homeDirFull when we need to set a new homedir becuse the employee has finish the employment. When I debug I can see that the code is doing the right thing.
The problem is that when I change the column enddate in the database and run the following profile in sequence
Full import
Full sync (Inbound agent)
Full sync (outbound agent)
Export (When this is called the ExportEntry is not called in spite have updated the attribute homeDirFull as you can see in the code above.
I have the following attribute on the outbound agent
homeDirFull, ACL, homeDir and homeDirOrg
All these four is of type rules extension
Can somebody guide in the right direction
//Tony