summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-08-29 02:29:49 (EDT)
committerStephan Born2012-08-29 02:29:49 (EDT)
commit409ab24c5a262fe35f1abf938bac4e0d7f4ad072 (patch)
tree3393b5fec1f82094bd78db1c4d1a8f0b766cc4f6
parent62a809cb6d9cf6c7e4c382e3bdd2945261766b3a (diff)
downloadorg.eclipse.stardust.ui.web-409ab24c5a262fe35f1abf938bac4e0d7f4ad072.zip
org.eclipse.stardust.ui.web-409ab24c5a262fe35f1abf938bac4e0d7f4ad072.tar.gz
org.eclipse.stardust.ui.web-409ab24c5a262fe35f1abf938bac4e0d7f4ad072.tar.bz2
CRNT-25835
1)Added code to identify source symbol type when SourceSymbol is StartEvent in toTransitionConnectionJson() in ModelElementMarshaller.java git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58748 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementMarshaller.java27
1 files changed, 17 insertions, 10 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 4a93cb4..0058bb2 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
@@ -1357,19 +1357,16 @@ public abstract class ModelElementMarshaller
else if (transitionConnection.getSourceNode() instanceof StartEventSymbol)
{
modelElementJson = new JsonObject();
-
+ String activityId = ((ActivitySymbolType) transitionConnection.getTargetActivitySymbol()).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,
- transitionConnection.getSourceNode().getElementOid()
- + "-"
- + ((ActivitySymbolType) transitionConnection.getTargetActivitySymbol()).getActivity()
- .getId());
+ modelElementJson.addProperty(ModelerConstants.ID_PROPERTY,
+ transitionConnection.getSourceNode().getElementOid() + "-" + activityId);
connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
transitionConnection.getSourceNode().getElementOid());
@@ -1377,8 +1374,18 @@ public abstract class ModelElementMarshaller
ModelerConstants.EVENT_KEY);
connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_OID,
transitionConnection.getTargetActivitySymbol().getElementOid());
- connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
- ModelerConstants.ACTIVITY_KEY);
+ // Added to identify the Gateway for target Symbol
+ if (activityId.toLowerCase().startsWith("gateway"))
+ {
+ connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
+ ModelerConstants.GATEWAY);
+ }
+ else
+ {
+ connectionJson.addProperty(ModelerConstants.TO_MODEL_ELEMENT_TYPE,
+ ModelerConstants.ACTIVITY_KEY);
+ }
+
}
else if (transitionConnection.getTargetNode() instanceof EndEventSymbol)
{
@@ -1394,7 +1401,7 @@ public abstract class ModelElementMarshaller
+ String.valueOf(transitionConnection.getTargetNode().getElementOid()));
connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_OID,
transitionConnection.getSourceActivitySymbol().getElementOid());
- // Added to identify the Activity Type for source Symbol
+ // Added to identify the Gateway for source Symbol
if (activityId.toLowerCase().startsWith("gateway"))
{
connectionJson.addProperty(ModelerConstants.FROM_MODEL_ELEMENT_TYPE,