Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Category Upgrade using Content Webservices

Status
Not open for further replies.

mr522

Programmer
Jan 21, 2015
19
0
0
SG
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
 
Are you saying that when you do the Context Things are you seeing any DataID's returned? if you would put Debug on you should be able to see the returned data ids and if they are what that is participating in the XECM containers .Sometimes OT code and modules are written by different teams so if the XECM developers does not allow their containers traversable then it wouldn't work.so check if each of the dataids that are needing upgrade is passing through and what kind of errors you get and report

alternatively you can use a WR and try to upgrade it and see if you have a faster mechanism.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top