5 Replies Latest reply on Mar 5, 2009 9:47 AM by Clookes

    How to get status of a short lived process?

    Clookes Level 1
      I have a short-lived process I call from servlet (submit servlet), I would know when the process has completed, I tried the following code, but it says

      [3/3/09 10:35:37:593 PST] 0000002f SystemErr R Caused by: com.adobe.idp.jobmanager.common.JobNotFoundException

      InvocationResponse invokeResponse = myServiceClient.invoke(invokeRequest);
      String invocationId = invokeResponse.getInvocationId();

      JobManager jobManager = new JobManager(myFactory);
      JobId myJobId = new JobId(invocationId);

      int counter = 0;
      while((jobManager.getStatus(myJobId).getStatusCode() == JobStatus.JOB_STATUS_RUNNING) && ++counter < 60) {
      Thread.sleep(1000);
      }

      Any help would be appreciated. Thanks in advance.