import org.argeo.slc.SlcException;
import org.argeo.slc.process.Executable;
import org.argeo.slc.test.ExecutableTestRun;
import org.argeo.slc.SlcException;
import org.argeo.slc.process.Executable;
import org.argeo.slc.test.ExecutableTestRun;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.validation.MapBindingResult;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.validation.MapBindingResult;
-public class SimpleExecutionFlow implements ExecutionFlow, InitializingBean {
- private static ThreadLocal<ExecutionFlow> executionFlow = new ThreadLocal<ExecutionFlow>();
-
- private ExecutionSpec executionSpec;
+public class SimpleExecutionFlow implements ExecutionFlow, InitializingBean,
+ BeanNameAware {
+ private ExecutionSpec executionSpec = new SimpleExecutionSpec();
+ private String name = null;
private Map<String, Object> attributes = new HashMap<String, Object>();
private List<Executable> executables = new ArrayList<Executable>();
private final String uuid = UUID.randomUUID().toString();
public void execute() {
private Map<String, Object> attributes = new HashMap<String, Object>();
private List<Executable> executables = new ArrayList<Executable>();
private final String uuid = UUID.randomUUID().toString();
public void execute() {
if (executionSpecAttr instanceof RefSpecAttribute) {
RefSpecAttribute rsa = (RefSpecAttribute) executionSpecAttr;
Class targetClass = rsa.getTargetClass();
if (executionSpecAttr instanceof RefSpecAttribute) {
RefSpecAttribute rsa = (RefSpecAttribute) executionSpecAttr;
Class targetClass = rsa.getTargetClass();
- if (!targetClass.isAssignableFrom(obj.getClass()))
- errors.rejectValue(key,
- "Not compatible with target class "
- + targetClass);
+ if (!targetClass.isAssignableFrom(obj.getClass())) {
+ errors.reject(key
+ + " not compatible with target class "
+ + targetClass);
+ }