Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Extending model, "Not a valid identifier" error
Extending model, "Not a valid identifier" error [message #1418198] Sat, 06 September 2014 17:58 Go to next message
Francesco Scialpi is currently offline Francesco ScialpiFriend
Messages: 5
Registered: August 2014
Junior Member
Hi,

if I place the following into my plugin.xml

      
<modelExtension
        id="bpsim.modelExtension.Process"
        name="Bpsim Process Extension"
        runtimeId="org.example.bpmn2.modeler.bpsim.runtime"
        type="Process">
      
      <property name="extensionValues">
      	<value>
<property name="bPSimData">
		         <value>
		            <property
                    name="scenario">
                 <value>
                    <property
                          name="author">
                    </property>
      	</value>
      </property>
      	</value>
      </property>
      	</value>
      </property>

	</modelExtension>


all seems to work, but I don't get the "author extension".

If I try and valorize the author property, i.e.

      
<modelExtension
        id="bpsim.modelExtension.Process"
        name="Bpsim Process Extension"
        runtimeId="org.example.bpmn2.modeler.bpsim.runtime"
        type="Process">
      
      <property name="extensionValues">
      	<value>
<property name="bPSimData">
		         <value>
		            <property
                    name="scenario">
                 <value>
                    <property
                          name="author" value="foo">
                    </property>
      	</value>
      </property>
      	</value>
      </property>
      	</value>
      </property>

	</modelExtension>

I get the following error:

java.lang.IllegalArgumentException: The datatype 'String' is not a valid classifier
at org.eclipse.emf.ecore.impl.EcoreFactoryImpl.createFromString(EcoreFactoryImpl.java:160)
at org.eclipse.bpmn2.modeler.core.runtime.BaseRuntimeDescriptor.setValueFromString(BaseRuntimeDescriptor.java:122)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.setValue(ModelExtensionDescriptor.java:338)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObject(ModelExtensionDescriptor.java:422)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObjectFromValues(ModelExtensionDescriptor.java:299)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObject(ModelExtensionDescriptor.java:452)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObjectFromValues(ModelExtensionDescriptor.java:299)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObject(ModelExtensionDescriptor.java:452)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObjectFromValues(ModelExtensionDescriptor.java:299)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObject(ModelExtensionDescriptor.java:452)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObject(ModelExtensionDescriptor.java:325)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObject(ModelExtensionDescriptor.java:312)
at org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.populateObject(ModelExtensionDescriptor.java:306)
at org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory.create(Bpmn2ModelerFactory.java:135)
at org.eclipse.bpmn2.modeler.core.ModelHandler.create(ModelHandler.java:960)
at org.eclipse.bpmn2.modeler.core.ModelHandler.create(ModelHandler.java:933)
at org.eclipse.bpmn2.modeler.core.ModelHandler.createProcess(ModelHandler.java:537)
at org.eclipse.bpmn2.modeler.core.ModelHandler$2.doExecute(ModelHandler.java:158)
at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:117)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at org.eclipse.bpmn2.modeler.core.ModelHandler.createProcessDiagram(ModelHandler.java:152)
at org.eclipse.bpmn2.modeler.core.ModelHandler.createDiagramType(ModelHandler.java:129)
at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor.importDiagram(BPMN2Editor.java:514)
at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor.access$0(BPMN2Editor.java:502)
at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor$2.doExecute(BPMN2Editor.java:482)
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:84)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor.setInput(BPMN2Editor.java:479)
at org.eclipse.bpmn2.modeler.ui.editor.DesignEditor.setInput(DesignEditor.java:102)
at org.eclipse.graphiti.ui.editor.DiagramEditor.init(DiagramEditor.java:217)
at org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor.init(BPMN2Editor.java:383)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:239)
at org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor.addPage(BPMN2MultiPageEditor.java:302)
at org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor.createDesignEditor(BPMN2MultiPageEditor.java:172)
at org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor.createPages(BPMN2MultiPageEditor.java:151)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:358)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:142)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:323)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:877)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:119)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:333)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:254)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1096)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:576)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:543)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:610)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:322)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1034)



Pelase note that "author" is declared as a String (not EString) in ecore file (referring to xmltypes), but strangely, if I change that to EString, I obtain the same behaviour.

Please help, I am stuck from almost a day.

[Updated on: Sat, 06 September 2014 18:04]

Report message to a moderator

Re: Extending model, "Not a valid identifier" error [message #1427016 is a reply to message #1418198] Fri, 19 September 2014 15:18 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Francesco,

Sorry for the late reply, I've been rather busy lately Wink

I'm afraid you'll have to write your own Property Tab class to handle these extension values. In fact, it looks like a lot of what you're trying to do is already being done in the jbpm plugin. Please have a look at org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.SimulationPropertySection and org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.SimulationDetailComposite. The PropertySection class is referenced in the <propertyTab> extension of the jbpm plugin.xml.

HTH,
Bob
Next Topic:Deletion of namespaces with getXMLNSPrefixMap()
Goto Forum:
  


Current Time: Tue Jul 17 07:47:37 GMT 2018

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

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

Back to the top