1 package org
.argeo
.slc
.executionflow
;
3 import java
.util
.ArrayList
;
4 import java
.util
.HashMap
;
9 import org
.apache
.commons
.lang
.math
.RandomUtils
;
10 import org
.argeo
.slc
.process
.Executable
;
11 import org
.argeo
.slc
.test
.ExecutableTestRun
;
12 import org
.springframework
.beans
.factory
.InitializingBean
;
14 public class SimpleExecutionFlow
implements ExecutionFlow
, InitializingBean
{
15 private static ThreadLocal
<ExecutionFlow
> executionFlow
= new ThreadLocal
<ExecutionFlow
>();
17 private ExecutionSpec executionSpec
;
18 private Map
<String
, Object
> attributes
= new HashMap
<String
, Object
>();
19 private List
<Executable
> executables
= new ArrayList
<Executable
>();
21 private final String uuid
= UUID
.randomUUID().toString();
23 public void execute() {
25 executionFlow
.set(this);
26 for (Executable executable
: executables
) {
30 executionFlow
.set(null);
34 public void afterPropertiesSet() throws Exception
{
35 // TODO Auto-generated method stub
39 public void setExecutables(List
<Executable
> executables
) {
40 this.executables
= executables
;
43 public void setExecutionSpec(ExecutionSpec executionSpec
) {
44 this.executionSpec
= executionSpec
;
47 public void setAttributes(Map
<String
, Object
> attributes
) {
48 this.attributes
= attributes
;
51 public static ExecutionFlow
getCurrentExecutionFlow() {
52 return executionFlow
.get();
55 public Map
<String
, Object
> getAttributes() {
59 public String
getUuid() {