Package org.apache.agila.engine

Examples of org.apache.agila.engine.InstanceID


        assertEquals( "10", numdays );

    }

    public void testTokenCreatedForRootNode() {
        InstanceID instanceID = createInstance();

        // Allow the queue service to breath
        try {
            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
View Full Code Here


        assertNotNull( tokens );
        assertEquals( 1, tokens.size() );
    }

    public void testTaskAssigned_OnInstantiation() {
        InstanceID instanceID = createInstance();

        // Allow the queue service to breath
        try {
            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
View Full Code Here

        assertNotNull( tasks );
        assertEquals( 1, tasks.size() );
    }

    public void testPerform_ApplyLeaveTask_NoParamSupplied() {
        InstanceID instanceID = createInstance();

        // Allow the queue service to breath
        try {
            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
View Full Code Here

        assertNotNull( rhr );
        assertFalse( "Without the required parameters the token should not be able to continue", rhr.isAbleToContinue() );
    }

    public void testPerform_ApplyLeaveTask_ParamSupplied() {
        InstanceID instanceID = createInstance();

        // Allow the queue service to breath
        try {
            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
View Full Code Here

    /**
     * After performing a task, data submitted should be available in the node context.
     */
    public void testNodeInfoData() {
        InstanceID instanceID = createInstance();

        // Allow the queue service to breath
        try {
            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
View Full Code Here

        // Fill required variables with value
        Map requiredVariables = new HashMap();
        requiredVariables.put( "numdays", "10" );

        // Instantiate the workflow
        InstanceID instanceID = engine.startNewInstance( businessProcessID.getID(), requiredVariables );
        assertNotNull( instanceID );

        return( instanceID );
    }
View Full Code Here

    }

    private void startNewInstance( HttpServletRequest request,
        BusinessProcessID businessProcessID, String name, Map appParams ) {

        InstanceID instanceID = engine.startNewInstance( businessProcessID.getID(), appParams );

        request.setAttribute( "iid", instanceID );
        request.setAttribute( "processName", name );
    }
View Full Code Here

     * @param response
     * @throws ServletException
     * @throws IOException
     */
    public void stop_instance( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
        InstanceID instanceID = new InstanceID( Integer.parseInt( request.getParameter( "instanceid" ) ) );
        engine.stop( instanceID );

        List l = eiSvc.listInstanceInfo();

        request.setAttribute( "list", l );
View Full Code Here

        doRender( request, response );
    }

    public void detail_instance( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {

        InstanceID instanceID = new InstanceID( Integer.parseInt( request.getParameter( "instanceid" ) ) );
        InstanceInfo info = eiSvc.getInstanceInfoByID(instanceID);
        request.setAttribute( "instance", info );
        request.setAttribute( "graphManager", graphManager );
        request.setAttribute( "pageToDisplay", "/WEB-INF/view/instancedetail.jsp" );
        doRender( request, response );
View Full Code Here

     * @throws ServletException
     * @throws IOException
     */
    public void suspend_instance( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {

        InstanceID instanceID = new InstanceID( Integer.parseInt( request.getParameter( "instanceid" ) ) );
        engine.suspend( instanceID );

        List l = eiSvc.listInstanceInfo();

        request.setAttribute( "list", l );
View Full Code Here

TOP

Related Classes of org.apache.agila.engine.InstanceID

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.