Package org.camunda.bpm.engine.cdi

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


  }

  @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

    getScopedAssociation().flushVariableCache();
  }

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

      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

      } 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

Related Classes of org.camunda.bpm.engine.cdi.ProcessEngineCdiException

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.