Package org.camunda.bpm.engine

Examples of org.camunda.bpm.engine.ProcessEngineException


      parseRootElement();

    } catch (Exception e) {
      LOGGER.log(Level.SEVERE, "Unknown exception", e);

      throw new ProcessEngineException("Error while parsing deployment descriptor: " + e.getMessage(), e);

    } finally {
      if (hasWarnings()) {
        logWarnings();
      }
View Full Code Here


    ApplicationContext applicationContext = new GenericXmlApplicationContext(new UrlResource(resource));
    Map<String, ProcessEngine> beansOfType = applicationContext.getBeansOfType(ProcessEngine.class);
    if ( (beansOfType==null)
         || (beansOfType.isEmpty())
       ) {
      throw new ProcessEngineException("no "+ProcessEngine.class.getName()+" defined in the application context "+resource.toString());
    }
   
    ProcessEngine processEngine = beansOfType.values().iterator().next();

    log.fine("==== SPRING PROCESS ENGINE CREATED ==================================================================");
View Full Code Here

  public void setValue(ELContext context, Object base, Object property, Object value) {
    if(base == null) {
      String key = (String) property;
      if (applicationContext.containsBean(key)) {
        throw new ProcessEngineException("Cannot set value of '" + property +
          "', it resolves to a bean defined in the Spring application-context.");
      }
    }
  }
View Full Code Here

  public void execute(DelegateExecution execution) throws Exception {

    Boolean fail = (Boolean) execution.getVariable("fail");

    if (fail == null || fail == true) {
      throw new ProcessEngineException(EXCEPTION_MESSAGE);
    }

  }
View Full Code Here

*/
public class TransactionRollbackTest extends PluggableProcessEngineTestCase {
 
  public static class Buzzz implements ActivityBehavior {
    public void execute(ActivityExecution execution) throws Exception {
      throw new ProcessEngineException("Buzzz");
    }
View Full Code Here

  public void execute(DelegateExecution execution) throws Exception {
    Object nrOfCompletedInstances = execution.getVariable("nrOfCompletedInstances");   
    Integer variable = SetVariablesDelegate.variablesMap.get(nrOfCompletedInstances);
    Object variableLocal = execution.getVariable("variable");
    if(!variableLocal.equals(variable)) {
      throw new ProcessEngineException("wrong variable passed in to compensation handler");
    }
  }
View Full Code Here

  public void execute(DelegateExecution execution) throws Exception {
   
    Boolean fail = (Boolean) execution.getVariable("fail");
   
    if (fail != null && fail == true) {
      throw new ProcessEngineException("Expected exception");
    }
  }
View Full Code Here

  }
 
  protected void checkQueryOk() {
    super.checkQueryOk();
    if (includeIncidents && includeIncidentsForType != null) {
      throw new ProcessEngineException("Invalid query: It is not possible to use includeIncident() and includeIncidentForType() to execute one query.");
    }
  }
View Full Code Here

  public U executeSingleResult(CommandContext commandContext) {
    List<U> results = executeList(commandContext, getParameterMap(), 0, Integer.MAX_VALUE);
    if (results.size() == 1) {
      return results.get(0);
    } else if (results.size() > 1) {
      throw new ProcessEngineException("Query return " + results.size() + " results instead of max 1");
    }
    return null;
  }
View Full Code Here

  public void execute(DelegateExecution execution) throws Exception {
   
    Boolean fail = (Boolean) execution.getVariable("fail");
   
    if (fail != null && fail) {
      throw new ProcessEngineException("Exception expected.");
    }
  }
View Full Code Here

TOP

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

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.