Package org.camunda.bpm.application

Examples of org.camunda.bpm.application.ProcessApplicationReference


  }

  public static boolean requiresContextSwitch(ProcessApplicationReference processApplicationReference) {

    final ProcessApplicationReference currentProcessApplication = Context.getCurrentProcessApplication();

    if(processApplicationReference == null) {
      return false;
    }

    if(currentProcessApplication == null) {
      return true;
    }
    else {
      if(!processApplicationReference.getName().equals(currentProcessApplication.getName())) {
        return true;
      }
      else {
        // check whether the thread context has been manipulated since last context switch. This can happen as a result of
        // an operation causing the container to switch to a different application.
View Full Code Here


    this.deploymentId = deploymentId;
  }

  public String execute(CommandContext commandContext) {
   
    ProcessApplicationReference reference = Context.getProcessEngineConfiguration()
      .getProcessApplicationManager()
      .getProcessApplicationForDeployment(deploymentId);
   
    if(reference != null) {
      return reference.getName();
    } else {
      return null;
    }
  }
View Full Code Here

  }

  protected ProcessApplicationRegistration registerProcessApplication(CommandContext commandContext, DeploymentEntity deployment,
      Set<String> additionalProcessKeysToRegisterFor) {
    ProcessApplicationDeploymentBuilderImpl appDeploymentBuilder = (ProcessApplicationDeploymentBuilderImpl) deploymentBuilder;
    final ProcessApplicationReference appReference = appDeploymentBuilder.getProcessApplicationReference();

    // build set of deployment ids this process app should be registered for:
    Set<String> deploymentsToRegister = new HashSet<String>(Collections.singleton(deployment.getId()));

    if (appDeploymentBuilder.isResumePreviousVersions()) {
View Full Code Here

  protected boolean shouldPerformPaContextSwitch(DelegateExecution execution) {
    if(execution == null) {
      return false;
    } else {
      ProcessApplicationReference targetPa = ProcessApplicationContextUtil.getTargetProcessApplication((ExecutionEntity) execution);
      return targetPa != null && !targetPa.equals(Context.getCurrentProcessApplication());
    }
  }
View Full Code Here

*/
public class ProcessApplicationBeanElResolverDelegate extends AbstractElResolverDelegate {

  protected ELResolver getElResolverDelegate() {

    ProcessApplicationReference processApplicationReference = Context.getCurrentProcessApplication();
    if(processApplicationReference != null) {

      try {
        ProcessApplicationInterface processApplication = processApplicationReference.getProcessApplication();
        return processApplication.getBeanElResolver();

      } catch (ProcessApplicationUnavailableException e) {
        throw new ProcessEngineException("Cannot access process application '"+processApplicationReference.getName()+"'", e);
      }

    } else {
      return new BeanELResolver();
    }
View Full Code Here

    this.transactionContext = transactionContextFactory.openTransactionContext(this);
  }

  public void performOperation(final AtomicOperation executionOperation, final ExecutionEntity execution) {

    ProcessApplicationReference targetProcessApplication = getTargetProcessApplication(execution);

    if(requiresContextSwitch(targetProcessApplication)) {

      Context.executeWithinProcessApplication(new Callable<Void>() {
        public Void call() throws Exception {
View Full Code Here

    }

  }

  public void performOperation(final CmmnAtomicOperation executionOperation, final CaseExecutionEntity execution) {
    ProcessApplicationReference targetProcessApplication = getTargetProcessApplication(execution);

    if(requiresContextSwitch(targetProcessApplication)) {

      Context.executeWithinProcessApplication(new Callable<Void>() {
        public Void call() throws Exception {
View Full Code Here

*/
public class ProcessApplicationElResolverDelegate extends ELResolver {
 
  protected ELResolver getProcessApplicationElResolverDelegate() {
   
    ProcessApplicationReference processApplicationReference = Context.getCurrentProcessApplication();
    if(processApplicationReference != null) {
     
      try {
        ProcessApplicationInterface processApplication = processApplicationReference.getProcessApplication();
        return processApplication.getElResolver();
       
      } catch (ProcessApplicationUnavailableException e) {
        throw new ProcessEngineException("Cannot access process application '"+processApplicationReference.getName()+"'", e);
      }
     
    } else {
      return null;
    }
View Full Code Here

  }

  // Signallable activity behavior
  public void signal(final ActivityExecution execution, final String signalName, final Object signalData) throws Exception {

    ProcessApplicationReference targetProcessApplication = ProcessApplicationContextUtil.getTargetProcessApplication((ExecutionEntity) execution);

    if(!ProcessApplicationContextUtil.requiresContextSwitch(targetProcessApplication)) {
      ActivityBehavior activityBehaviorInstance = getActivityBehaviorInstance(execution);

      if (activityBehaviorInstance instanceof SignallableActivityBehavior) {
View Full Code Here

  public static ProcessApplicationReference getTargetProcessApplication(ExecutionEntity execution) {
    if (execution == null) {
      return null;
    }

    ProcessApplicationReference processApplicationForDeployment = getTargetProcessApplication(execution.getProcessDefinition().getDeploymentId());

    // logg application context switch details
    if(LOGG.isLoggable(Level.FINE) && processApplicationForDeployment == null) {
      loggContextSwitchDetails(execution);
    }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.application.ProcessApplicationReference

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.