Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » [SOLVED] problem with Definitions
[SOLVED] problem with Definitions [message #882758] Thu, 07 June 2012 06:08
Daniel Colomer is currently offline Daniel ColomerFriend
Messages: 4
Registered: April 2012
Junior Member
EDIT:: I solved this problem by using my own XmlParser the same way JBPMN runtime does. Before I was just using the code that eclipse generated for me from the genmodel file.

Hi,

I am creating my own runtime extension and I found myself with the following problem. whenever I create a diagram and then close it I cannot reopen it.

I have checked at the xml generated and the definitions element that a file created using my extension is a little bit different from the one that for example the jbpmn extension creates:

This is what my runtime generates:

<bpmn2:definitions xmlns:xsi="h_ttp://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="h_ttp://www.omg.org/spec/BPMN/20100524/MODEL-XMI" xmlns:bpmndi="h_ttp://www.omg.org/spec/BPMN/20100524/DI-XMI" xmlns:dc="h_ttp://www.omg.org/spec/DD/20100524/DC-XMI" xmlns:di="h_ttp://www.omg.org/spec/DD/20100524/DI-XMI" id="Definitions_1" targetNamespace="h_ttp://ao4bpmn/1.0">

This is what JBPMN runtime generates:


<bpmn2:definitions xmlns:xsi="h_ttp://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="h_ttp://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="h_ttp://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="h_ttp://www.omg.org/spec/DD/20100524/DC" xmlns:di="h_ttp://www.omg.org/spec/DD/20100524/DI" xmlns:tns="h_ttp://www.jboss.org/drools" xsi:schemaLocation="h_ttp://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="Definitions_1" targetNamespace="h_ttp://www.jboss.org/drools">

When I try to open the diagram with the bpmn2 editor teh following error occurs:

java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl cannot be cast to org.eclipse.bpmn2.Definitions
	at org.eclipse.bpmn2.modeler.core.ModelHandler.getDefinitions(ModelHandler.java:789)
	at org.eclipse.bpmn2.modeler.core.ModelHandler.getParticipantContainer(ModelHandler.java:737)
	at org.eclipse.bpmn2.modeler.core.ModelHandler.getInternalParticipant(ModelHandler.java:837)
	at org.eclipse.bpmn2.modeler.core.di.DIImport$1.doExecute(DIImport.java:118)
	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
	at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:90)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	at org.eclipse.bpmn2.modeler.core.di.DIImport.generateFromDI(DIImport.java:112)
	at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor.importDiagram(BPMN2Editor.java:330)
	at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor.access$0(BPMN2Editor.java:310)
	at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor$1.doExecute(BPMN2Editor.java:302)
	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
	at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
	at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:71)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor.setInput(BPMN2Editor.java:298)
	at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:346)
	at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.init(DiagramEditorInternal.java:1093)
	at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor.init(BPMN2Editor.java:197)
	at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:237)
	at org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor.createDesignEditor(BPMN2MultiPageEditor.java:244)
	at org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor.createPages(BPMN2MultiPageEditor.java:232)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:493)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:479)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
	at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:331)
	at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMenu.java:179)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

[Updated on: Thu, 07 June 2012 06:24]

Report message to a moderator

Previous Topic:ServiceTask and WSDL
Next Topic:A couple of questions
Goto Forum:
  


Current Time: Sat Oct 19 21:57:25 GMT 2019

Powered by FUDForum. Page generated in 0.01621 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top