Package org.jbpm.task.service

Examples of org.jbpm.task.service.TaskService


        }
        em.getTransaction().commit();

        // now create a new service, to see if it initiates from the DB correctly
        MockEscalatedDeadlineHandler handler = new MockEscalatedDeadlineHandler();
        TaskService local = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener(), handler);     
               
        handler.wait( 3, 30000 );
       
        assertEquals( 3, handler.list.size() );
View Full Code Here


    SendIcal.initInstance(conf);

    // Use persistence.xml configuration
    emf = Persistence.createEntityManagerFactory("org.drools.task");

    taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
    taskSession = taskService.createSession();
    MockUserInfo userInfo = new MockUserInfo();
    taskService.setUserinfo(userInfo);
    Map<String, Object> vars = new HashMap();
View Full Code Here

        SendIcal.initInstance(conf);

        // Use persistence.xml configuration
        emf = Persistence.createEntityManagerFactory("org.jbpm.task");

        taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        taskSession = taskService.createSession();
        MockUserInfo userInfo = new MockUserInfo();
        taskService.setUserinfo(userInfo);
        Map vars = new HashMap();
View Full Code Here

public class DemoTaskService {
 
    public static void main(String[] args) {
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
        TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        TaskServiceSession taskSession = taskService.createSession();
        // Add users
        Map vars = new HashMap();
        Reader reader = new InputStreamReader( DemoTaskService.class.getResourceAsStream( "LoadUsers.mvel" ) );    
        Map<String, User> users = ( Map<String, User> ) eval( reader, vars );  
        for ( User user : users.values() ) {
View Full Code Here

public class DemoTaskService {
 
  @SuppressWarnings("unchecked")
  public static void main(String[] args) {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
        TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        TaskServiceSession taskSession = taskService.createSession();
        // Add users
        Map vars = new HashMap();
        Reader reader = new InputStreamReader( BaseTest.class.getResourceAsStream( "LoadUsers.mvel" ) );    
        Map<String, User> users = ( Map<String, User> ) eval( reader, vars );  
        for ( User user : users.values() ) {
View Full Code Here

   
  
   @SuppressWarnings({ "unchecked", "rawtypes" })
  protected static  void startHumanTaskServer(){
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
        TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        TaskServiceSession taskSession = taskService.createSession();
   
        // Add users
        Map vars = new HashMap();
        Reader reader;
    try {
View Full Code Here

    this.context = EasyMock.createMock(Context.class);
    EasyMock.expect(context.lookup("ConnectionFactory")).andReturn(factory).anyTimes();
    EasyMock.replay(context);
   
    EntityManagerFactory localEntityManagerFactory = Persistence.createEntityManagerFactory("org.jbpm.task");
    TaskService localTaskService = new TaskService(localEntityManagerFactory, SystemEventListenerFactory.getSystemEventListener());
    TaskServiceSession localTaskServiceSession = localTaskService.createSession();
    for (int i = 0; i < 10; i++) {
      User user = new User("usr" + i);
      localTaskServiceSession.addUser(user);
    }
    for (int j = 0; j < 3; j++) {
View Full Code Here

        ds1.init();
        // Use persistence.xml configuration
        emf = Persistence.createEntityManagerFactory("org.jbpm.task");

        taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        taskSession = taskService.createSession();

        User operator = new User("operator");
        User driver = new User("control");
        User hospital = new User("hospital");
View Full Code Here

    public void startServer() {
        if(isRunning())
            throw new IllegalStateException("Server is already started");
        this.running = true;
        EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("org.drools.task");
        TaskService taskService = new TaskService(entityManagerFactory, SystemEventListenerFactory.getSystemEventListener());
        TaskServiceSession taskSession = taskService.createSession() ;
        MockUserInfo userInfo = new MockUserInfo();
        taskService.setUserinfo( userInfo);
       
        for (String userName : getDefaultUsers()) {
            taskSession.addUser(new User(userName));
        }
       
View Full Code Here

    if (isRunning())
      throw new IllegalStateException("Server is already started");
    this.running = true;
    EntityManagerFactory entityManagerFactory = Persistence
        .createEntityManagerFactory("org.drools.task");
    TaskService taskService = new TaskService(entityManagerFactory,
        SystemEventListenerFactory.getSystemEventListener());
    TaskServiceSession taskSession = taskService.createSession();
    MockUserInfo userInfo = new MockUserInfo();
    taskService.setUserinfo(userInfo);

    for (String userName : getDefaultUsers()) {
      taskSession.addUser(new User(userName));
    }
View Full Code Here

TOP

Related Classes of org.jbpm.task.service.TaskService

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.