summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-09-05 03:09:22 (EDT)
committer Stephan Born2012-09-05 03:09:22 (EDT)
commitce78e4209695e531a4d75a6446218149b2eb41b2 (patch)
tree8e30758f396b80ee649cbf04859f1892e34cfbfd
parent02eed10678895c61c7f385eb73e2a338f0840d7b (diff)
downloadorg.eclipse.stardust.ui.web-ce78e4209695e531a4d75a6446218149b2eb41b2.zip
org.eclipse.stardust.ui.web-ce78e4209695e531a4d75a6446218149b2eb41b2.tar.gz
org.eclipse.stardust.ui.web-ce78e4209695e531a4d75a6446218149b2eb41b2.tar.bz2
CRNT-26070
1)Made changes in ConnectionCommandHandler.java to get the dataMapping type from modelElement. 2)Added code to set inDataMapping/outDataMapping in setSecondAnchorPointNoComplete() for dataFlow git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58921 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java9
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js48
2 files changed, 52 insertions, 5 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 010527e..46caba9 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
@@ -124,7 +124,7 @@ public class ConnectionCommandHandler
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID)),
getModelBuilderFacade().findDataSymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
- maxOid, false);
+ maxOid);
}
else
{
@@ -188,7 +188,7 @@ public class ConnectionCommandHandler
extractLong(request, ModelerConstants.TO_MODEL_ELEMENT_OID)),
getModelBuilderFacade().findDataSymbol(processDefinition.getDiagram().get(0),
extractLong(request, ModelerConstants.FROM_MODEL_ELEMENT_OID)),
- maxOid, true);
+ maxOid);
}
else
{
@@ -379,13 +379,16 @@ public class ConnectionCommandHandler
*/
private void createDataFlowConnection(JsonObject connectionJson,
ProcessDefinitionType processDefinition, ActivitySymbolType activitySymbol,
- DataSymbolType dataSymbol, long maxOid, boolean inDataMapping)
+ DataSymbolType dataSymbol, long maxOid)
{
System.out.println("Create data flow connection");
DataType data = dataSymbol.getData();
ActivityType activity = activitySymbol.getActivity();
+ boolean inDataMapping = extractBoolean(
+ connectionJson.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY),
+ ModelerConstants.IN_DATA_MAPPING_PROPERTY);
DataMappingType dataMapping = AbstractElementBuilder.F_CWM.createDataMappingType();
DataMappingConnectionType dataMappingConnection = AbstractElementBuilder.F_CWM.createDataMappingConnectionType();
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 5cff4e6..e5ef4a6 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
@@ -348,6 +348,14 @@ define(
this.modelElement = m_dataFlow.createDataFlow(
this.diagram.process, data, activity);
+ if (this.fromModelElementType == m_constants.DATA) {
+ this.modelElement.inDataMapping = true;
+ this.modelElement.outDataMapping = false;
+ } else {
+ this.modelElement.inDataMapping = false;
+ this.modelElement.outDataMapping = true;
+ }
+
this.propertiesPanel = m_dataFlowPropertiesPanel
.getInstance();
} else {
@@ -379,6 +387,21 @@ define(
*/
Connection.prototype.setSecondAnchorPoint = function(
anchorPoint, sync) {
+ /*if (this.isDataFlow()) {
+ if (this.fromAnchorPoint.symbol.type == m_constants.DATA_SYMBOL) {
+ var dataSymbol = this.fromAnchorPoint.symbol;
+ var activity = this.toAnchorPoint.symbol;
+ } else {
+ var dataSymbol = this.toAnchorPoint.symbol;
+ var activity = this.fromAnchorPoint.symbol;
+ }
+ for ( var n in dataSymbol.connections) {
+ if (dataSymbol.connections[n].oid
+ && (dataSymbol.connections[n].fromAnchorPoint.symbol.oid == activity.oid || dataSymbol.connections[n].toAnchorPoint.symbol.oid)) {
+
+ }
+ }
+ }*/
this.setSecondAnchorPointNoComplete(anchorPoint);
if (this.toAnchorPoint.symbol != null) {
@@ -1354,13 +1377,34 @@ define(
m_messageDisplay
.showErrorMessage("Only in sequence flow connections are allowed on End Events.");
return false;
- } else if (fromAnchorPoint.symbol.connections.length > 1) {
+ } else if (null != toAnchorPoint
+ && toAnchorPoint.symbol.type == m_constants.DATA_SYMBOL) {
+ m_messageDisplay
+ .showErrorMessage("Data connections/associations are not supported for symbol.");
+ return false;
+ }else if (fromAnchorPoint.symbol.connections.length > 1) {
// Start Event can have only one OUT connection
m_messageDisplay
.showErrorMessage("No further connection allowed for this Event.");
return false;
}
- } else if ((toAnchorPoint != null && toAnchorPoint.symbol.type == m_constants.EVENT_SYMBOL)) {
+ } else if (fromAnchorPoint.symbol.type == m_constants.DATA_SYMBOL) {
+ if (null != toAnchorPoint
+ && (toAnchorPoint.symbol.type == m_constants.GATEWAY_SYMBOL || toAnchorPoint.symbol.type == m_constants.EVENT_SYMBOL)) {
+ m_messageDisplay
+ .showErrorMessage("Data connections/associations are not supported for symbol.");
+ return false;
+ }
+ }
+ else if (fromAnchorPoint.symbol.type == m_constants.GATEWAY_SYMBOL) {
+ if (null != toAnchorPoint
+ && toAnchorPoint.symbol.type == m_constants.DATA_SYMBOL) {
+ m_messageDisplay
+ .showErrorMessage("Data connections/associations are not supported for symbol.");
+ return false;
+ }
+ }
+ else if ((toAnchorPoint != null && toAnchorPoint.symbol.type == m_constants.EVENT_SYMBOL)) {
// Check for IN connections on Start Event
if (toAnchorPoint.symbol.modelElement.eventType == m_constants.START_EVENT_TYPE) {
m_messageDisplay