Package org.jbpm.task.event

Examples of org.jbpm.task.event.TaskEventKey


     
      if (!connected) {
        throw new IllegalArgumentException("Could not connect task client");
      }
    }
    TaskEventKey key = new TaskEventKey(TaskCompletedEvent.class, -1);          
    TaskCompletedHandler eventResponseHandler = new TaskCompletedHandler();
    client.registerForEvent(key, false, eventResponseHandler);
    key = new TaskEventKey(TaskFailedEvent.class, -1);          
    client.registerForEvent(key, false, eventResponseHandler);
    key = new TaskEventKey(TaskSkippedEvent.class, -1);          
    client.registerForEvent(key, false, eventResponseHandler);
  }
View Full Code Here


        BlockingGetTaskResponseHandler getTaskResponseHandler = new BlockingGetTaskResponseHandler();
        client.getTask( taskId, getTaskResponseHandler );
        Task task1 = getTaskResponseHandler.getTask();
        assertEquals( Status.Ready , task1.getTaskData().getStatus() );        
       
        EventKey key = new TaskEventKey(TaskClaimedEvent.class, taskId );          
        BlockingEventResponseHandler handler = new BlockingEventResponseHandler();
        client.registerForEvent( key, true, handler );
        Thread.sleep( 3000 );
       
        taskSession.taskOperation( Operation.Claim, taskId, users.get( "darth" ).getId(), null, null, null );         
View Full Code Here

        Task task = ( Task eval( new StringReader( str ), vars );
        client.addTask( task, null, addTaskResponseHandler );
       
        long taskId = addTaskResponseHandler.getTaskId();
       
        EventKey key = new TaskEventKey(TaskCompletedEvent.class, taskId );          
        BlockingEventResponseHandler handler = new BlockingEventResponseHandler();
        client.registerForEvent( key, true, handler );
       
        BlockingTaskSummaryResponseHandler taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();
        client.getTasksAssignedAsPotentialOwner(users.get( "bobba" ).getId(), "en-UK", taskSummaryResponseHandler);
View Full Code Here

        BlockingAddTaskResponseHandler addTaskResponseHandler = new BlockingAddTaskResponseHandler();
        Task task = ( Task eval( new StringReader( str ), vars );
        client.addTask( task, null, addTaskResponseHandler );
        long taskId = addTaskResponseHandler.getTaskId();
       
        EventKey key = new TaskEventKey(TaskCompletedEvent.class, taskId );          
        BlockingEventResponseHandler handler = new BlockingEventResponseHandler();
        client.registerForEvent( key, true, handler );
       
        BlockingTaskSummaryResponseHandler taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();
        client.getTasksAssignedAsPotentialOwner(users.get( "bobba" ).getId(), "en-UK", taskSummaryResponseHandler);
        List<TaskSummary> tasks = taskSummaryResponseHandler.getResults();
        assertEquals(1, tasks.size());
        assertEquals(Status.Reserved, tasks.get(0).getStatus());
       
        BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
        client.start( taskId, users.get( "bobba" ).getId(), responseHandler )

        taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();
        client.getTasksAssignedAsPotentialOwner(users.get( "bobba" ).getId(), "en-UK", taskSummaryResponseHandler);
        tasks = taskSummaryResponseHandler.getResults();
        assertEquals(1, tasks.size());
        assertEquals(Status.InProgress, tasks.get(0).getStatus());
       
        BlockingAddTaskResponseHandler addTaskResponseHandler2 = new BlockingAddTaskResponseHandler();
        Task task2 = ( Task eval( new StringReader( str ), vars );
        client.addTask( task2, null, addTaskResponseHandler2 );
        long taskId2 = addTaskResponseHandler.getTaskId();
       
        EventKey key2 = new TaskEventKey(TaskCompletedEvent.class, taskId2 );          
        BlockingEventResponseHandler handler2 = new BlockingEventResponseHandler();
        client.registerForEvent( key2, true, handler2 );
       
        taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();
        client.getTasksAssignedAsPotentialOwner(users.get( "bobba" ).getId(), "en-UK", taskSummaryResponseHandler);
View Full Code Here

        Task task = ( Task eval( new StringReader( str ), vars );
        taskSession.addTask( task, null );
       
        long taskId = task.getId();     
       
        EventKey key = new TaskEventKey(TaskClaimedEvent.class, taskId );       
        MockEventTriggerTransport transport = new MockEventTriggerTransport();  
        taskService.getEventKeys().register( key, transport );     
       
       
        taskSession.taskOperation( Operation.Claim, taskId, users.get( "darth" ).getId(), null, null, null );       
View Full Code Here

TOP

Related Classes of org.jbpm.task.event.TaskEventKey

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.