import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
import org.argeo.slc.execution.ExecutionFlowDescriptor;
import org.argeo.slc.execution.ExecutionStep;
-import org.argeo.slc.process.RealizedFlow;
+import org.argeo.slc.execution.RealizedFlow;
+import org.springframework.security.Authentication;
+import org.springframework.security.context.SecurityContextHolder;
/** Thread of a single execution */
public class ExecutionThread extends Thread {
public void run() {
// authenticate thread
-// Authentication authentication = getProcessThreadGroup()
-// .getAuthentication();
-// if (authentication == null)
-// throw new SlcException("Can only execute authenticated threads");
-// SecurityContextHolder.getContext().setAuthentication(authentication);
+ Authentication authentication = getProcessThreadGroup()
+ .getAuthentication();
+ if (authentication == null)
+ throw new SlcException("Can only execute authenticated threads");
+ SecurityContextHolder.getContext().setAuthentication(authentication);
if (getContextClassLoader() != null) {
if (log.isTraceEnabled())