X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FDefaultExecutionFlowDescriptorConverter.java;h=0e51cfeaa9b959b624f9c6e815e73c3334d9d7b2;hb=2e5b26763f0e44d4be7c302aebcb759726de4d1f;hp=d8429d192d1d9675516d47a6365e0e199426f887;hpb=9f0c9b3c49a556b671e6b1b6d88cf83357d1f028;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java index d8429d192..0e51cfeaa 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java @@ -28,7 +28,7 @@ public class DefaultExecutionFlowDescriptorConverter implements public final static String REF_VALUE_TYPE_BEAN_NAME = "beanName"; /** Workaround for https://www.spartadn.com/bugzilla/show_bug.cgi?id=206 */ - private final static String REF_VALUE_IS_FROZEN = "__frozen"; + private final static String REF_VALUE_IS_FROZEN = "[internal]"; private final static Log log = LogFactory .getLog(DefaultExecutionFlowDescriptorConverter.class); @@ -39,11 +39,16 @@ public class DefaultExecutionFlowDescriptorConverter implements ExecutionFlowDescriptor executionFlowDescriptor) { Map values = executionFlowDescriptor.getValues(); Map convertedValues = new HashMap(); + ExecutionSpec executionSpec = executionFlowDescriptor + .getExecutionSpec(); - if (values != null) { + if (executionSpec == null) + log.warn("Execution spec is null for " + executionFlowDescriptor); + + if (values != null && executionSpec != null) { values: for (String key : values.keySet()) { - ExecutionSpecAttribute attribute = executionFlowDescriptor - .getExecutionSpec().getAttributes().get(key); + ExecutionSpecAttribute attribute = executionSpec + .getAttributes().get(key); if (attribute.getIsFrozen()) continue values; @@ -86,7 +91,7 @@ public class DefaultExecutionFlowDescriptorConverter implements Assert.notNull(executionSpec.getName()); Map values = new TreeMap(); - attrs: for (String key : executionSpec.getAttributes().keySet()) { + for (String key : executionSpec.getAttributes().keySet()) { ExecutionSpecAttribute attribute = executionSpec .getAttributes().get(key); @@ -172,12 +177,14 @@ public class DefaultExecutionFlowDescriptorConverter implements } } if (ref == null) { - if (log.isTraceEnabled()) - log.warn("Cannot define reference for ref spec attribute " + log.warn("Cannot define reference for ref spec attribute " + + key + " in " + executionFlow + " (" + rsa + ")." + + " If it is an inner bean consider put it frozen."); + } else { + if (log.isDebugEnabled()) + log.debug(ref + " is the reference for ref spec attribute " + key + " in " + executionFlow + " (" + rsa + ")"); - } else if (log.isDebugEnabled()) - log.debug(ref + " is the reference for ref spec attribute " - + key + " in " + executionFlow + " (" + rsa + ")"); + } refValue.setRef(ref); } return refValue;