iwupdate with openapi

I'm trying to duplicate the functionality of the "iwupdate -x" command line tool using the Open API. I am able to update a destination area (workarea) from a source area (staging), but I have two problems:

1) When I perform the update using Open API it takes about 2 minutes. When I do it using the command line tool it takes about 1/2 second. Why is there such as huge difference in processing time ( I am logging the time right before and after the call to IWFileBatch.update and it is specifically that one call that takes 2 minutes)?

2) When I perform the update using OpenAPI any directories/files that are not in staging, but are in the workarea get deleted. Using the command line tool, directories that are in the workarea, but not in staging, do not get deleted.

Is there a way to mimic the "iwupdate" in terms of performance and the functionality of not deleting directories in the destination area that are not in the source area?

Here's a snippet of the code I'm using to do the update:

IWWorkArea workArea = (IWWorkArea) IWPathNamedObject.lookupByPath(fileService, workAreaPath);
IWArea staging = (IWArea) IWPathNamedObject.lookupByPath(fileService, stagingPath);

IWFileBatch.ResultOfChange updateResultCollection = IWFileBatch.update(fileService,
staging,
workArea,
null,
IWPathNamedObject.rkmDDescendant,
null,
false,
null,
"update",
"update",
false,
null,
null,
true,
IWPathNamedObject.oNone);


Thanks in advance for any suggestions!

Comments

  • Narendra answered this one earlier; basically, to speed things up, don't use rkmDDescendant. Instead use rkmSelf and provide the exact list of files to be updated. This should also solve the "iwupdate -x" functionality problem since you're specifically stating which files you want to update.
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs