Examples of Job


Examples of org.glite.ce.creamapi.jobmanagement.Job

        public GetSTDTask(String jobId) {
            this.jobId = jobId;
        }

        public void run() {
            Job job = null;
            try {
                job = jobDB.retrieveJob(jobId, null);
            } catch (IllegalArgumentException e) {
                logger.error("GetSTDTask - IllegalArgumentException: " + e.getMessage());
                return;
            } catch (DatabaseException e) {
                logger.error("GetSTDTask - DatabaseException: " + e.getMessage());
                return;
            }

            if (job == null) {
                return;
            }

            JobStatus lastStatus = job.getLastStatus();
            if (lastStatus == null) {
                return;
            }

            boolean update = false;

            if ("W".equalsIgnoreCase(lastStatus.getExitCode())) {
                try {
                    String exitCode = getExitCode(job.getWorkingDirectory() + "/StandardOutput", job.getLocalUser());
                    lastStatus.setExitCode(exitCode);
                } catch (Exception e) {
                    lastStatus.setExitCode(Job.NOT_AVAILABLE_VALUE);
                } finally {
                    update = true;
                }
            }

            if (lastStatus.getType() == JobStatus.DONE_FAILED || lastStatus.getType() == JobStatus.CANCELLED) {
                try {
                    String stdErrorMessage = readFile(job.getWorkingDirectory() + "/StandardError", job.getLocalUser());
                    String errorMessage = null;
                    if (stdErrorMessage != null && !stdErrorMessage.equals("")) {
                        errorMessage = lastStatus.getFailureReason();
                       
                        if (errorMessage != null && !stdErrorMessage.equals(stdErrorMessage)) {
View Full Code Here

Examples of org.gofleet.scheduler.Job

        Properties p = new Properties();
        try {
          p.load(new FileReader(job));
          String _class = p.get("CLASS").toString();

          Job plugin = (Job) Class.forName(_class).newInstance();
          scheduler.addJob((int) plugin.getFrequency(),
              plugin.getName(), plugin.getClass(),
              plugin.getParameters(), plugin.getListenerList());
        } catch (Throwable e) {
          LOG.error(
              "Error trying to load job " + job.getAbsolutePath(),
              e);
        }
View Full Code Here

Examples of org.jberet.job.Job

    private ArtifactFactory artifactFactory = new SimpleArtifactFactory();

    @Override
    public long start(String jobXMLName, Properties jobParameters) throws JobStartException, JobSecurityException {
        ClassLoader classLoader = BatchUtil.getBatchApplicationClassLoader();
        Job jobDefined = ArchiveXmlLoader.loadJobXml(jobXMLName, Job.class, classLoader);
        repository.addJob(jobDefined);
        JobInstanceImpl jobInstance = repository.createJobInstance(jobDefined, getApplicationName(), classLoader);
        return startJobExecution(jobInstance, jobParameters, null);
    }
View Full Code Here

Examples of org.jberet.job.model.Job

    abstract void insertJobExecution(JobExecutionImpl jobExecution);
    abstract void insertStepExecution(StepExecutionImpl stepExecution, JobExecutionImpl jobExecution);

    @Override
    public void addJob(final Job job) {
        final Job existing = jobs.putIfAbsent(job.getId(), job);
        if (existing != null) {
            BatchLogger.LOGGER.jobAlreadyExists(job.getId());
        }
    }
View Full Code Here

Examples of org.jbpm.api.job.Job

    private Workflow convertToWorkflow(ProcessInstance instance, Locale locale) {
        final Workflow workflow = new Workflow(instance.getName(), instance.getId(), key);
        final WorkflowDefinition definition = getWorkflowDefinitionById(instance.getProcessDefinitionId(), locale);
        workflow.setWorkflowDefinition(definition);
        workflow.setAvailableActions(getAvailableActions(instance.getId(), locale));
        Job job = managementService.createJobQuery().timers().processInstanceId(instance.getId()).uniqueResult();
        if (job != null) {
            workflow.setDuedate(job.getDueDate());
        }
        workflow.setStartTime(historyService.createHistoryProcessInstanceQuery().processInstanceId(instance.getId()).orderAsc(HistoryProcessInstanceQuery.PROPERTY_STARTTIME).uniqueResult().getStartTime());
       
        Object user = executionService.getVariable(instance.getId(), "user");
        if (user != null) {
View Full Code Here

Examples of org.jbpm.env.session.Job

    return result;
  }

  public ObjectReference<Activity> getScheduledActivity(long id) {
    ObjectReference<Activity> result = null;
    Job job =
      Environment.getCurrent().get(JobSession.class).get(id);
    Timer timer = null;
    if (job instanceof Timer) {
      timer = (Timer) job;
    }
View Full Code Here

Examples of org.jbpm.job.Job

  }

  public Object execute(JbpmContext jbpmContext) throws Exception {
    JobSession jobSession = jbpmContext.getJobSession();
    log.debug("loading job "+jobId);
    Job job = jobSession.loadJob(jobId);
    log.debug("executing job "+jobId);
    if (!job.execute(jbpmContext)) {
      log.warn("job "+jobId+" was not supposed to be deleted");
    }
    jobSession.deleteJob(job);
    return null;
  }
View Full Code Here

Examples of org.jclouds.dynect.v3.domain.Job

   String zoneFQDN = System.getProperty("user.name").replace('.', '-') + ".record.dynecttest.jclouds.org";
   String contact = JcloudsVersion.get() + ".jclouds.org";

   private void createZone() {
      Job job = zoneApi().scheduleCreateWithContact(zoneFQDN, contact);
      checkNotNull(job, "unable to create zone %s", zoneFQDN);
      getAnonymousLogger().info("created zone: " + job);
      assertEquals(job.getStatus(), Status.SUCCESS);
      assertEquals(api.getJob(job.getId()), job);
      Zone zone = zoneApi().publish(zoneFQDN);
      checkNotNull(zone, "unable to publish zone %s", zoneFQDN);
      getAnonymousLogger().info("published zone: " + zone);
   }
View Full Code Here

Examples of org.jclouds.gogrid.domain.Job

   @Override
   public boolean apply(LoadBalancer loadBalancer) {
      checkNotNull(loadBalancer, "Load balancer must be a valid instance");
      checkNotNull(loadBalancer.getName(), "Load balancer must be a valid name");
      Job latestJob = Iterables.getOnlyElement(jobClient.getJobList(latestJobForObjectByName(loadBalancer.getName())));
      return JobState.SUCCEEDED.equals(latestJob.getCurrentState());
   }
View Full Code Here

Examples of org.jclouds.rackspace.clouddns.v1.domain.Job

            .email("everett@" + JCLOUDS_EXAMPLE)
            .ttl(600001)
            .comment("Hello Domain Update")
            .build();

      Job job = api.update(3650908, updateDomain);
     
      assertEquals(job.getStatus(), Job.Status.COMPLETED);
   }
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.