Examples of ProcessEngineCdiException


Examples of org.camunda.bpm.engine.cdi.ProcessEngineCdiException

      boolean endConversation = completeTaskAnnotation.endConversation();   
      businessProcess.completeTask(endConversation);    

      return result;
    } catch (InvocationTargetException e) {
      throw new ProcessEngineCdiException("Error while completing task: "+e.getCause().getMessage(), e.getCause());
    }
  }
View Full Code Here

Examples of org.camunda.bpm.engine.cdi.ProcessEngineCdiException

  }

  @Override
  public void setExecution(Execution execution) {
    if(execution == null) {
      throw new ProcessEngineCdiException("Cannot associate with execution: null");
    }
    ensureCommandContextNotActive();

    ScopedAssociation scopedAssociation = getScopedAssociation();
    Execution associatedExecution = scopedAssociation.getExecution();
    if(associatedExecution!=null && !associatedExecution.getId().equals(execution.getId())) {
      throw new ProcessEngineCdiException("Cannot associate "+execution+", already associated with "+associatedExecution+". Disassociate first!");
    }

    if (log.isLoggable(Level.FINE)) {
      log.fine("Associating "+execution+" (@"
                + scopedAssociation.getClass().getAnnotations()[0].annotationType().getSimpleName() + ")");
View Full Code Here

Examples of org.camunda.bpm.engine.cdi.ProcessEngineCdiException

    getScopedAssociation().flushVariableCache();
  }

  protected void ensureCommandContextNotActive() {
    if(Context.getCommandContext() != null) {
      throw new ProcessEngineCdiException("Cannot work with scoped associations inside command context.");
    }
  }
View Full Code Here

Examples of org.camunda.bpm.engine.cdi.ProcessEngineCdiException

      return (T) value;
    }

    public void setVariableLocal(String variableName, Object value) {
      if (execution == null && task == null) {
        throw new ProcessEngineCdiException("Cannot set a local cached variable: neither a Task nor an Execution is associated.");
      }

      cachedVariablesLocal.put(variableName, value);
    }
View Full Code Here

Examples of org.camunda.bpm.engine.cdi.ProcessEngineCdiException

      } else if(execution != null) {
        runtimeService.setVariablesLocal(execution.getId(), cachedVariablesLocal);
        runtimeService.setVariables(execution.getId(), cachedVariables);

      } else {
        throw new ProcessEngineCdiException("Cannot flush variable cache: neither a Task nor an Execution is associated.");

      }

      // clear variable cache after flush
      cachedVariables.clear();
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.