* now start the message pump for processing since we are all ready
*/
qs.start();
Engine engine = new Engine(tokenService, eiSvc, graphManager, qs);
System.out.println("STARTING AN INSTANCE");
HashMap m = new HashMap();
m.put("foo", "foo value");
FileReader reader = null;
try {
reader = new FileReader(new File("workflow_simple.xml"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
// engine.addBusinessProcess(reader);
engine.startNewInstance(1, m);
while(true) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
System.out.print("> ");
String line = br.readLine();
System.out.println("--->" + line);
if (line.startsWith("n ")) {
String s = line.substring("n ".length());
System.out.println("nudging token id = " + s);
engine.nudge(new TokenID(Integer.parseInt(s)));
}
else
if (line.startsWith("t")){
List l = taskService.getTasksForUser(new UserID(1), Task.TASK_INCOMPLETE);