realizedFlow.setModuleName(executionModuleName);
realizedFlow.setModuleVersion(executionModuleVersion);
+ // retrieve execution spec
DefaultExecutionSpec executionSpec = null;
if (flowNode.hasProperty(SlcNames.SLC_SPEC)) {
Node executionSpecNode = flowNode.getProperty(SLC_SPEC)
Map<String, ExecutionSpecAttribute> attrs = readExecutionSpecAttributes(realizedFlowNode);
Map<String, Object> values = new HashMap<String, Object>();
for (String attrName : attrs.keySet()) {
- ExecutionSpecAttribute attr = attrs.get(attrName);
- Object value = attr.getValue();
- values.put(attrName,value);
+ 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);
+ } else {
+ ExecutionSpecAttribute attr = attrs.get(attrName);
+ Object value = attr.getValue();
+ values.put(attrName, value);
+ }
}
-
-// if(executionSpec!=null)
-// executionSpec.setAttributes(attrs);
+
+ // if(executionSpec!=null)
+ // executionSpec.setAttributes(attrs);
ExecutionFlowDescriptor efd = new ExecutionFlowDescriptor(flowName,
values, executionSpec);
realizedFlow.setFlowDescriptor(efd);
.isNodeType(SlcTypes.SLC_PRIMITIVE_SPEC_ATTRIBUTE)) {
String type = specAttrNode.getProperty(SLC_TYPE)
.getString();
+ Object value = null;
if (specAttrNode.hasProperty(SLC_VALUE)) {
String valueStr = specAttrNode.getProperty(SLC_VALUE)
.getString();
- Object value = PrimitiveUtils.convert(type, valueStr);
- PrimitiveSpecAttribute specAttr = new PrimitiveSpecAttribute(
- type, value);
- attrs.put(specAttrNode.getName(), specAttr);
+ value = PrimitiveUtils.convert(type, valueStr);
}
+ PrimitiveSpecAttribute specAttr = new PrimitiveSpecAttribute(
+ type, value);
+ attrs.put(specAttrNode.getName(), specAttr);
}
}