Package org.intalio.tempo.workflow.tms.server.dao

Examples of org.intalio.tempo.workflow.tms.server.dao.SimpleTaskDAOConnectionFactory


  private static final Logger _logger = LoggerFactory.getLogger(TMSRequestProcessorTest.class);

  private TMSRequestProcessor createRequestProcessor() throws Exception {
    ITMSServer server = Utils.createTMSServer();
    TMSRequestProcessor proc = new TMSRequestProcessor(new SimpleTaskDAOConnectionFactory());
    proc.setServer(server);
    return proc;
  }
View Full Code Here


        initTMSRequestProcessor();
        createTask();
    }

    public void testReassginLive() throws Exception {
       ITaskDAOConnectionFactory daoFactory=new SimpleTaskDAOConnectionFactory();
         ITaskDAOConnection dao=daoFactory.openConnection();
        /*
         * Get available users
         */
        _logger.debug("Get the users from role: " + ROLE_TARGET);
        String[] users = queryAssignedUsers(ROLE_TARGET);
View Full Code Here

    void initTMSServer() throws Exception {
        tmsServer = Utils.createTMSServer();
    }

    void initTMSRequestProcessor() throws Exception {
        requestProcessor = new TMSRequestProcessor(new SimpleTaskDAOConnectionFactory());
        requestProcessor.setServer(tmsServer);
    }
View Full Code Here

        paTask.getUserOwners().add("test/user1");
        paTask.getRoleOwners().add("test/role3");
       
        paTask.getUserOwners().add("test/user1");
        paTask.getRoleOwners().add("test/role3");
        ITaskDAOConnectionFactory daoFactory=new SimpleTaskDAOConnectionFactory();
        ITaskDAOConnection dao=daoFactory.openConnection();
        server.create(dao,paTask, "token1");

        TaskEquality.areTasksEquals(paTask, server.getTask(dao,"taskID", "token1"));
        TaskEquality.areTasksEquals(paTask, server.getTask(dao,"taskID", "token2"));
        TaskEquality.areTasksEquals(paTask, server.getTaskList(dao,"token1")[0]);
View Full Code Here

    public void testCannotUpdateNotification() throws Exception {
        ITMSServer server = Utils.createTMSServerJPA();
        Notification notification = new Notification("taskID", new URI("http://localhost/1"), Utils.createXMLDocument());
        notification.getUserOwners().add("test/user1");
        notification.getRoleOwners().add("test/role3");
        ITaskDAOConnectionFactory daoFactory=new SimpleTaskDAOConnectionFactory();
        ITaskDAOConnection dao=daoFactory.openConnection();
        server.create(dao,notification, "token1");
        try {
            TaskMetadata metadata = TaskMetadata.Factory.newInstance()
            metadata.setTaskId("taskID");
            metadata.setTaskType(TaskType.NOTIFICATION.name());
View Full Code Here

        ITMSServer server = Utils.createTMSServerJPA();
        TaskMetadata metadata = TaskMetadata.Factory.newInstance()
        metadata.setTaskId("taskID");
        metadata.setTaskType(TaskType.ACTIVITY.name());
        try {
          ITaskDAOConnectionFactory daoFactory=new SimpleTaskDAOConnectionFactory();
            ITaskDAOConnection dao=daoFactory.openConnection();
            server.update(dao,metadata, "token");
            fail("should not be able to update a notification");
        } catch (Exception e) {
            // expected
        }   
View Full Code Here

   
    public void testCanUpdatePriority() throws Exception {
        ITMSServer server = Utils.createTMSServerJPA();
        String id = ""+System.currentTimeMillis();
        PATask pa = getPATask(id);
        ITaskDAOConnectionFactory daoFactory=new SimpleTaskDAOConnectionFactory();
        ITaskDAOConnection dao=daoFactory.openConnection();
        server.create(dao,pa, "token1");
        TaskMetadata metadata = TaskMetadata.Factory.newInstance()
        metadata.setTaskId(id);
       
        metadata.setPriority(5);
View Full Code Here

    public void testNotificationLifecycle() throws Exception {
        ITMSServer server = Utils.createTMSServer();
        Notification notification = new Notification("taskID", new URI("http://localhost/1"), Utils.createXMLDocument());
        notification.getUserOwners().add("test/user1");
        notification.getRoleOwners().add("test/role3");
        ITaskDAOConnectionFactory daoFactory=new SimpleTaskDAOConnectionFactory();
        ITaskDAOConnection dao=daoFactory.openConnection();
        server.create(dao,notification, "token1");

        TaskEquality.areTasksEquals(notification, server.getTask(dao,"taskID", "token1"));
        TaskEquality.areTasksEquals(notification, server.getTask(dao,"taskID", "token2"));
        TaskEquality.areTasksEquals(notification, server.getTaskList(dao,"token1")[0]);
View Full Code Here

TOP

Related Classes of org.intalio.tempo.workflow.tms.server.dao.SimpleTaskDAOConnectionFactory

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.