summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-12-10 06:38:30 (EST)
committerStephan Born2013-01-25 12:35:15 (EST)
commit99ab5497ed85b3aca9a27b6ca2ab91be3630b28a (patch)
tree6130808f014b9490f56288a3002b7f58387bf2f1
parent0dc89842b178e5b7e8f20b71d3b8e2f26cb2efed (diff)
downloadorg.eclipse.stardust.ui.web-99ab5497ed85b3aca9a27b6ca2ab91be3630b28a.zip
org.eclipse.stardust.ui.web-99ab5497ed85b3aca9a27b6ca2ab91be3630b28a.tar.gz
org.eclipse.stardust.ui.web-99ab5497ed85b3aca9a27b6ca2ab91be3630b28a.tar.bz2
CRNT-27295 Process Interface definitions are not serialzed correctly in XPDL using the browser modeler.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@61486 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java9
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java47
2 files changed, 34 insertions, 22 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
index acfc0f0..eda9216 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java
@@ -59,6 +59,7 @@ import org.eclipse.stardust.model.xpdl.carnot.SubProcessModeType;
import org.eclipse.stardust.model.xpdl.carnot.TransitionConnectionType;
import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
import org.eclipse.stardust.model.xpdl.carnot.TriggerType;
+import org.eclipse.stardust.model.xpdl.carnot.extensions.FormalParameterMappingsType;
import org.eclipse.stardust.model.xpdl.carnot.impl.ProcessDefinitionTypeImpl;
import org.eclipse.stardust.model.xpdl.carnot.util.ActivityUtil;
import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
@@ -315,6 +316,14 @@ public abstract class ModelElementMarshaller implements ModelMarshaller
formalParameterJson.addProperty(
ModelerConstants.PRIMITIVE_DATA_TYPE_PROPERTY, type);
}
+ FormalParameterMappingsType mappingsType = processDefinition.getFormalParameterMappings();
+ if (mappingsType != null)
+ {
+ DataType data = mappingsType.getMappedData(formalParameter);
+ String fullID = getModelBuilderFacade().createFullId(model, data);
+ formalParameterJson.addProperty(ModelerConstants.DATA_FULL_ID_PROPERTY,
+ fullID);
+ }
}
}
else
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
index 8ec4d6b..185fb99 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
@@ -34,6 +34,25 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.FeatureMapUtil;
+import org.eclipse.xsd.XSDComplexTypeContent;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDCompositor;
+import org.eclipse.xsd.XSDConstrainingFacet;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDFactory;
+import org.eclipse.xsd.XSDImport;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTerm;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.impl.XSDSchemaImpl;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+
import org.eclipse.stardust.common.StringUtils;
import org.eclipse.stardust.common.log.LogManager;
import org.eclipse.stardust.common.log.Logger;
@@ -104,24 +123,6 @@ import org.eclipse.stardust.model.xpdl.xpdl2.XpdlPackage;
import org.eclipse.stardust.model.xpdl.xpdl2.util.TypeDeclarationUtils;
import org.eclipse.stardust.modeling.repository.common.descriptors.ReplaceModelElementDescriptor;
import org.eclipse.stardust.ui.web.viewscommon.utils.MimeTypesHelper;
-import org.eclipse.xsd.XSDComplexTypeContent;
-import org.eclipse.xsd.XSDComplexTypeDefinition;
-import org.eclipse.xsd.XSDCompositor;
-import org.eclipse.xsd.XSDConstrainingFacet;
-import org.eclipse.xsd.XSDElementDeclaration;
-import org.eclipse.xsd.XSDFactory;
-import org.eclipse.xsd.XSDImport;
-import org.eclipse.xsd.XSDModelGroup;
-import org.eclipse.xsd.XSDParticle;
-import org.eclipse.xsd.XSDSchema;
-import org.eclipse.xsd.XSDSimpleTypeDefinition;
-import org.eclipse.xsd.XSDTerm;
-import org.eclipse.xsd.XSDTypeDefinition;
-import org.eclipse.xsd.impl.XSDSchemaImpl;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
/**
*
@@ -776,7 +777,7 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
}
else
{
- newId = NameIdUtils.createIdFromName(newName);
+ newId = NameIdUtils.createIdFromName(newName);
}
}
}
@@ -838,14 +839,16 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
}
DataType data = null;
+ String dataFullID = null;
if (formalParameterJson.has(ModelerConstants.DATA_FULL_ID_PROPERTY)
&& !formalParameterJson.get(ModelerConstants.DATA_FULL_ID_PROPERTY)
.isJsonNull())
{
- data = getModelBuilderFacade().findData(
- formalParameterJson.get(ModelerConstants.DATA_FULL_ID_PROPERTY)
- .getAsString());
+ dataFullID = formalParameterJson.get(ModelerConstants.DATA_FULL_ID_PROPERTY)
+ .getAsString();
+ ModelType model = ModelUtils.findContainingModel(processDefinition);
+ data = getModelBuilderFacade().importData(model, dataFullID);
}
if (formalParameterJson.get(ModelerConstants.DATA_TYPE_PROPERTY)