Package org.activiti.engine

Examples of org.activiti.engine.ActivitiException


                        .createProcessDefinitionQuery()
                        .deploymentId(deployment.getId()).list()) {
                    this.syncProcessDefinition(processDefinition.getId());
                }
            } catch (IOException ex) {
                throw new ActivitiException("couldn't auto deploy resource '"
                        + resource + "': " + ex.getMessage(), ex);
            }
        }
    }
View Full Code Here


    public ExecutionEntity createProcessInstance(
            ProcessDefinitionEntity processDefinition, String id) {
        ActivityImpl initial = processDefinition.getInitial();

        if (initial == null) {
            throw new ActivitiException(
                    "Cannot start process instance, initial activity where the process instance should start is null.");
        }

        ExecutionEntity processInstance = new ExecutionEntity(initial);
        processInstance.setId(id);
View Full Code Here

                (Integer) executionEntity.getVariableLocal("nrOfInstances") - 1);

        // 如果串行要删除的人是当前active执行,
        if (executionEntity.getVariableLocal(collectionElementVariableName)
                .equals(assignee)) {
            throw new ActivitiException("当前正在执行的实例,无法移除!");
        }

        log.info("移除后审批列表 : {}", col.toString());
    }
View Full Code Here

                        .put(superExecutionId, processInstanceJSON);
            }
        }

        if (processDefinitionId == null) {
            throw new ActivitiException("No process definition id provided");
        }

        processDefinition = (ProcessDefinitionEntity) repositoryService
                .getDeployedProcessDefinition(processDefinitionId);

        if (processDefinition == null) {
            throw new ActivitiException("Process definition "
                    + processDefinitionId + " could not be found");
        }

        ObjectNode responseJSON = new ObjectMapper().createObjectNode();
View Full Code Here

    public Group singleResult() {
        if (result == null) {
            execute();
        }
        if (result.isEmpty()) {
            throw new ActivitiException("Empty result");
        }

        return result.get(0);
    }
View Full Code Here

    public User singleResult() {
        if (result == null) {
            execute();
        }
        if (result.isEmpty()) {
            throw new ActivitiException("Empty result");
        }

        return result.get(0);
    }
View Full Code Here

  protected Class< ? extends ScopedAssociation> getBroadestActiveContext() {
    for (Class< ? extends ScopedAssociation> scopeType : getAvailableScopedAssociationClasses()) {
      Annotation scopeAnnotation = scopeType.getAnnotations().length > 0 ? scopeType.getAnnotations()[0] : null;
      if (scopeAnnotation == null || !beanManager.isScope(scopeAnnotation.annotationType())) {
        throw new ActivitiException("ScopedAssociation must carry exactly one annotation and it must be a @Scope annotation");
      }
      try {
        beanManager.getContext(scopeAnnotation.annotationType());
        return scopeType;
      } catch (ContextNotActiveException e) {
        log.finest("Context " + scopeAnnotation.annotationType() + " not active.");           
      }
    }
    throw new ActivitiException("Could not determine an active context to associate the current process instance / task instance with.");
  }
View Full Code Here

    if(Context.getCommandContext() != null) {
      throw new ActivitiCdiException("Cannot work with scoped associations inside command context.");
    }
    ScopedAssociation scopedAssociation = getScopedAssociation();
    if (scopedAssociation.getExecution() == null) {
      throw new ActivitiException("Cannot dissasociate execution, no "
                + scopedAssociation.getClass().getAnnotations()[0].annotationType().getSimpleName()
                + " execution associated. ");
    }
    if (log.isLoggable(Level.FINE)) {
      log.fine("Disassociating");
View Full Code Here

    if (jndiName != null) {
      try {
        return (BeanManager) InitialContext.doLookup(jndiName);
      } catch (NamingException e) {
        throw new ActivitiException("Could not lookup beanmanager in jndi using name: '" + jndiName + "'.", e);
      }
    }

    try {
      // in an application server
      return (BeanManager) InitialContext.doLookup("java:comp/BeanManager");
    } catch (NamingException e) {
      // silently ignore
    }

    try {
      // in a servlet container
      return (BeanManager) InitialContext.doLookup("java:comp/env/BeanManager");
    } catch (NamingException e) {
      // silently ignore
    }

    throw new ActivitiException(
            "Could not lookup beanmanager in jndi. If no jndi is avalable, set the beanmanger to the 'localInstance' property of this class.");
  }
View Full Code Here

  }

  protected BeanManager getBeanManager() {
    BeanManager bm = BeanManagerLookup.getBeanManager();
    if (bm == null) {
      throw new ActivitiException("No cdi bean manager avaiable, cannot publish event.");
    }
    return bm;
  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.ActivitiException

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.