Package org.camunda.bpm.engine.impl.pvm

Examples of org.camunda.bpm.engine.impl.pvm.PvmException


    transition.setSource(this);
    outgoingTransitions.add(transition);

    if (transitionId!=null) {
      if (namedOutgoingTransitions.containsKey(transitionId)) {
        throw new PvmException("activity '"+id+" has duplicate transition '"+transitionId+"'");
      }
      namedOutgoingTransitions.put(transitionId, transition);
    }

    return transition;
View Full Code Here


  // methods that translate to operations /////////////////////////////////////

  public void signal(String signalName, Object signalData) {
    if (getActivity() == null) {
      throw new PvmException("cannot signal execution " + this.id + ": it has no current activity");
    }

    SignallableActivityBehavior activityBehavior = (SignallableActivityBehavior) activity.getActivityBehavior();
    try {
      activityBehavior.signal(this, signalName, signalData);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new PvmException("couldn't process signal '"+signalName+"' on activity '"+activity.getId()+"': "+e.getMessage(), e);
    }
  }
View Full Code Here

    }
  }

  public void take(PvmTransition transition) {
    if (this.transition!=null) {
      throw new PvmException("already taking a transition");
    }
    if (transition==null) {
      throw new PvmException("transition is null");
    }
    TransitionImpl transitionImpl = (TransitionImpl) transition;
    setActivity(transitionImpl.getSource());
    setTransition(transitionImpl);
    performOperation(PvmAtomicOperation.TRANSITION_NOTIFY_LISTENER_END);
View Full Code Here

    ArrayList<PvmExecutionImpl> recyclableExecutions = (_recyclableExecutions!=null ? new ArrayList<PvmExecutionImpl>((List)_recyclableExecutions) : new ArrayList<PvmExecutionImpl>());

    if (recyclableExecutions.size()>1) {
      for (PvmExecutionImpl recyclableExecution: recyclableExecutions) {
        if (recyclableExecution.isScope()) {
          throw new PvmException("joining scope executions is not allowed");
        }
      }
    }

    PvmExecutionImpl concurrentRoot = ((isConcurrent && !isScope) ? getParent() : this);
View Full Code Here

  public ActivityImpl createActivity(String activityId) {
    ActivityImpl activity = new ActivityImpl(activityId, processDefinition);
    if (activityId!=null) {
      if (processDefinition.findActivity(activityId) != null) {
        throw new PvmException("duplicate activity id '" + activityId + "'");
      }
      namedActivities.put(activityId, activity);
    }
    activity.setParent(this);
    activities.add(activity);
View Full Code Here

        if ((redirectCommons != null) && (!redirectCommons.equalsIgnoreCase("false"))) {
          System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.Jdk14Logger");
        }
      }
    } catch (Exception e) {
      throw new PvmException("couldn't initialize logging properly", e);
    } finally {
      IoUtil.closeSilently(inputStream);
    }
  }
View Full Code Here

      } else if (SUSPENDING_ON_PARENT_SUSPENSION.equals(currentState)) {
        execution.performParentSuspension();

      } else {
        throw new PvmException("Could not suspend case execution '"+id+"': excpected {terminatingOnTermination|terminatingOnExit}, but was " +currentState+ ".");

      }
    }
  }
View Full Code Here

      } else if (TERMINATING_ON_PARENT_TERMINATION.equals(currentState)) {
        String message = "It is not possible to parentTerminate case execution '"+id+"' which associated with a "+getTypeName()+".";
        throw createIllegalStateTransitionException("parentTerminate", message, execution);

      } else {
        throw new PvmException("Could not terminate case execution '"+id+"': excpected {terminatingOnTermination|terminatingOnExit}, but was " +currentState+ ".");

      }
    }
  }
View Full Code Here

        try {
          execution.invokeListener(listener);
        } catch (RuntimeException e) {
          throw e;
        } catch (Exception e) {
          throw new PvmException("couldn't execute event listener : "+e.getMessage(), e);
        }
        execution.setListenerIndex(listenerIndex+1);
        execution.performOperationSync(this);

      } else {
View Full Code Here

    try {
      activityBehavior.execute(execution);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new PvmException("couldn't execute activity <"+activity.getProperty("type")+" id=\""+activity.getId()+"\" ...>: "+e.getMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.pvm.PvmException

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.