Error when loading process with custom extensionElements [message #1517524] |
Fri, 19 December 2014 15:08 |
Cédric Casenove Messages: 22 Registered: December 2013 |
Junior Member |
|
|
Hi,
I am using version 1.1.1.201412112314 of the BPMN2 Modeler plugins (luna repository). I tried to extends the BPMN2 model to attach custom properties to a UserTask object.
I attached my custom Notification object to the extensionElements of a user task with code similar to this:
Notification notification = PMModelFactory.eINSTANCE.createNotification();
ModelDecorator.addExtensionAttributeValue(userTask, PMModelPackage.eINSTANCE.getDocumentRoot_Notification(), notification);
When saving the document, the generated xml seems to be what I expected (pm is the namespace of my extension model):
<bpmn2:userTask id="Task_1" name="Task 1">
<bpmn2:extensionElements>
<pm:notification notifyActiveStatus="true" notifyAvailableStatus="true"/>
</pm:notification>
</bpmn2:extensionElements>
...
But when I reload the document, I got this error
java.lang.IllegalArgumentException: The feature 'notification' is not a valid feature
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eOpenGet(BasicEObjectImpl.java:1062)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1015)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:998)
at org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor.internalSet(FeatureDescriptor.java:549)
at org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor.setValue(FeatureDescriptor.java:460)
at org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor.setValue(FeatureDescriptor.java:406)
at org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl$Bpmn2ModelerXmlHandler.createObjectFromFeatureType(Bpmn2ModelerResourceImpl.java:597)
When I was working with the kepler branch, I did not have this problem.
Can someone help me ?
Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.03198 seconds