Package org.jbpm.task.service

Examples of org.jbpm.task.service.TaskService.createSession()


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


 
  @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

    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

        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

    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
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.