| | |
| | | String s = new String(modelEditorSource, "utf-8"); |
| | | JSONObject editorJsonNode = JSONObject.parseObject(s); |
| | | JSONArray childShapes = editorJsonNode.getJSONArray("childShapes"); |
| | | for (Object childShape : childShapes) { |
| | | JSONObject nextJsonNode = (JSONObject) childShape; |
| | | JSONObject stencil = nextJsonNode.getJSONObject("stencil"); |
| | | String nodeType = stencil.getString(Constant.ID); |
| | | if (childShapes != null) { |
| | | for (Object childShape : childShapes) { |
| | | JSONObject nextJsonNode = (JSONObject) childShape; |
| | | JSONObject stencil = nextJsonNode.getJSONObject("stencil"); |
| | | String nodeType = stencil.getString(Constant.ID); |
| | | |
| | | if (!nodeType.equalsIgnoreCase("SequenceFlow")) { |
| | | continue; |
| | | if (!nodeType.equalsIgnoreCase("SequenceFlow")) { |
| | | continue; |
| | | } |
| | | |
| | | JSONObject properties = nextJsonNode.getJSONObject("properties"); |
| | | String etlCondition = properties.getString("conditionsequenceflow"); |
| | | etlCondition = etlCondition.replace("&&", "++"); |
| | | properties.put("conditionsequenceflow", etlCondition); |
| | | } |
| | | |
| | | JSONObject properties = nextJsonNode.getJSONObject("properties"); |
| | | String etlCondition = properties.getString("conditionsequenceflow"); |
| | | etlCondition = etlCondition.replace("&&", "++"); |
| | | properties.put("conditionsequenceflow", etlCondition); |
| | | } |
| | | |
| | | JsonNode jsonNode = objectMapper.readTree(editorJsonNode.toJSONString()); |
| | | modelNode.put("model", jsonNode); |
| | | |