Hi,
We are trying to upgrade the categories in XECM for the old categories and it is not upgrading to the old categories using webservices.Using content server browser can able to upgrade for the old categories also.
When we try to upgrade new categories using webservices and it is upgrading successfully.
Version :16.2.3
I have nt seen any Rest API function call for the category upgrade.
Here is my C# code.Any suggestions or ideas for the category upgrade ?
public void UpgradeCategory(long nodeId, string categoryName)
{
try
{
var node = DocManClient.GetNode(ref DocManAuthen, nodeId);
if (node == null)
return;
if (node.Metadata.AttributeGroups == null)
return;
var categoryInher = DocManClient.GetCategoryInheritance(ref DocManAuthen, nodeId);
if(categoryInher == null)
return;
var lstCategoryInher = categoryInher.ToList<CategoryInheritance>();
foreach (var cat in categoryInher)
{
var attrGrpDef = DocManClient.GetCategoryDefinition(ref DocManAuthen, cat.CategoryID);
if (attrGrpDef == null)
continue;
if (attrGrpDef.DisplayName != categoryName)
continue;
var chunOper = DocManClient.UpgradeCategoryItemsContext(ref DocManAuthen, cat.CategoryID,
8, true);
var upgradeInfo = DocManClient.UpgradeCategoryItems(ref DocManAuthen, chunOper);
string msg = string.Format("Upgrade Category,{0},Node Name,{1},Upgraded Count,{2},Skipped,{3}",
categoryName, node.Name, upgradeInfo.UpgradedCount, upgradeInfo.SkippedCount);
;
}
}
catch (Exception e)
{
LogHelper.Write(e);
}
}
}
}
Thank you in advance
We are trying to upgrade the categories in XECM for the old categories and it is not upgrading to the old categories using webservices.Using content server browser can able to upgrade for the old categories also.
When we try to upgrade new categories using webservices and it is upgrading successfully.
Version :16.2.3
I have nt seen any Rest API function call for the category upgrade.
Here is my C# code.Any suggestions or ideas for the category upgrade ?
public void UpgradeCategory(long nodeId, string categoryName)
{
try
{
var node = DocManClient.GetNode(ref DocManAuthen, nodeId);
if (node == null)
return;
if (node.Metadata.AttributeGroups == null)
return;
var categoryInher = DocManClient.GetCategoryInheritance(ref DocManAuthen, nodeId);
if(categoryInher == null)
return;
var lstCategoryInher = categoryInher.ToList<CategoryInheritance>();
foreach (var cat in categoryInher)
{
var attrGrpDef = DocManClient.GetCategoryDefinition(ref DocManAuthen, cat.CategoryID);
if (attrGrpDef == null)
continue;
if (attrGrpDef.DisplayName != categoryName)
continue;
var chunOper = DocManClient.UpgradeCategoryItemsContext(ref DocManAuthen, cat.CategoryID,
8, true);
var upgradeInfo = DocManClient.UpgradeCategoryItems(ref DocManAuthen, chunOper);
string msg = string.Format("Upgrade Category,{0},Node Name,{1},Upgraded Count,{2},Skipped,{3}",
categoryName, node.Name, upgradeInfo.UpgradedCount, upgradeInfo.SkippedCount);
;
}
}
catch (Exception e)
{
LogHelper.Write(e);
}
}
}
}
Thank you in advance