Examples of waitTillDone()


Examples of org.drools.task.service.BlockingTaskOperationResponseHandler.waitTillDone()

    assertEquals("Darth Vader", task.getActualOwner().getId());
   
    System.out.println("Starting task " + task.getId());
    BlockingTaskOperationResponseHandler operationResponseHandler = new BlockingTaskOperationResponseHandler();
    client.start(task.getId(), "Darth Vader", operationResponseHandler);
    operationResponseHandler.waitTillDone(5000);
    System.out.println("Started task " + task.getId());
   
    System.out.println("Completing task " + task.getId());
    operationResponseHandler = new BlockingTaskOperationResponseHandler();
    client.complete(task.getId(), "Darth Vader", null, operationResponseHandler);
View Full Code Here

Examples of org.drools.task.service.responsehandlers.BlockingAddTaskResponseHandler.waitTillDone()

        long now = ((Date)vars.get( "now" )).getTime();
       
        for ( Task task : tasks ) { 
            BlockingAddTaskResponseHandler addTaskResponseHandler = new BlockingAddTaskResponseHandler();           
            client.addTask( task, null, addTaskResponseHandler );
            addTaskResponseHandler.waitTillDone( 3000 );
        }

        handler.wait( 3, 30000 );
       
        assertEquals( 3, handler.list.size() );
View Full Code Here

Examples of org.drools.task.service.responsehandlers.BlockingDeleteAttachmentResponseHandler.waitTillDone()

        attachments1.add( attachment );
        assertTrue( CollectionUtils.equals( attachments2, attachments1 ) );     
       
        BlockingDeleteAttachmentResponseHandler deleteCommentResponseHandler = new BlockingDeleteAttachmentResponseHandler();
        client.deleteAttachment( taskId, addAttachmentResponseHandler.getAttachmentId(), addAttachmentResponseHandler.getContentId(), deleteCommentResponseHandler );
        deleteCommentResponseHandler.waitTillDone( 3000 );
       
        Thread.sleep( 3000 );
       
        getTaskResponseHandler = new BlockingGetTaskResponseHandler();
        client.getTask( taskId, getTaskResponseHandler );
View Full Code Here

Examples of org.drools.task.service.responsehandlers.BlockingDeleteCommentResponseHandler.waitTillDone()

        comments1.add( comment );
        assertTrue( CollectionUtils.equals( comments1, comments2 ) );
       
        BlockingDeleteCommentResponseHandler deleteCommentResponseHandler = new BlockingDeleteCommentResponseHandler();
        client.deleteComment( taskId, addCommentResponseHandler.getCommentId(), deleteCommentResponseHandler );
        deleteCommentResponseHandler.waitTillDone( 3000 );
       
        getTaskResponseHandler = new BlockingGetTaskResponseHandler();
        client.getTask( taskId, getTaskResponseHandler );
        task1 = getTaskResponseHandler.getTask();
        comments2 = task1.getTaskData().getComments();
View Full Code Here

Examples of org.drools.task.service.responsehandlers.BlockingEventResponseHandler.waitTillDone()

        BlockingEventResponseHandler handler = new BlockingEventResponseHandler();
        client.registerForEvent( key, true, handler );
        Thread.sleep( 3000 );
       
        taskSession.taskOperation( Operation.Claim, taskId, users.get( "darth" ).getId(), null, null );         
        handler.waitTillDone( 5000 );
       
        Payload payload = handler.getPayload();
        TaskUserEvent event = ( TaskUserEvent ) payload.get();
        assertNotNull( event );       
    }
View Full Code Here

Examples of org.drools.task.service.responsehandlers.BlockingTaskOperationResponseHandler.waitTillDone()

        assertNull( task1.getTaskData().getActualOwner() )
       
        // Check is Suspended
        BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
        client.suspend( taskId, users.get( "darth" ).getId(), responseHandler );
        responseHandler.waitTillDone(DEFAULT_WAIT_TIME);
       
        getTaskResponseHandler = new BlockingGetTaskResponseHandler()
        client.getTask( taskId, getTaskResponseHandler );
        Task task2 = getTaskResponseHandler.getTask();
        assertEqualsStatus.Suspended, task2.getTaskData().getStatus() );
View Full Code Here

Examples of org.jbpm.process.workitem.wsht.BlockingAddTaskResponseHandler.waitTillDone()

            if (client == null) {
                return;
            }
            BlockingAddTaskResponseHandler responseHandler = new BlockingAddTaskResponseHandler();
            client.addTask(dialog.getTask(), dialog.getContent(), responseHandler);
            responseHandler.waitTillDone(5000);
            refresh();
        }
    }

    public void claim() {
View Full Code Here

Examples of org.jbpm.task.service.responsehandlers.BlockingAddTaskResponseHandler.waitTillDone()

        long now = ((Date)vars.get( "now" )).getTime();
       
        for ( Task task : tasks ) { 
            BlockingAddTaskResponseHandler addTaskResponseHandler = new BlockingAddTaskResponseHandler();           
            client.addTask( task, null, addTaskResponseHandler );
            addTaskResponseHandler.waitTillDone( 3000 );
        }

        handler.wait( 3, 30000 );
       
        assertEquals( 3, handler.list.size() );
View Full Code Here

Examples of org.jbpm.task.service.responsehandlers.BlockingDeleteAttachmentResponseHandler.waitTillDone()

        attachments1.add( attachment );
        assertTrue( CollectionUtils.equals( attachments2, attachments1 ) );     
       
        BlockingDeleteAttachmentResponseHandler deleteCommentResponseHandler = new BlockingDeleteAttachmentResponseHandler();
        client.deleteAttachment( taskId, addAttachmentResponseHandler.getAttachmentId(), addAttachmentResponseHandler.getContentId(), deleteCommentResponseHandler );
        deleteCommentResponseHandler.waitTillDone( 3000 );
       
        Thread.sleep( 3000 );
       
        getTaskResponseHandler = new BlockingGetTaskResponseHandler();
        client.getTask( taskId, getTaskResponseHandler );
View Full Code Here

Examples of org.jbpm.task.service.responsehandlers.BlockingDeleteCommentResponseHandler.waitTillDone()

        comments1.add( comment );
        assertTrue( CollectionUtils.equals( comments1, comments2 ) );
       
        BlockingDeleteCommentResponseHandler deleteCommentResponseHandler = new BlockingDeleteCommentResponseHandler();
        client.deleteComment( taskId, addCommentResponseHandler.getCommentId(), deleteCommentResponseHandler );
        deleteCommentResponseHandler.waitTillDone( 3000 );
       
        getTaskResponseHandler = new BlockingGetTaskResponseHandler();
        client.getTask( taskId, getTaskResponseHandler );
        task1 = getTaskResponseHandler.getTask();
        comments2 = task1.getTaskData().getComments();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.