Package org.camunda.bpm.engine

Examples of org.camunda.bpm.engine.ProcessEngine


    LogUtil.readJavaUtilLoggingConfigFromClasspath();
   
    try {
      log("Initializing process engine " + processEngineName);
      ProcessEngines.init();
      ProcessEngine processEngine = ProcessEngines.getProcessEngine(processEngineName);
      if (processEngine == null) {
        List<ProcessEngineInfo> processEngineInfos = ProcessEngines.getProcessEngineInfos();
        if( processEngineInfos != null && processEngineInfos.size() > 0 )
        {
          // Since no engine with the given name is found, we can't be 100% sure which ProcessEngineInfo
          // is causing the error. We should show ALL errors and process engine names / resource URL's.
          String message = getErrorMessage(processEngineInfos, processEngineName);
          throw new ProcessEngineException(message);
        }
        else
          throw new ProcessEngineException("Could not find a process engine with name '" + processEngineName + "', no engines found. " +
                  "Make sure an engine configuration is present on the classpath");
      }
      RepositoryService repositoryService = processEngine.getRepositoryService();

      log("Starting to deploy " + files.size() + " files");
      for (File file: files) {
        String path = file.getAbsolutePath();
        log("Handling file " + path);
View Full Code Here


  @Produces
  @Named
  @ApplicationScoped
  public ProcessEngine processEngine() {

    ProcessEngine processEngine =  BpmPlatform.getProcessEngineService().getDefaultProcessEngine();
    if(processEngine != null) {
      return processEngine;

    } else {
      return ProcessEngines.getDefaultProcessEngine(false);
View Full Code Here

*
*/
public class ManagedProcessEngineFactoryBean extends ProcessEngineFactoryBean {
 
  public ProcessEngine getObject() throws Exception {
    ProcessEngine processEngine = super.getObject();
   
    RuntimeContainerDelegate runtimeContainerDelegate = getRuntimeContainerDelegate();
    runtimeContainerDelegate.registerProcessEngine(processEngine);
   
    return processEngine;
View Full Code Here

  public List<ProcessDefinitionDto> getProcessDefinitions(UriInfo uriInfo,
      Integer firstResult, Integer maxResults) {
    ProcessDefinitionQueryDto queryDto = new ProcessDefinitionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
    List<ProcessDefinitionDto> definitions = new ArrayList<ProcessDefinitionDto>();

    ProcessEngine engine = getProcessEngine();
    ProcessDefinitionQuery query = queryDto.toQuery(engine);

    List<ProcessDefinition> matchingDefinitions = null;

    if (firstResult != null || maxResults != null) {
View Full Code Here

  @Override
  public CountResultDto getProcessDefinitionsCount(UriInfo uriInfo) {
    ProcessDefinitionQueryDto queryDto = new ProcessDefinitionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());

    ProcessEngine engine = getProcessEngine();
    ProcessDefinitionQuery query = queryDto.toQuery(engine);

    long count = query.count();
    CountResultDto result = new CountResultDto();
    result.setCount(count);
View Full Code Here

  }

  @Override
  public List<JobDto> queryJobs(JobQueryDto queryDto, Integer firstResult,
      Integer maxResults) {
    ProcessEngine engine = getProcessEngine();
    queryDto.setObjectMapper(getObjectMapper());
    JobQuery query = queryDto.toQuery(engine);

    List<Job> matchingJobs;
    if (firstResult != null || maxResults != null) {
View Full Code Here

    return queryJobsCount(queryDto);
  }

  @Override
  public CountResultDto queryJobsCount(JobQueryDto queryDto) {
    ProcessEngine engine = getProcessEngine();
    queryDto.setObjectMapper(getObjectMapper());
    JobQuery query = queryDto.toQuery(engine);

    long count = query.count();
    CountResultDto result = new CountResultDto();
View Full Code Here

  public CaseDefinitionResource getCaseDefinitionByKey(String caseDefinitionKey) {
    if(caseDefinitionKey == null) {
      throw new InvalidRequestException(Status.BAD_REQUEST, "Query parameter 'caseDefinitionKey' cannot be null");
    }

    ProcessEngine engine = getProcessEngine();
    RepositoryService repositoryService = engine.getRepositoryService();
    CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();

    query
      .caseDefinitionKey(caseDefinitionKey)
      .latestVersion();
View Full Code Here

  @Override
  public List<CaseDefinitionDto> getCaseDefinitions(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
    CaseDefinitionQueryDto queryDto = new CaseDefinitionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
    List<CaseDefinitionDto> definitions = new ArrayList<CaseDefinitionDto>();

    ProcessEngine engine = getProcessEngine();
    CaseDefinitionQuery query = queryDto.toQuery(engine);

    List<CaseDefinition> matchingDefinitions = null;

    if (firstResult != null || maxResults != null) {
View Full Code Here

  @Override
  public CountResultDto getCaseDefinitionsCount(UriInfo uriInfo) {
    CaseDefinitionQueryDto queryDto = new CaseDefinitionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());

    ProcessEngine engine = getProcessEngine();
    CaseDefinitionQuery query = queryDto.toQuery(engine);

    long count = query.count();
    CountResultDto result = new CountResultDto();
    result.setCount(count);
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.ProcessEngine

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.