- if (attribute instanceof SimpleExecutionSpec
- && attribute.getIsParameter()) {
- values.put(key, executionFlow.getParameter(key));
+
+ if (executionFlow.isSetAsParameter(key)) {
+ Object value = executionFlow.getParameter(key);
+ if (attribute instanceof PrimitiveSpecAttribute) {
+ PrimitiveValue primitiveValue = new PrimitiveValue();
+ primitiveValue
+ .setType(((PrimitiveSpecAttribute) attribute)
+ .getType());
+ primitiveValue.setValue(value);
+ values.put(key, primitiveValue);
+ } else if (attribute instanceof RefSpecAttribute) {
+ RefValue refValue = new RefValue();
+ if (value instanceof ScopedObject) {
+ refValue.setLabel("RUNTIME "
+ + value.getClass().getName());
+ } else {
+ refValue.setLabel("STATIC "
+ + value.getClass().getName());
+ }
+ values.put(key, refValue);
+ } else {
+ throw new SlcException("Unkown spec attribute type "
+ + attribute.getClass());
+ }