1 package org
.argeo
.slc
.demo
.basic
;
3 import junit
.framework
.TestCase
;
5 import org
.argeo
.slc
.core
.execution
.ExecutionContext
;
6 import org
.argeo
.slc
.core
.execution
.NewExecutionEvent
;
7 import org
.argeo
.slc
.execution
.ExecutionFlow
;
8 import org
.argeo
.slc
.process
.SlcExecution
;
9 import org
.springframework
.context
.support
.ClassPathXmlApplicationContext
;
11 public class BasicExecutionTest
extends TestCase
{
12 public void testExecution() throws Exception
{
13 String
[] files
= { "conf/main.xml", "conf/imports.xml",
14 "conf/common.xml", "conf/basic.xml",
15 "conf/testCases/basic-001.xml", "conf/testCases/basic-002.xml" };
16 ClassPathXmlApplicationContext applicationContext
= new ClassPathXmlApplicationContext(
18 applicationContext
.start();
21 ExecutionContext
.registerExecutionContext(new ExecutionContext());
22 ExecutionContext
.getVariables().put("slc.flows", bean
);
23 ExecutionFlow executionFlow
= (ExecutionFlow
) applicationContext
25 executionFlow
.execute();
27 // SlcExecution slcExecution = new SlcExecution();
28 // slcExecution.getAttributes().put("slc.flows", "main");
29 // applicationContext.publishEvent(new NewExecutionEvent(this,
32 // Thread.sleep(5000);
34 applicationContext
.close();