Hi all,
I'm trying to use the DXL APIs clipCut(), clipCopy(), clipPaste() to move/copy Item hierarchies or modules from one folder to another.
If I call these APIs passing in modules then everything works fine. I've tried a lot of things to try and resolve this. The folder is created by the user account doing the clipCopy(), the item permissions looks fine, I've made sure there are no locks interfering but nothing seems to help. The documentation indicates these APIs should operate on an Item not just Module. The lack of an error message returned is not helping deduce why it won't work. Any thoughts / help appreciated. I am guessing the DOORS client must use these APIs for folder copying. My overall aim here is to implement a recursive Item copy-paste / cut-paste feature. Best regards,
Ian (DOORS 9.2) IanFallon - Fri Oct 18 05:42:34 EDT 2013 |
Re: clipCopy() of folders fails (modules OK) Ian, The functions return a string. On success the string will be null. On failure the string will contain an error message. The first time I run the code below I get the results:
/Training Car Project The second time I run the code I get the results:
/Training Car Project Hope that helps. ---code---
Folder thisFolder = current Folder
|
Re: clipCopy() of folders fails (modules OK) GothSloth - Fri Oct 18 08:55:06 EDT 2013 Ian, The functions return a string. On success the string will be null. On failure the string will contain an error message. The first time I run the code below I get the results:
/Training Car Project The second time I run the code I get the results:
/Training Car Project Hope that helps. ---code---
Folder thisFolder = current Folder
Hi. Thanks for replying. The symptom I see is the DOORS process not responding, so I don't even get a return string, null or otherwise! I've been looking more into what's going on today. I don't think it's anything fundamentally not working now - I can get the code to run fine for folders _some_ of the time. I am beginning to suspect it's some side-effect of other DXL code somehow. The code is in fact part of a set of Java unit tests (which launches a headless DOORS process to execute DXL). The test suite with this test in passes if run by itself but if run with all the other unit tests (some of which make DXL calls although not on the same part of the test DOORS database). So still a bit of a mystery. |
Re: clipCopy() of folders fails (modules OK) Yes, I'm also thinking the folder must not already be open; which it is if you can see it in the LEFT pane or if one of its module's is open; or someone else is browsing therein. I doubt you can copy-paste a folder into one of its sub-folders. -Louie |
Re: clipCopy() of folders fails (modules OK) Thought I'd add a comment on here now I've figured out what was wrong! ... It's all to do with the 'current' concept where you can set an Item to be the 'current' one in DXL. Other tests were setting this which then caused the clipCopy() or clipCut() to fail. I tried setting current = null beforehand but that didn't work. Solution: Setting current to be the root folder before doing the clipCopy() or clipCut() worked! |