Package org.activiti.engine

Examples of org.activiti.engine.ActivitiObjectNotFoundException


      throw new ActivitiCdiException("Cannot use startProcessByName in an activiti command.");
    }
   
    ProcessDefinition definition = processEngine.getRepositoryService().createProcessDefinitionQuery().processDefinitionName(string).singleResult();
    if (definition == null) {
      throw new ActivitiObjectNotFoundException("No process definition found for name: " + string, ProcessDefinition.class);
    }
    ProcessInstance instance = processEngine.getRuntimeService().startProcessInstanceById(definition.getId(), getAndClearCachedVariables());
    if(!instance.isEnded()) {
      setExecution(instance);
    }
View Full Code Here


      throw new ActivitiCdiException("Cannot use startProcessByName in an activiti command.");
    }
   
    ProcessDefinition definition = processEngine.getRepositoryService().createProcessDefinitionQuery().processDefinitionName(string).singleResult();
    if (definition == null) {
      throw new ActivitiObjectNotFoundException("No process definition found for name: " + string, ProcessDefinition.class);
    }
    Map<String, Object> cachedVariables = getAndClearCachedVariables();
    cachedVariables.putAll(variables);
    ProcessInstance instance = processEngine.getRuntimeService().startProcessInstanceById(definition.getId(), cachedVariables);
    if(!instance.isEnded()) {
View Full Code Here

      ExecutionEntity execution = commandContext
        .getExecutionEntityManager()
        .findExecutionById(executionId);
     
      if (execution==null) {
        throw new ActivitiObjectNotFoundException("execution "+executionId+" doesn't exist", Execution.class);
      }

      List<String> executionVariables;
      if (isLocal) {
        executionVariables = new ArrayList<String>(execution.getVariableNamesLocal());
View Full Code Here

    Job job = getJobFromResponse(jobId);
   
    String stackTrace = managementService.getJobExceptionStacktrace(job.getId());
   
    if (stackTrace == null) {
      throw new ActivitiObjectNotFoundException("Job with id '" + job.getId() + "' doesn't have an exception stacktrace.", String.class);
    }
   
    response.setContentType("text/plain");
    return stackTrace;
  }
View Full Code Here

 
  protected Job getJobFromResponse(String jobId) {
    Job job = managementService.createJobQuery().jobId(jobId).singleResult();

    if (job == null) {
      throw new ActivitiObjectNotFoundException("Could not find a job with id '" + jobId + "'.", Job.class);
    }
    return job;
  }
View Full Code Here

  @RequestMapping(value="/management/tables/{tableName}/columns", method = RequestMethod.GET, produces = "application/json")
  public TableMetaData getTableMetaData(@PathVariable String tableName) {
    TableMetaData response = managementService.getTableMetaData(tableName);
  
    if (response == null) {
      throw new ActivitiObjectNotFoundException("Could not find a table with name '" + tableName + "'.", String.class);
    }
    return response;
  }
View Full Code Here

  public void deleteJob(@PathVariable String jobId, HttpServletResponse response) {
    try {
      managementService.deleteJob(jobId);
    } catch(ActivitiObjectNotFoundException aonfe) {
      // Re-throw to have consistent error-messaging acrosse REST-api
      throw new ActivitiObjectNotFoundException("Could not find a job with id '" + jobId + "'.", Job.class);
    }
    response.setStatus(HttpStatus.NO_CONTENT.value());
  }
View Full Code Here

   
    try {
      managementService.executeJob(jobId);
    } catch(ActivitiObjectNotFoundException aonfe) {
      // Re-throw to have consistent error-messaging acrosse REST-api
      throw new ActivitiObjectNotFoundException("Could not find a job with id '" + jobId + "'.", Job.class);
    }
   
    response.setStatus(HttpStatus.NO_CONTENT.value());
  }
View Full Code Here

  protected Job getJobFromResponse(String jobId) {
    Job job = managementService.createJobQuery().jobId(jobId).singleResult();

    if (job == null) {
      throw new ActivitiObjectNotFoundException("Could not find a job with id '" + jobId + "'.", Job.class);
    }
    return job;
  }
View Full Code Here

 
  @RequestMapping(value="/management/tables/{tableName}/data", method = RequestMethod.GET, produces = "application/json")
  public DataResponse getTableData(@PathVariable String tableName, @RequestParam Map<String,String> allRequestParams) {
    // Check if table exists before continuing
    if (managementService.getTableMetaData(tableName) == null) {
      throw new ActivitiObjectNotFoundException("Could not find a table with name '" + tableName + "'.", String.class);
    }
   
    String orderAsc = allRequestParams.get("orderAscendingColumn");
    String orderDesc = allRequestParams.get("orderDescendingColumn");
   
View Full Code Here

TOP

Related Classes of org.activiti.engine.ActivitiObjectNotFoundException

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.