Package org.jbpm.pvm

Examples of org.jbpm.pvm.Activity


        for (EventListenerReference eventListenerReference: eventListenerReferences) {
         
          if ( (observableElement.equals(eventSource)) // this event is not propagated
               || (eventListenerReference.isPropagationEnabled()) // propagation is allowed
             ) {
            Activity activity = eventListenerReference.get();
           
            log.finest("executing "+activity+" for "+event);
            try {
              this.userCodeType = UserCodeType.EVENT_ACTIVITY;
              activity.execute(this);
            } catch (Exception e) {
              log.finest("exception during action: "+e);
              handleException((ObservableElementImpl) observableElement, event, eventListenerReference, e, "couldn't run action "+activity);
            } finally {
              this.userCodeType = null;
View Full Code Here


    }
   
    @Override
    public void run() {
      try {
        Activity activity = timer.getActivityReference().get();
        if (activity != null) {
          Environment tmpEnvironment = null;
          try {
            if (Environment.getCurrent() == null) {
              tmpEnvironment =
                environmentFactory.openEnvironment();
            }
            activity.execute(timer.getExecution());
          } finally {
            if (tmpEnvironment != null)
              tmpEnvironment.close();
          }
        } else {
View Full Code Here

    if (activityReferences==null) {
      return null;
    }
    List<Activity> activities = new ArrayList<Activity>(activityReferences.size());
    for (ObjectReference<Activity> activityReference : activityReferences) {
      Activity activity = activityReference.get();
      activities.add(activity);
    }
    return activities;
  }
View Full Code Here

 
  private void executeHandler(ExecutionImpl execution, Exception exception) {
    if (activityReferences!=null) {
      for (ObjectReference<Activity> actionReference: activityReferences) {
       
        Activity activity = actionReference.get();
       
        log.finest("executing "+activity+" for "+this);
        try {
          execution.userCodeType = UserCodeType.EXCEPTION_HANDLER;
          activity.execute(execution);
        } catch (RuntimeException e) {
          throw e;
        } catch (Exception e) {
          throw new PvmException("couldn't execute "+activity, e);
        } finally {
View Full Code Here

      } else {
        log.finest("executing "+node);
      }
    }
   
    Activity activity = node.getBehaviour();
   
    try {
      execution.userCodeType = ExecutionImpl.UserCodeType.NODE_BEHAVIOUR;
      execution.propagation = Propagation.UNSPECIFIED;
      activity.execute(execution);
    } catch (Exception e) {
      execution.handleException(node, null, null, e, "couldn't execute node behaviour "+activity);
    } finally {
      execution.userCodeType = null;
    }
View Full Code Here

  public void setBehaviourReference(ObjectReference<Activity> behaviourReference) {
    this.behaviourReference = behaviourReference;
  }

  public Activity getBehaviour() {
    Activity behaviour = ( behaviourReference!=null ? behaviourReference.get() : null);
    if (behaviour==null) {
      throw new PvmException("no behaviour on "+this);
    }
    return behaviour;
  }
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.Activity

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.