Could not save the copied build engine using RTC java api
![]()
Richar Cai (17●1●11●16)
| asked May 31 '16, 8:26 p.m.
edited Jun 17 '16, 1:23 p.m. by David Lafreniere (4.8k●7)
Dear Team,
I am trying to create a build engine in RTC by using java api. I use the method ".copyEngine()", but the new build engine is failed to save. The error message mentions that the item which I am trying to save could not be found from RTC database.
Could you give me some advice?
Thank you very much!
My code is simple as below:
=================================== String originalBuildId = "CI_BF_Agent_NO.2"; IBuildEngine originalBuildEngine = (IBuildEngine) cbe.getBuildEngine(originalBuildId).getWorkingCopy(); //IBuildEngine newEngine = BuildItemFactory.createBuildEngine(); IBuildEngine newEngine = originalBuildEngine.copyEngine(); newEngine.setId("R_CI_BF_Agent_NO.2"); newEngine.setActive(true); newEngine.setProcessArea(originalBuildEngine.getProcessArea()); buildClient.save(newEngine, null); =========================== |
2 answers
![]()
in my copy project utility, I was never able to make copyEngine() work either.. I gave up and wrote my own copy functions..
now, in MOST cases, I was trying to copy across systems, so the copyEngine() function wouldn't have worked anyhow. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
I basically don't know. But you an search the RTC SDK for IBuildEngine, find the interface, and search for IBuildEngine.copyEngine() and look at what they are doing. If you run an Eclipse Debug client, you can actually step through the build engine creation wizard, which also uses the copyEngine() method.
Dear Ralph,