summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-08-07 02:25:57 (EDT)
committerManik Kishore2012-08-07 05:02:47 (EDT)
commit9cd4021014f7fcb996cd8bf173c569fe2c628040 (patch)
treee561fcec0750424fa6b55bed6974d22fbdf891d2
parent38faacf29a6e6e9629aa526fd41312ac3898ad98 (diff)
downloadorg.eclipse.stardust.ui.web-9cd4021014f7fcb996cd8bf173c569fe2c628040.zip
org.eclipse.stardust.ui.web-9cd4021014f7fcb996cd8bf173c569fe2c628040.tar.gz
org.eclipse.stardust.ui.web-9cd4021014f7fcb996cd8bf173c569fe2c628040.tar.bz2
Jira-ID: CRNT-25677
1)Added code to set the fromModelElement and toModelElement in toDataMappingConnectionType in ModelElementMarshaller 2)Made changes to this.path direction for dataFlow in/out mappings. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58209 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java4
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java29
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js11
3 files changed, 28 insertions, 16 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java
index 5a6864a..e037d7d 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java
@@ -117,7 +117,7 @@ public class ConnectionCommandHandler
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID)),
MBFacade.findDataSymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
- maxOid, true);
+ maxOid, false);
}
else
{
@@ -181,7 +181,7 @@ public class ConnectionCommandHandler
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
MBFacade.findDataSymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID)),
- maxOid, false);
+ maxOid, true);
}
else
{
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 d646e56..50cca5c 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
@@ -893,14 +893,7 @@ public class ModelElementMarshaller
connectionJson.addProperty(ModelerConstants.OID_PROPERTY,
dataMappingConnection.getElementOid());
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
- dataMappingConnection.getDataSymbol().getElementOid());
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_TYPE,
- ModelerConstants.DATA);
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_OID,
- dataMappingConnection.getActivitySymbol().getElementOid());
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
- ModelerConstants.ACTIVITY_KEY);
+
connectionJson.addProperty(ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY,
mapAnchorOrientation(dataMappingConnection.getSourceAnchor()));
connectionJson.addProperty(ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY,
@@ -924,11 +917,31 @@ public class ModelElementMarshaller
{
dataFlowJson.addProperty(ModelerConstants.IN_DATA_MAPPING_PROPERTY, true);
dataFlowJson.addProperty(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, false);
+ connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
+ dataMappingConnection.getDataSymbol().getElementOid());
+ connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_TYPE,
+ ModelerConstants.DATA);
+ connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_OID,
+ dataMappingConnection.getActivitySymbol().getElementOid());
+ connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
+ ModelerConstants.ACTIVITY_KEY);
+
}
else if (dataMapping.getDirection() == DirectionType.OUT_LITERAL)
{
dataFlowJson.addProperty(ModelerConstants.IN_DATA_MAPPING_PROPERTY, false);
dataFlowJson.addProperty(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, true);
+ // TODO - Currently API always assumes connectionJson.getSourceNode will be
+ // Data, to set Activity in sourceNode for OUT Mapping for data this code is
+ // placed here
+ connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
+ dataMappingConnection.getActivitySymbol().getElementOid());
+ connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_TYPE,
+ ModelerConstants.ACTIVITY_KEY);
+ connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_OID,
+ dataMappingConnection.getDataSymbol().getElementOid());
+ connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
+ ModelerConstants.DATA);
}
else
{
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
index 68a85f3..1bc6fc9 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js
@@ -662,15 +662,14 @@ define(
"stroke-dasharray" : "-"
});
- if (this.modelElement.inDataMapping) {
- this.path.attr("arrow-start", "block-wide-long");
- } else {
+ //For In-Mapping path will be from Data to Activity
+ //vice-versa for Out mapping
+ if (this.modelElement.inDataMapping
+ || this.modelElement.outDataMapping) {
this.path.attr("arrow-start", "none");
- }
-
- if (this.modelElement.outDataMapping) {
this.path.attr("arrow-end", "block-wide-long");
} else {
+ this.path.attr("arrow-start", "none");
this.path.attr("arrow-end", "none");
}
}