summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-08-29 01:58:19 (EDT)
committer Stephan Born2012-08-29 01:58:19 (EDT)
commit903bfd8fcb4dbcac0f59f11cb8daa0b7422de38d (patch)
treecc0efaf2656dcea2697a34e4126b40de7f2657c7
parent9cc03468a837b7385194fef9870bd4b53a161b9d (diff)
downloadorg.eclipse.stardust.ui.web-903bfd8fcb4dbcac0f59f11cb8daa0b7422de38d.zip
org.eclipse.stardust.ui.web-903bfd8fcb4dbcac0f59f11cb8daa0b7422de38d.tar.gz
org.eclipse.stardust.ui.web-903bfd8fcb4dbcac0f59f11cb8daa0b7422de38d.tar.bz2
CRNT-25835
1)Added code to identify source symbol type when TargetSymbol is EndEvent in toTransitionConnectionJson() in ModelElementMarshaller.java git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58744 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java68
1 files changed, 37 insertions, 31 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 f505b51..4a93cb4 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
@@ -72,7 +72,7 @@ public abstract class ModelElementMarshaller
private ModelBuilderFacade modelBuilderFacade;
/**
- *
+ *
* @param modelElement
* @return
*/
@@ -208,21 +208,21 @@ public abstract class ModelElementMarshaller
ModelerConstants.PROVIDES_PROCESS_INTERFACE_KEY);
JsonObject formalParametersJson = new JsonObject();
-
+
processJson.add(ModelerConstants.FORMAL_PARAMETERS_PROPERTY,
formalParametersJson);
-
+
for (FormalParameterType formalParameter : processDefinition.getFormalParameters()
.getFormalParameter())
{
JsonObject formalParameterJson = new JsonObject();
-
+
formalParametersJson.add(formalParameter.getId(), formalParameterJson);
-
+
formalParameterJson.addProperty(ModelerConstants.ID_PROPERTY, formalParameter.getId());
formalParameterJson.addProperty(ModelerConstants.NAME_PROPERTY, formalParameter.getName());
//formalParameterJson.addProperty(ModelerConstants.DIRECTION_PROPERTY, formalParameter.getMode());
-
+
System.out.println(formalParameter);
System.out.println(formalParameter.getDataType());
System.out.println(formalParameter.getMode());
@@ -290,7 +290,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param laneSymbol
* @return
*/
@@ -481,7 +481,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param activity
* @return
*/
@@ -613,7 +613,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param activitySymbol
* @return
*/
@@ -703,7 +703,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param startEventSymbol
* @return
*/
@@ -758,7 +758,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param startEventSymbol
* @return
*/
@@ -812,7 +812,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param data
* @return
*/
@@ -913,7 +913,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param startEventSymbol
* @return
*/
@@ -1180,7 +1180,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param dataMappingConnection
* @return
*/
@@ -1268,7 +1268,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param transitionConnection
* @return
*/
@@ -1383,23 +1383,29 @@ public abstract class ModelElementMarshaller
else if (transitionConnection.getTargetNode() instanceof EndEventSymbol)
{
modelElementJson = new JsonObject();
-
+ String activityId = ((ActivitySymbolType) transitionConnection.getSourceActivitySymbol()).getActivity()
+ .getId();
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()));
+ modelElementJson.addProperty(ModelerConstants.ID_PROPERTY, activityId + "-"
+ + 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);
+ // Added to identify the Activity Type for source Symbol
+ if (activityId.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,
String.valueOf(transitionConnection.getTargetNode().getElementOid()));
connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
@@ -1418,7 +1424,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param transitionConnection
* @return
*/
@@ -1765,7 +1771,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param orientation
* @return
*/
@@ -1796,7 +1802,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param modelElementJson
* @param element
*/
@@ -1815,7 +1821,7 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* @param element
* @param json
* @throws JSONException
@@ -1840,9 +1846,9 @@ public abstract class ModelElementMarshaller
}
/**
- *
+ *
* TODO From DynamicConnectionCommand. Refactor?
- *
+ *
* @param activity
* @return
*/