Package org.apache.agila.impl.memory

Examples of org.apache.agila.impl.memory.TaskServiceImpl


        context.setTimerService(ts);
        assertEquals(ts, context.getTimerService());
    }

    public void testTaskService() {
        TaskService tskServ = new TaskServiceImpl();
        context.setTaskService(tskServ);
        assertEquals(tskServ,context.getTaskService());
    }
View Full Code Here


    }

    protected void setUp() throws Exception {
        super.setUp();
        TimerService ts = new TimerServiceImpl();
        TaskService tskServ = new TaskServiceImpl();
        NotificationService notifyService = new NotificationServiceImpl();

        node = new HelloWorldActivity();

        node.addBinding(new Binding("cheese", "edam", Binding.STATIC, true, true));
View Full Code Here

        // create the basic services
        instanceService = new InstanceServiceImpl();
        tokenService = new TokenServiceImpl();
        bpService = new BusinessProcessServiceImpl();
        timerService = new TimerServiceImpl();
        taskService = new TaskServiceImpl();

        // create a custom message processor that will allow us access to the EngineMessage
        msgProcessor = new MessageProcessor() {
            public boolean processMessage(EngineMessage msg) {
                InstanceServiceTestCase.this.engineMessage = msg;
View Full Code Here

    public void setUp() throws Exception {
        tokenService = new TokenServiceImpl();
        eiSvc = new InstanceServiceImpl();
        graphManager = new BusinessProcessServiceImpl();
        taskService = new TaskServiceImpl();
        timerService = new TimerServiceImpl();
        notificationService = new NotificationServiceImpl();

        taskService.setTokenService(tokenService);
View Full Code Here

    {

        TokenService tokenService = new TokenServiceImpl();
        InstanceServiceImpl eiSvc = new InstanceServiceImpl();
        BusinessProcessServiceImpl graphManager = new BusinessProcessServiceImpl();
        TaskServiceImpl taskService = new TaskServiceImpl();
        TimerServiceImpl timerService = new TimerServiceImpl();
        LogService logger = new StdoutLogService();
        MessageProcessor impl = new MessageProcessor();

        impl.setTaskService(taskService);
        impl.setTimerService(timerService);
        impl.setExecutionInstanceService(eiSvc);
        impl.setTokenService(tokenService);
        impl.setBusinessProcessService(graphManager);
        impl.setLogService(logger);
        impl.setNotificationService(new NotificationServiceImpl());

        QueueServiceImpl qs = new QueueServiceImpl(impl);

        timerService.setQueueService(qs);

        impl.setQueueService(qs);

        taskService.setBusinessProcessService(graphManager);

        eiSvc.setLogService(logger);
        eiSvc.setBusinessProcessService(graphManager);
        eiSvc.setQueueService(qs);
        eiSvc.setTokenService(tokenService);
View Full Code Here

    public void setUp() throws Exception {
        tokenService = new TokenServiceImpl();
        instanceService = new InstanceServiceImpl();
        businessProcessService = new BusinessProcessServiceImpl();
        taskService = new TaskServiceImpl();
        timerService = new TimerServiceImpl();
        notifyService = new NotificationServiceImpl();
        logger = new StdoutLogService();

        userService = new UserServiceImpl();
View Full Code Here

        super.init();

        this.tokenService = new TokenServiceImpl();
        this.eiSvc = new InstanceServiceImpl();
        this.graphManager = new BusinessProcessServiceImpl();
        this.taskService = new TaskServiceImpl();
        this.timerService = new TimerServiceImpl();
        this.notifyService = new NotificationServiceImpl();

        this.userService = new UserServiceImpl();
View Full Code Here

         */

        TokenService tokenService = new TokenServiceImpl();
        InstanceService eiSvc = new InstanceServiceImpl();
        BusinessProcessServiceImpl graphManager = new BusinessProcessServiceImpl();
        TaskService taskService = new TaskServiceImpl();
        TimerServiceImpl timerService = new TimerServiceImpl();

        MessageProcessor impl = new MessageProcessor();

        impl.setTaskService(taskService);
        impl.setTimerService(timerService);
        impl.setExecutionInstanceService(eiSvc);
        impl.setTokenService(tokenService);
        impl.setBusinessProcessService(graphManager);

        QueueServiceImpl qs = new QueueServiceImpl(impl);

        timerService.setQueueService(qs);

        impl.setQueueService(qs);

        /*
         * 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);

                        Iterator it = l.iterator();

                        while(it.hasNext()) {
                            Task task = (Task) it.next();
View Full Code Here

        super.init();

        this.tokenService = new TokenServiceImpl();
        this.eiSvc = new InstanceServiceImpl();
        this.graphManager = new BusinessProcessServiceImpl();
        this.taskService = new TaskServiceImpl();
        this.timerService = new TimerServiceImpl();

        this.impl = new MessageProcessor();

        this.impl.setTaskService(taskService);
View Full Code Here

TOP

Related Classes of org.apache.agila.impl.memory.TaskServiceImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.