- //log.info("Try convert placeholder " + placeholder);
- if (ExecutionContext.isExecuting())
- return ExecutionContext.getVariable(placeholder).toString();
- else if (DefaultExecutionSpec.isInFlowInitialization())
- return DefaultExecutionSpec.getInitializingFlowParameter(
- placeholder).toString();
- else
- return super.resolvePlaceholder(placeholder, props);
+ if ((executionScope != null) && (executionScope.hasExecutionContext())) {
+ // if we have an execution context, look there for the placeholder
+ return executionContext.getVariable(placeholder).toString();
+ }
+ else {
+ // TODO: check scope of the bean
+ // throw exception if trying to resolve placeholder on bean of scope singleton
+
+ if (instantiationManager.isInFlowInitialization()) {
+ String resolved = instantiationManager.getInitializingFlowParameter(
+ placeholder).toString();
+// log.info("Initialization placeholder resolution " + placeholder
+// + ">>" + resolved);
+ return resolved;
+ }
+ else {
+ // return super.resolvePlaceholder(placeholder, props);
+ throw new SlcException("Placeholder '" + placeholder
+ + "' can not be resolved outside of Flow Initialization or Flow Execution.");
+ }
+ }