On 3/22/11 12:02 PM, ioda100 wrote: > Hi, > > I try to figure out how to import a package from an instance of guvnor to > another instance of guvnor without destroying all the existing repository. > > There is an import/export function in the administration part of guvnor but > it export all the repository and when import a repository, it's erasing all > before importing. > > What i would like to be able to do is : i have a package with rules, > functions, enum, dsl, test scenarios... under an instance of guvnor and i > have another package under another instance and i would like to import the > second package to the other instance of guvnor without erasing the existing > repository. Is it a way to do this? i can't find it. maybe with the eclipse > plugin? I don't want to import from a drl file because i would loose the > graphical part (use of dsl, enum...). Repository XML import is not a merge, so yes the existing repository will first be erased. I don't follow your use case completely (more like how did you get into your situation tobegin with ;) ). One thing you can take advantage of in the future is having multiple Guvnor instances be in a Jackrabbit cluster (see http://blog.athico.com/2011/01/configuring-multiple-guvnor-instances.html). If you have a need to migrate an existing repository (copy) from one location to another, I just wrote a drools-ant task for that (check the blog soon).
With what you have right now, the only thing that comes to mind is to check out all assets of your package B via the Guvnor eclipse plugin, then add them manually (via same plugin) to package A. Tihomir > > My second question is that i try to use the guvnor plugin for eclipse to > manage rules in the guvnor repository. I can access to it and read/modify > all but i can't modify the ".brl" files, i get for all the files this > message : "Could not open the editor: An unexpected exception was thrown. > java.lang.NullPointerException > at org.drools.eclipse.rulebuilder.ui.ActionSetFieldWidget.(Unknown > Source) > at > org.drools.eclipse.rulebuilder.ui.RuleModeller.addActionSetFieldWidget(Unknown > Source) > at org.drools.eclipse.rulebuilder.ui.RuleModeller.redrawRhs(Unknown > Source) > at org.drools.eclipse.rulebuilder.ui.RuleModeller.reloadRhs(Unknown > Source) > at org.drools.eclipse.rulebuilder.ui.RuleModeller.reloadWidgets(Unknown > Source) > at org.drools.eclipse.rulebuilder.editors.BrlPage.setModelXML(Unknown > Source) > at org.drools.eclipse.rulebuilder.editors.RuleEditor.pageChange(Unknown > Source) > at > org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1076) > at > org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:597) > at > org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:361) > at > org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662) > at > org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462) > at > org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) > at > org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286) > at > org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857) > at > org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762) > at > org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) > at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) > at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) > at > org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) > at > org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685) > at > org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668) > at org.guvnor.tools.utils.PlatformUtils.openEditor(Unknown Source) > at org.guvnor.tools.views.RepositoryView.doubleClick(Unknown Source) > at org.guvnor.tools.views.RepositoryView.access$4(Unknown Source) > at org.guvnor.tools.views.RepositoryView$7.run(Unknown Source) > at org.guvnor.tools.views.RepositoryView$9.doubleClick(Unknown Source) > at > org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:821) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) > at org.eclipse.core.runtime.Platform.run(Platform.java:888) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) > at > org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:819) > at > org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1419) > at > org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1195) > at > org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:238) > at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:235) > at > org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:296) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) > at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) > at > org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) > at > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at > org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) > at > org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) > at org.eclipse.equinox.launcher.Main.run(Main.java:1311) > at org.eclipse.equinox.launcher.Main.main(Main.java:1287) > " > > Thanks in advance for your help. > > -- > View this message in context: > http://drools-java-rules-engine.46999.n3.nabble.com/Merge-repository-in-Guvnor-and-editing-brl-with-eclipse-plugin-tp2715521p2715521.html > Sent from the Drools - User mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
