Example #1
0
  public TestCase execute(final APISession apiSession) {
    try {
      final TestHumanTask nextActivityInstance = getNextHumanTask(apiSession);
      if (nextActivityInstance != null) {
        nextActivityInstance.execute(apiSession);
      }
    } catch (final NoActivityLeftException e) {
      // there were no activity in the process
    }

    return this;
  }
Example #2
0
 public void archive() throws InterruptedException {
   TestUser user = TestToolkitCtx.getInstance().getInitiator();
   APISession session = user.getSession();
   try {
     while (true) {
       final TestHumanTask nextActivityInstance = getNextHumanTask(session);
       if (nextActivityInstance != null) {
         nextActivityInstance.assignTo(user).execute(session);
       }
       Thread.sleep(SLEEP_TIME_MS);
     }
   } catch (NoActivityLeftException e) {
     // no more activity, finished
   }
 }