Examples of fetchAvailableTasks()


Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

           UserRoles ur = new UserRoles("niko",
                   new String[] { "examples\\employee" });
           final TaskFetcher taskFetcher = new TaskFetcher(em);
         
           // get your query from here
           Task[] list1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
           // we make sure no previous tasks left here
           checkRemoved(list1);
         
           // create and persist a new task for user niko
           PATask task1 = new PATask(getUniqueTaskID(), new URI(
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

           task1.getUserOwners().add("niko");
           persist(task1);
           UserRoles ur = new UserRoles("niko",
                   new String[] { "examples\\employee" });
           final TaskFetcher taskFetcher = new TaskFetcher(em);
           Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
         
           Assert.assertEquals(1, t1.length);
           checkRemoved(new Task[] { task1 });
          }
         
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

                  new String[] { "examples\\employee" });
          final TaskFetcher taskFetcher = new TaskFetcher(em);
        
          // test task1 has two attachments
          String query = "(T._id = '" + task1.getID() + "')";
          Task[] t2 = taskFetcher.fetchAvailableTasks(ur, PATask.class, query);
          Assert.assertTrue(t2[0] instanceof PATask);
          PATask t = (PATask) t2[0];
          Collection<Attachment> atts = t.getAttachments();
          Assert.assertEquals(2, atts.size());
        
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

          Attachment a2 = iter.next();
          Assert.assertNotSame(a1.getPayloadURL(), a2.getPayloadURL());
        
          // test task2 has one attachment
          query = "(T._id = '" + task2.getID() + "')";
          t2 = taskFetcher.fetchAvailableTasks(ur, PATask.class, query);
          Assert.assertTrue(t2[0] instanceof PATask);
          t = (PATask) t2[0];
          Assert.assertEquals(1, t.getAttachments().size());
        
          // task2 attachments are not the same as task1
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

             task1.getUserOwners().add(someJapanese);
             persist(task1);
             UserRoles ur = new UserRoles(someJapanese,
                     new String[] { "examples\\employee" });
             final TaskFetcher taskFetcher = new TaskFetcher(em);
             Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
             Assert.assertEquals(1, t1.length);
             checkRemoved(new Task[] { task1 });
            }
   
      @Test
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

            persist(task2);
          
            UserRoles ur = new UserRoles("niko",
                    new String[] { "examples\\employee" });
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            Task[] ts = taskFetcher.fetchAvailableTasks(ur, PIPATask.class, "");
            Assert.assertEquals(2, ts.length);
          
            PIPATask t3 = taskFetcher
                    .fetchPipaFromUrl("http://hellonicoUnique1.net");
            TaskEquality.areTasksEquals(task1, t3);
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

            persist(task2);
          
            UserRoles ur = new UserRoles("niko",
                    new String[] { "examples\\employee" });
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, query);
            Assert.assertEquals(1, t1.length);
          
            checkRemoved(new Task[] { task1, task2 });
           }
          
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

            task1.getUserOwners().add("niko");
            persist(task1);
          
            UserRoles ur = new UserRoles("niko", assignedRoles);
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
          
            Assert.assertEquals(1, t1.length);
            checkRemoved(new Task[] { task1 });
           }
          
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

            persist(task3);
          
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            UserRoles ur = new UserRoles("niko",
                    new String[] { "examples\\employee" });
            Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
            Task[] t2 = taskFetcher.fetchAvailableTasks(ur, PATask.class,
                    "T._state = TaskState.READY OR T._state = TaskState.CLAIMED");
            UserRoles ur2 = new UserRoles("alex",
                    new String[] { "examples\\employee2" });
            Task[] t3 = taskFetcher.fetchAvailableTasks(ur2, PATask.class,
View Full Code Here

Examples of org.intalio.tempo.workflow.util.jpa.TaskFetcher.fetchAvailableTasks()

          
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            UserRoles ur = new UserRoles("niko",
                    new String[] { "examples\\employee" });
            Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
            Task[] t2 = taskFetcher.fetchAvailableTasks(ur, PATask.class,
                    "T._state = TaskState.READY OR T._state = TaskState.CLAIMED");
            UserRoles ur2 = new UserRoles("alex",
                    new String[] { "examples\\employee2" });
            Task[] t3 = taskFetcher.fetchAvailableTasks(ur2, PATask.class,
                    "T._state = TaskState.READY OR T._state = TaskState.CLAIMED");
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.