public static void addEntityToDefinitionGroup(
DMFDefinitionGroupName _definitionGroupName,
DMFEntityName _entityName,
FieldGroupName _fieldList = "@SYS6047",
DMFSourceName _exportTypeSourceName = DefaultExportTypeSourceName,
boolean _enableChangeTracking = false)
{
DMFRefreshType refreshType;
if (_enableChangeTracking && DataManagementIntegrationUtils::canEntityUseIncrementalPush(_entityName))
{
refreshType = DMFRefreshType::IncrementalPush;
}
else
{
refreshType = DMFRefreshType::FullPush;
}
if (DMFDefinitionGroup::find(_definitionGroupName))
{
if (!DMFDefinitionGroupEntity::find(_definitionGroupName, _entityName))
{
PersonnelIntegrationUtils::getEventSource().addEntityStart(PersonnelIntegrationUtils::getEnvironmentNamespace(), DataManagementIntegrationUtils::sanitizeDefinitionGroup(_definitionGroupName), _entityName);
SysInfologLevel infologLevel = infolog.infologLevel();
try
{
if (refreshType == DMFRefreshType::IncrementalPush)
{
// Ensure entity is set for delta processing
DataManagementIntegrationUtils::enableChangeTrackingOnEntity(_entityName);
}
try
{
// The DMF framework logs a lot of infolog messages, to suppress these for now.
infolog.setInfoLogLevel(SysInfologLevel::None);
DMFEntityBase::addEntityForProcessingV3(_definitionGroupName,
_definitionGroupName,
_entityName,
_exportTypeSourceName,
'',
_fieldList,
true,
true,
'',
false,
refreshType,
false);
}
finally
{
infolog.setInfoLogLevel(infologLevel);
}
}
catch
{
PersonnelIntegrationUtils::getEventSource().addEntityException(PersonnelIntegrationUtils::getEnvironmentNamespace(),
DataManagementIntegrationUtils::sanitizeDefinitionGroup(_definitionGroupName),
_entityName,
'');
exceptionTextFallThrough();
}
PersonnelIntegrationUtils::getEventSource().addEntityEnd(PersonnelIntegrationUtils::getEnvironmentNamespace(), DataManagementIntegrationUtils::sanitizeDefinitionGroup(_definitionGroupName), _entityName);
}
}
else
{
error(strFmt("@SYS62688", _definitionGroupName));
}
}
No comments:
Post a Comment