Package org.apache.agila.services.task

Examples of org.apache.agila.services.task.ResponseHandlerResponse


        assertNotNull( handler );

        HttpServletRequestImpl request = new HttpServletRequestImpl();
        HttpServletResponseImpl response = new HttpServletResponseImpl();

        ResponseHandlerResponse rhr = ((HTTPResponseHandler)handler).processAction( request, response );
        assertNotNull( rhr );
        assertFalse( "Without the required parameters the token should not be able to continue", rhr.isAbleToContinue() );
    }
View Full Code Here


        // Supply the parameters
        request.addParameter( "numdays", "40" );
        request.addParameter( "reason", "Expedition to Mount Everest" );

        ResponseHandlerResponse rhr = ((HTTPResponseHandler)handler).processAction( request, response );
        assertNotNull( rhr );
        assertTrue( rhr.isAbleToContinue() );
    }
View Full Code Here

        // Supply the parameters
        request.addParameter( "numdays", "40" );
        request.addParameter( "reason", "Expedition to Mount Everest" );

        ResponseHandlerResponse rhr = ((HTTPResponseHandler)handler).processAction( request, response );
        assertNotNull( rhr );
        assertTrue( rhr.isAbleToContinue() );

        // The task has been submitted so let's transition to the next node
        EngineMessage engineMessage = new EngineMessageImpl();
        engineMessage.setMessageType( EngineMessage.TYPE_MOVE_TOKEN );
        engineMessage.setCurrentTokenID( rhr.getTokenID() );
        engineMessage.addAppData( rhr.getActivityDataName(), rhr.getActivityData() );

        queueService.enqueue( engineMessage );

        taskService.setTaskStatus( task.getTaskID(), Task.TASK_COMPLETE );
View Full Code Here

        if (handler != null) {

            if (handler instanceof HTTPResponseHandler) {

                ResponseHandlerResponse rhr =
                        ((HTTPResponseHandler) handler).processAction(request, response);

                /*
                 * package data and send into engine
                 */

                if (rhr.isAbleToContinue()) {

                    /*
                     * queue a message for this instance
                     */

                    EngineMessage em = new EngineMessageImpl();

                    em.setMessageType(EngineMessage.TYPE_MOVE_TOKEN);
                    em.setCurrentTokenID(rhr.getTokenID());

                    em.addAppData(rhr.getActivityDataName(), rhr.getActivityData());

                    qs.enqueue(em);

                    /*
                     * TODO - is this the right place?
View Full Code Here

        actionRequest.setAttribute(COMPLETE, COMPLETE_VALUE);

        String name = approve == null ? reject : approve;

        return new ResponseHandlerResponse(true,
                tokenID, "data", name);
    }
View Full Code Here

        actionRequest.setAttribute(COMPLETE, COMPLETE_VALUE);

        HashMap data = new HashMap();
        data.put( "name", name );

        return new ResponseHandlerResponse(true, tokenID, APP_DATA_NAME, data);
    }
View Full Code Here

            actionRequest.setAttribute(COMPLETE, COMPLETE_VALUE);
        }

        DataCarrier dc = new DataCarrier(numdays, reason);

        return new ResponseHandlerResponse(complete, tokenID, APP_DATA_NAME, dc);
    }
View Full Code Here

TOP

Related Classes of org.apache.agila.services.task.ResponseHandlerResponse

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.