Examples of SubProcessActivityBehavior


Examples of org.activiti.engine.impl.bpmn.behavior.SubProcessActivityBehavior

  }
 
  // Subprocess
 
  public SubProcessActivityBehavior createSubprocActivityBehavior(SubProcess subProcess) {
    return new SubProcessActivityBehavior();
  }
View Full Code Here

Examples of org.activiti.engine.impl.bpmn.behavior.SubProcessActivityBehavior

    Boolean isTriggeredByEvent = parseBooleanAttribute(subProcessElement.attribute("triggeredByEvent"), false);
    activity.setProperty("triggeredByEvent", isTriggeredByEvent);
   
    // event subprocesses are not scopes
    activity.setScope(!isTriggeredByEvent);
    activity.setActivityBehavior(new SubProcessActivityBehavior());
    parseScope(subProcessElement, activity);

    for (BpmnParseListener parseListener : parseListeners) {
      parseListener.parseSubProcess(subProcessElement, scope, activity);
    }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.delegate.SubProcessActivityBehavior

  }

  @Override
  protected void eventNotificationsCompleted(InterpretableExecution execution) {
    InterpretableExecution superExecution = execution.getSuperExecution();
    SubProcessActivityBehavior subProcessActivityBehavior = null;

    // copy variables before destroying the ended sub process instance
    if (superExecution!=null) {
      ActivityImpl activity = (ActivityImpl) superExecution.getActivity();
      subProcessActivityBehavior = (SubProcessActivityBehavior) activity.getActivityBehavior();
      try {
        subProcessActivityBehavior.completing(superExecution, execution);
      } catch (RuntimeException e) {
          log.error("Error while completing sub process of execution {}", execution, e);
          throw e;       
      } catch (Exception e) {
          log.error("Error while completing sub process of execution {}", execution, e);
          throw new ActivitiException("Error while completing sub process of execution " + execution, e);
      }
    }
   
    execution.destroy();
    execution.remove();

    // and trigger execution afterwards
    if (superExecution!=null) {
      superExecution.setSubProcessInstance(null);
      try {
          subProcessActivityBehavior.completed(superExecution);
      } catch (RuntimeException e) {
          log.error("Error while completing sub process of execution {}", execution, e);
          throw e;
      } catch (Exception e) {
          log.error("Error while completing sub process of execution {}", execution, e);
View Full Code Here

Examples of org.activiti.engine.impl.pvm.delegate.SubProcessActivityBehavior

  }

  @Override
  protected void eventNotificationsCompleted(InterpretableExecution execution) {
    InterpretableExecution superExecution = execution.getSuperExecution();
    SubProcessActivityBehavior subProcessActivityBehavior = null;

    // copy variables before destroying the ended sub process instance
    if (superExecution!=null) {
      ActivityImpl activity = (ActivityImpl) superExecution.getActivity();
      subProcessActivityBehavior = (SubProcessActivityBehavior) activity.getActivityBehavior();
      try {
        subProcessActivityBehavior.completing(superExecution, execution);
      } catch (RuntimeException e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
          throw e;       
      } catch (Exception e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
          throw new ActivitiException("Error while completing sub process of execution " + execution, e);
      }
    }
   
    execution.destroy();
    execution.remove();

    // and trigger execution afterwards
    if (superExecution!=null) {
      superExecution.setSubProcessInstance(null);
      try {
          subProcessActivityBehavior.completed(superExecution);
      } catch (RuntimeException e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
          throw e;
      } catch (Exception e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
View Full Code Here

Examples of org.camunda.bpm.engine.impl.bpmn.behavior.SubProcessActivityBehavior

    Boolean isTriggeredByEvent = parseBooleanAttribute(subProcessElement.attribute(PROPERTYNAME_TRIGGERED_BY_EVENT), false);
    activity.setProperty(PROPERTYNAME_TRIGGERED_BY_EVENT, isTriggeredByEvent);

    // event subprocesses are not scopes
    activity.setScope(!isTriggeredByEvent);
    activity.setActivityBehavior(new SubProcessActivityBehavior());
    parseScope(subProcessElement, activity);

    for (BpmnParseListener parseListener : parseListeners) {
      parseListener.parseSubProcess(subProcessElement, scope, activity);
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.bpmn.behavior.SubProcessActivityBehavior

    Boolean isTriggeredByEvent = parseBooleanAttribute(subProcessElement.attribute(PROPERTYNAME_TRIGGERED_BY_EVENT), false);
    activity.setProperty(PROPERTYNAME_TRIGGERED_BY_EVENT, isTriggeredByEvent);

    // event subprocesses are not scopes
    activity.setScope(!isTriggeredByEvent);
    activity.setActivityBehavior(new SubProcessActivityBehavior());
    parseScope(subProcessElement, activity);

    for (BpmnParseListener parseListener : parseListeners) {
      parseListener.parseSubProcess(subProcessElement, scope, activity);
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.pvm.delegate.SubProcessActivityBehavior

    super.eventNotificationsCompleted(execution);

    PvmExecutionImpl superExecution = execution.getSuperExecution();
    CmmnActivityExecution superCaseExecution = execution.getSuperCaseExecution();

    SubProcessActivityBehavior subProcessActivityBehavior = null;
    TransferVariablesActivityBehavior transferVariablesBehavior = null;

    // copy variables before destroying the ended sub process instance
    if (superExecution!=null) {
      ActivityImpl activity = superExecution.getActivity();
      subProcessActivityBehavior = (SubProcessActivityBehavior) activity.getActivityBehavior();
      try {
        subProcessActivityBehavior.completing(superExecution, execution);
      } catch (RuntimeException e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
          throw e;
      } catch (Exception e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
          throw new ProcessEngineException("Error while completing sub process of execution " + execution, e);
      }
    } else if (superCaseExecution != null) {
      CmmnActivity activity = superCaseExecution.getActivity();
      transferVariablesBehavior = (TransferVariablesActivityBehavior) activity.getActivityBehavior();
      try {
        transferVariablesBehavior.transferVariables(execution, superCaseExecution);
      } catch (RuntimeException e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
          throw e;
      } catch (Exception e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
          throw new ProcessEngineException("Error while completing sub process of execution " + execution, e);
      }
    }

    execution.destroy();
    execution.remove();

    // and trigger execution afterwards
    if (superExecution!=null) {
      superExecution.setSubProcessInstance(null);
      try {
          subProcessActivityBehavior.completed(superExecution);
      } catch (RuntimeException e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
          throw e;
      } catch (Exception e) {
          log.log(Level.SEVERE, "Error while completing sub process of execution " + execution, e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.