Package org.activiti.engine.impl.pvm

Examples of org.activiti.engine.impl.pvm.PvmScope


    }
  }


  private static String findLocalErrorEventHandler(ActivityExecution execution, String errorCode) {
    PvmScope scope = execution.getActivity();
    while (scope != null) {
     
      @SuppressWarnings("unchecked")
      List<ErrorEventDefinition> definitions = (List<ErrorEventDefinition>) scope.getProperty(BpmnParse.PROPERTYNAME_ERROR_EVENT_DEFINITIONS);
      if(definitions != null) {     
        // definitions are sorted by precedence, ie. event subprocesses first.     
        for (ErrorEventDefinition errorEventDefinition : definitions) {
          if(errorEventDefinition.catches(errorCode)) {
            return scope.findActivity(errorEventDefinition.getHandlerActivityId()).getId();
          }
        }
      }
     
      // search for error handlers in parent scopes
View Full Code Here


      }
    }
  }

  private static String findLocalErrorEventHandler(ActivityExecution execution, String errorCode) {
    PvmScope scope = execution.getActivity();
    while (scope != null) {
     
      @SuppressWarnings("unchecked")
      List<ErrorEventDefinition> definitions = (List<ErrorEventDefinition>) scope.getProperty(BpmnParse.PROPERTYNAME_ERROR_EVENT_DEFINITIONS);
      if(definitions != null) {     
        // definitions are sorted by precedence, ie. event subprocesses first.     
        for (ErrorEventDefinition errorEventDefinition : definitions) {
          if(errorEventDefinition.catches(errorCode)) {
            return scope.findActivity(errorEventDefinition.getHandlerActivityId()).getId();
          }
        }
      }
     
      // search for error handlers in parent scopes
View Full Code Here

  protected void createCompensateEventSubscription(ActivityExecution execution) {
    String compensationHandlerId = (String) execution.getActivity().getProperty(BpmnParse.PROPERTYNAME_COMPENSATION_HANDLER_ID);
   
    ExecutionEntity executionEntity = (ExecutionEntity) execution;   
    ActivityImpl compensationHandlder = executionEntity.getProcessDefinition().findActivity(compensationHandlerId);
    PvmScope scopeActivitiy = compensationHandlder.getParent();
    ExecutionEntity scopeExecution = ScopeUtil.findScopeExecutionForScope(executionEntity, scopeActivitiy);     

    CompensateEventSubscriptionEntity compensateEventSubscriptionEntity = CompensateEventSubscriptionEntity.createAndInsert(scopeExecution);
    compensateEventSubscriptionEntity.setActivity(compensationHandlder);       
  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.pvm.PvmScope

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.