- public void afterPropertiesSet() throws Exception {
- log.debug("Register: " + executionSpecs.size() + " specs");
- for (ExecutionSpec spec : executionSpecs) {
- log.debug(spec);
- Map<String, ExecutionSpecAttribute> attributes = spec
- .getAttributes();
- log.debug("Spec attributes: ");
- for (String key : attributes.keySet()) {
- log.debug(" " + key + "\t" + attributes.get(key));
+ GenericBeanFactoryAccessor accessor = new GenericBeanFactoryAccessor(
+ applicationContext);
+ Map<String, ExecutionFlow> executionFlows = accessor
+ .getBeansOfType(ExecutionFlow.class);
+
+ for (String name : executionFlows.keySet()) {
+ ExecutionFlow executionFlow = executionFlows.get(name);
+
+ Assert.notNull(executionFlow.getName());
+ Assert.state(name.equals(executionFlow.getName()));
+
+ ExecutionSpec executionSpec = executionFlow.getExecutionSpec();
+ Assert.notNull(executionSpec);
+ Assert.notNull(executionSpec.getName());
+
+ Map<String, Object> values = new HashMap<String, Object>();
+ for (String key : executionSpec.getAttributes().keySet()) {
+ ExecutionSpecAttribute attribute = executionSpec
+ .getAttributes().get(key);
+ if (attribute instanceof SimpleExecutionSpec
+ && attribute.getIsParameter()) {
+ values.put(key, executionFlow.getParameter(key));
+ }