summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-08-06 06:30:11 (EDT)
committerManik Kishore2012-08-07 05:02:30 (EDT)
commita63b7bc81c0f1247c4233e89d21047b3e6752c96 (patch)
tree52d1eabd4b775ab2d0fec0b1bfe2d8a68688bc0a
parentc31ffdce2acb4d1c4971a828fe77ce8e9d7b9339 (diff)
downloadorg.eclipse.stardust.ui.web-a63b7bc81c0f1247c4233e89d21047b3e6752c96.zip
org.eclipse.stardust.ui.web-a63b7bc81c0f1247c4233e89d21047b3e6752c96.tar.gz
org.eclipse.stardust.ui.web-a63b7bc81c0f1247c4233e89d21047b3e6752c96.tar.bz2
Jira-ID: CRNT-25677
1)Added code to parse JSON responce for Data connections in ModelElementMarshaller.java 2)Changed the id attribute for DataSymbol 3)Added code to prevent cyclic references in m_commandsController.js git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58183 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/ConnectionCommandHandler.java17
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java4
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java306
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js11
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js2
5 files changed, 90 insertions, 250 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 ef9d4fa..5a6864a 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);
+ maxOid, true);
}
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);
+ maxOid, false);
}
else
{
@@ -370,7 +370,7 @@ public class ConnectionCommandHandler
*/
private void createDataFlowConnection(JsonObject connectionJson,
ProcessDefinitionType processDefinition, ActivitySymbolType activitySymbol,
- DataSymbolType dataSymbol, long maxOid)
+ DataSymbolType dataSymbol, long maxOid, boolean inDataMapping)
{
System.out.println("Create data flow connection");
@@ -386,9 +386,16 @@ public class ConnectionCommandHandler
dataMapping.setId(data.getId());
dataMapping.setName(data.getName());
- dataMapping.setDirection(DirectionType.get(DirectionType.OUT));
- dataMapping.setData(data);
+ if (inDataMapping)
+ {
+ dataMapping.setDirection(DirectionType.get(DirectionType.IN));
+ }
+ else
+ {
+ dataMapping.setDirection(DirectionType.get(DirectionType.OUT));
+ }
+ dataMapping.setData(data);
// TODO Incomplete
// if (activity.getImplementation().getLiteral().equals("Application"))
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java
index 1a0abe0..63e5287 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/GatewayCommandHandler.java
@@ -15,6 +15,8 @@ import static org.eclipse.stardust.engine.api.model.PredefinedConstants.ADMINIST
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newManualActivity;
import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractInt;
import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractString;
+import static org.eclipse.stardust.ui.web.modeler.service.ModelService.HEIGHT_PROPERTY;
+import static org.eclipse.stardust.ui.web.modeler.service.ModelService.WIDTH_PROPERTY;
import static org.eclipse.stardust.ui.web.modeler.service.ModelService.X_PROPERTY;
import static org.eclipse.stardust.ui.web.modeler.service.ModelService.Y_PROPERTY;
@@ -73,6 +75,8 @@ public class GatewayCommandHandler
- parentLaneSymbol.getYPos() - ModelerConstants.POOL_LANE_MARGIN
- ModelerConstants.POOL_SWIMLANE_TOP_BOX_HEIGHT);
gatewaySymbol.setActivity(gateway);
+ gatewaySymbol.setWidth(extractInt(request, WIDTH_PROPERTY));
+ gatewaySymbol.setHeight(extractInt(request, HEIGHT_PROPERTY));
gateway.getActivitySymbols().add(gatewaySymbol);
processDefinition.getDiagram().get(0).getActivitySymbol().add(gatewaySymbol);
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 8248f0a..128d744 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
@@ -25,8 +25,10 @@ import org.eclipse.stardust.model.xpdl.carnot.ApplicationType;
import org.eclipse.stardust.model.xpdl.carnot.AttributeType;
import org.eclipse.stardust.model.xpdl.carnot.ContextType;
import org.eclipse.stardust.model.xpdl.carnot.DataMappingConnectionType;
+import org.eclipse.stardust.model.xpdl.carnot.DataMappingType;
import org.eclipse.stardust.model.xpdl.carnot.DataSymbolType;
import org.eclipse.stardust.model.xpdl.carnot.DataType;
+import org.eclipse.stardust.model.xpdl.carnot.DirectionType;
import org.eclipse.stardust.model.xpdl.carnot.EndEventSymbol;
import org.eclipse.stardust.model.xpdl.carnot.GatewaySymbol;
import org.eclipse.stardust.model.xpdl.carnot.IIdentifiableModelElement;
@@ -369,208 +371,23 @@ public class ModelElementMarshaller
for (DataMappingConnectionType dataMappingConnection : poolSymbol.getDataMappingConnection())
{
- JsonObject connectionJson = new JsonObject();
-
- 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,
- mapAnchorOrientation(dataMappingConnection.getTargetAnchor()));
-
- JsonObject dataFlowJson = new JsonObject();
- connectionJson.add(ModelerConstants.MODEL_ELEMENT_PROPERTY, dataFlowJson);
-
- dataFlowJson.addProperty(ModelerConstants.TYPE_PROPERTY,
- ModelerConstants.DATA_FLOW_LITERAL);
- dataFlowJson.addProperty(ModelerConstants.ID_PROPERTY, ""
- + dataMappingConnection.getElementOid());
-
- // TODO Needed!
-// if (dataMappingC.getDirection() == DirectionType.IN_LITERAL)
-// {
-// dataFlow.put(ModelerConstants.IN_DATA_MAPPING_PROPERTY, true);
-// dataFlow.put(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, false);
-// }
-// else if (dataMapping.getDirection() == DirectionType.OUT_LITERAL)
-// {
-// dataFlow.put(ModelerConstants.IN_DATA_MAPPING_PROPERTY, false);
-// dataFlow.put(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, true);
-// }
-// else
-// {
-// dataFlow.put(ModelerConstants.IN_DATA_MAPPING_PROPERTY, true);
-// dataFlow.put(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, true);
-// }
-
- dataFlowJson.addProperty(ModelerConstants.DATA_FULL_ID_PROPERTY, MBFacade.createFullId(ModelUtils.findContainingModel(dataMappingConnection.getDataSymbol().getData()),
- dataMappingConnection.getDataSymbol().getData()));
- dataFlowJson.addProperty(ModelerConstants.ACTIVITY_ID_PROPERTY,
- dataMappingConnection.getActivitySymbol().getActivity().getId());
+ JsonObject connectionJson = toDataMappingConnectionType(dataMappingConnection);
connectionsJson.add(
- extractString(dataFlowJson, ModelerConstants.ID_PROPERTY),
- connectionJson);
+ extractString(
+ connectionJson.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY),
+ ModelerConstants.ID_PROPERTY), connectionJson);
}
// Transitions
for (TransitionConnectionType transitionConnection : poolSymbol.getTransitionConnection())
{
- JsonObject connectionJson = new JsonObject();
- JsonObject modelElementJson = new JsonObject();
-
- // Common settings
-
- connectionJson.addProperty(
- ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY,
- mapAnchorOrientation(transitionConnection.getSourceAnchor()));
- connectionJson.addProperty(
- ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY,
- mapAnchorOrientation(transitionConnection.getTargetAnchor()));
-
- if (transitionConnection.getTransition() != null)
- {
- TransitionType transition = transitionConnection.getTransition();
-
- connectionJson.addProperty(ModelerConstants.OID_PROPERTY,
- transitionConnection.getElementOid());
- connectionJson.add(ModelerConstants.MODEL_ELEMENT_PROPERTY,
- modelElementJson);
-
- modelElementJson.addProperty(ModelerConstants.TYPE_PROPERTY,
- ModelerConstants.CONTROL_FLOW_LITERAL);
- modelElementJson.addProperty(ModelerConstants.ID_PROPERTY,
- transition.getId());
-
- if (transition.getCondition().equals("CONDITION"))
- {
- modelElementJson.addProperty(
- ModelerConstants.CONDITION_EXPRESSION_PROPERTY,
- (String) transition.getExpression().getMixed().getValue(0));
- modelElementJson.addProperty(ModelerConstants.OTHERWISE_PROPERTY, false);
- }
- else
- {
- modelElementJson.addProperty(ModelerConstants.OTHERWISE_PROPERTY, true);
- }
-
- loadDescription(modelElementJson, transition);
- loadAttributes(transition, modelElementJson);
-
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
- transition.getFrom().getActivitySymbols().get(0).getElementOid());
-
- // TODO Hack to identify gateways
-
- if (transition.getFrom().getId().toLowerCase().startsWith("gateway"))
- {
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_TYPE,
- ModelerConstants.GATEWAY);
- }
- else
- {
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_TYPE,
- ModelerConstants.ACTIVITY_KEY);
- }
-
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_OID,
- transition.getTo().getActivitySymbols().get(0).getElementOid());
-
- if (transition.getTo().getId().toLowerCase().startsWith("gateway"))
- {
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
- ModelerConstants.GATEWAY);
- connectionJson.remove(ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY);
- connectionJson.addProperty(
- ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY,
- ModelerConstants.NORTH_KEY);
- }
- else
- {
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
- ModelerConstants.ACTIVITY_KEY);
- }
-
- connectionsJson.add(
- extractString(modelElementJson, ModelerConstants.ID_PROPERTY),
- connectionJson);
- }
- else if (transitionConnection.getSourceNode() instanceof StartEventSymbol)
- {
-
- connectionJson.addProperty(ModelerConstants.OID_PROPERTY,
- transitionConnection.getElementOid());
- connectionJson.add(ModelerConstants.MODEL_ELEMENT_PROPERTY,
- modelElementJson);
-
- modelElementJson.addProperty(ModelerConstants.TYPE_PROPERTY,
- ModelerConstants.CONTROL_FLOW_LITERAL);
- modelElementJson.addProperty(
- ModelerConstants.ID_PROPERTY,
- transitionConnection.getSourceNode().getElementOid()
- + "-"
- + ((ActivitySymbolType) transitionConnection.getTargetActivitySymbol()).getActivity()
- .getId());
-
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
- transitionConnection.getSourceNode().getElementOid());
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_TYPE,
- ModelerConstants.EVENT_KEY);
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_OID,
- transitionConnection.getTargetActivitySymbol().getElementOid());
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
- ModelerConstants.ACTIVITY_KEY);
- connectionsJson.add(
- extractString(modelElementJson, ModelerConstants.ID_PROPERTY),
- connectionJson);
- }
- else if (transitionConnection.getTargetNode() instanceof EndEventSymbol)
- {
- connectionJson.addProperty(ModelerConstants.OID_PROPERTY,
- transitionConnection.getElementOid());
- connectionJson.add(ModelerConstants.MODEL_ELEMENT_PROPERTY,
- modelElementJson);
- modelElementJson.addProperty(ModelerConstants.TYPE_PROPERTY,
- ModelerConstants.CONTROL_FLOW_LITERAL);
- modelElementJson.addProperty(
- ModelerConstants.ID_PROPERTY,
- ((ActivitySymbolType) transitionConnection.getSourceActivitySymbol()).getActivity()
- .getId()
- + "-"
- + String.valueOf(transitionConnection.getTargetNode()
- .getElementOid()));
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
- transitionConnection.getSourceActivitySymbol().getElementOid());
- connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_TYPE,
- ModelerConstants.ACTIVITY_KEY);
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_OID,
- String.valueOf(transitionConnection.getTargetNode().getElementOid()));
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
- ModelerConstants.EVENT_KEY);
- connectionsJson.add(
- extractString(modelElementJson, ModelerConstants.ID_PROPERTY),
- connectionJson);
-
- // For end event symbol the anchorpoint orientation is set to "bottom", in
- // the eclipse modeler.
- // This causes wrong routing of the the connector.
- // Hence overriding the property with "center" / or "undefined"
- connectionJson.remove(ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY);
- connectionJson.addProperty(
- ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY,
- ModelerConstants.UNDEFINED_ORIENTATION_KEY);
- }
+ JsonObject connectionJson = toTransitionType(transitionConnection);
+ connectionsJson.add(
+ extractString(
+ connectionJson.getAsJsonObject(ModelerConstants.MODEL_ELEMENT_PROPERTY),
+ ModelerConstants.ID_PROPERTY), connectionJson);
}
}
@@ -1066,57 +883,60 @@ public class ModelElementMarshaller
* @param dataMappingConnection
* @return
*/
- public JsonObject toDataMappingConnectionType(DataMappingConnectionType dataMappingConnection)
+ public JsonObject toDataMappingConnectionType(
+ DataMappingConnectionType dataMappingConnection)
{
- JsonObject connectionJson = new JsonObject();
+ JsonObject connectionJson = new JsonObject();
- 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,
- mapAnchorOrientation(dataMappingConnection.getTargetAnchor()));
-
- JsonObject dataFlowJson = new JsonObject();
- connectionJson.add(ModelerConstants.MODEL_ELEMENT_PROPERTY, dataFlowJson);
-
- dataFlowJson.addProperty(ModelerConstants.TYPE_PROPERTY,
- ModelerConstants.DATA_FLOW_LITERAL);
- dataFlowJson.addProperty(ModelerConstants.ID_PROPERTY, ""
- + dataMappingConnection.getElementOid());
-
- // TODO Needed!
-// if (dataMappingC.getDirection() == DirectionType.IN_LITERAL)
-// {
-// dataFlow.put(ModelerConstants.IN_DATA_MAPPING_PROPERTY, true);
-// dataFlow.put(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, false);
-// }
-// else if (dataMapping.getDirection() == DirectionType.OUT_LITERAL)
-// {
-// dataFlow.put(ModelerConstants.IN_DATA_MAPPING_PROPERTY, false);
-// dataFlow.put(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, true);
-// }
-// else
-// {
-// dataFlow.put(ModelerConstants.IN_DATA_MAPPING_PROPERTY, true);
-// dataFlow.put(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, true);
-// }
-
- dataFlowJson.addProperty(ModelerConstants.DATA_FULL_ID_PROPERTY, MBFacade.createFullId(ModelUtils.findContainingModel(dataMappingConnection.getDataSymbol().getData()),
- dataMappingConnection.getDataSymbol().getData()));
- dataFlowJson.addProperty(ModelerConstants.ACTIVITY_ID_PROPERTY,
- dataMappingConnection.getActivitySymbol().getActivity().getId());
- return connectionJson;
+ 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,
+ mapAnchorOrientation(dataMappingConnection.getTargetAnchor()));
+
+ JsonObject dataFlowJson = new JsonObject();
+ connectionJson.add(ModelerConstants.MODEL_ELEMENT_PROPERTY, dataFlowJson);
+
+ dataFlowJson.addProperty(ModelerConstants.TYPE_PROPERTY,
+ ModelerConstants.DATA_FLOW_LITERAL);
+ dataFlowJson.addProperty(ModelerConstants.ID_PROPERTY,
+ "" + dataMappingConnection.getElementOid());
+ ActivityType activity = dataMappingConnection.getActivitySymbol().getActivity();
+ for (DataMappingType dataMapping : activity.getDataMapping())
+ {
+ if (dataMapping.getDirection() == DirectionType.IN_LITERAL)
+ {
+ dataFlowJson.addProperty(ModelerConstants.IN_DATA_MAPPING_PROPERTY, true);
+ dataFlowJson.addProperty(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, false);
+ }
+ else if (dataMapping.getDirection() == DirectionType.OUT_LITERAL)
+ {
+ dataFlowJson.addProperty(ModelerConstants.IN_DATA_MAPPING_PROPERTY, false);
+ dataFlowJson.addProperty(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, true);
+ }
+ else
+ {
+ dataFlowJson.addProperty(ModelerConstants.IN_DATA_MAPPING_PROPERTY, true);
+ dataFlowJson.addProperty(ModelerConstants.OUT_DATA_MAPPING_PROPERTY, true);
+ }
+
+ }
+
+ dataFlowJson.addProperty(ModelerConstants.DATA_FULL_ID_PROPERTY,
+ MBFacade.createFullId(
+ ModelUtils.findContainingModel(dataMappingConnection.getDataSymbol()
+ .getData()), dataMappingConnection.getDataSymbol().getData()));
+ dataFlowJson.addProperty(ModelerConstants.ACTIVITY_ID_PROPERTY, activity.getId());
+ return connectionJson;
}
/**
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js
index 5ae5095..f60e22c 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_commandsController.js
@@ -176,6 +176,7 @@ define(
CommandsController.prototype.submitCommand = function(command) {
var url = m_communicationController.getEndpointUrl()
+ command.path;
+ var obj = [];
if (command.operation != null) {
url += "/" + command.operation;
@@ -217,7 +218,15 @@ define(
{
"url" : url
},
- JSON.stringify(command),
+ // Added to remove any cyclic reference
+ JSON.stringify(command, function(key, val) {
+ if (typeof val == "object") {
+ if (obj.indexOf(val) >= 0)
+ return undefined;
+ obj.push(val);
+ }
+ return val;
+ }),
new function() {
return {
"success" : function(command) {
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js
index 96b597f..3780bac 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_dataSymbol.js
@@ -24,7 +24,7 @@ define(
// TODO Need to create data before!
- dataSymbol.dataId = "Data" + index;
+ dataSymbol.dataId = "Data_" + index;
dataSymbol.dataName = "Data " + index;
dataSymbol.dataFullId = m_model.getFullId(diagram.model,
"Data" + index);