+ // retrieve execution spec
+ DefaultExecutionSpec executionSpec = null;
+ if (flowNode.hasProperty(SlcNames.SLC_SPEC)) {
+ Node executionSpecNode = flowNode.getProperty(SLC_SPEC)
+ .getNode();
+ executionSpec = new DefaultExecutionSpec();
+ executionSpec.setBeanName(executionSpecNode.getProperty(
+ SLC_NAME).getString());
+ executionSpec
+ .setAttributes(readExecutionSpecAttributes(executionSpecNode));
+ }
+ // TODO: will with original attr
+ Map<String, ExecutionSpecAttribute> attrs = readExecutionSpecAttributes(realizedFlowNode);
+ Map<String, Object> values = new HashMap<String, Object>();
+ for (String attrName : attrs.keySet()) {
+ if (flowNode.hasNode(attrName)) {
+ // we assume this is a primitive
+ // since ref are not yet implemented
+ Node valueNode = flowNode.getNode(attrName);
+ String type = valueNode.getProperty(SLC_TYPE).getString();
+ String valueStr = valueNode.getProperty(SLC_VALUE)
+ .getString();
+ Object value = PrimitiveUtils.convert(type, valueStr);
+ values.put(attrName, value);
+ // Property prop = flowNode.getNode(attrName).getProperty(
+ // SLC_VALUE);
+ // // yes, this could be a switch... (patches welcome)
+ // if (prop.getType() == PropertyType.STRING)
+ // values.put(attrName, prop.getString());
+ // else if (prop.getType() == PropertyType.LONG)
+ // values.put(attrName, prop.getLong());
+ // else if (prop.getType() == PropertyType.DOUBLE)
+ // values.put(attrName, prop.getDouble());
+ // else if (prop.getType() == PropertyType.BOOLEAN)
+ // values.put(attrName, prop.getBoolean());
+ // else
+ // throw new SlcException("Unsupported value type "
+ // + PropertyType.nameFromValue(prop.getType()));
+ } else {
+ ExecutionSpecAttribute attr = attrs.get(attrName);
+ Object value = attr.getValue();
+ values.put(attrName, value);
+ }
+ }
+
+ // if(executionSpec!=null)
+ // executionSpec.setAttributes(attrs);