import org.argeo.slc.execution.ExecutionProcess;
import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.execution.RealizedFlow;
import org.argeo.slc.execution.ExecutionProcess;
import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.execution.RealizedFlow;
import org.springframework.security.Authentication;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.Authentication;
import org.springframework.security.context.SecurityContextHolder;
public class ProcessThread extends Thread {
private final static Log log = LogFactory.getLog(ProcessThread.class);
public class ProcessThread extends Thread {
private final static Log log = LogFactory.getLog(ProcessThread.class);
- 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);
* custom process types. Default expects an {@link SlcExecution}.
*/
protected void process() throws InterruptedException {
* custom process types. Default expects an {@link SlcExecution}.
*/
protected void process() throws InterruptedException {
while (flowsToProcess.size() > 0) {
RealizedFlow realizedFlow = flowsToProcess.remove(0);
execute(realizedFlow, true);
while (flowsToProcess.size() > 0) {
RealizedFlow realizedFlow = flowsToProcess.remove(0);
execute(realizedFlow, true);