Package org.activiti.engine

Examples of org.activiti.engine.ActivitiException


  public FormPropertyRenderer getPropertyRendererForType(FormType formType) {
    Class<? extends FormType> clazz = formType.getClass();
    FormPropertyRenderer renderer = propertyRenderers.get(clazz);
   
    if(renderer == null) {
      throw new ActivitiException("No property renderer found for type: " +
        formType.getName() + ", " + formType.getClass());
    }
    return renderer;
  }
View Full Code Here


    this.resourceName = resourceName;
  }

  public InputStream execute(CommandContext commandContext) {
    if (deploymentId == null) {
      throw new ActivitiException("deploymentId is null");
    }
    if(resourceName == null) {
      throw new ActivitiException("resourceName is null");
    }
   
    ResourceEntity resource = commandContext
      .getResourceManager()
      .findResourceByDeploymentIdAndResourceName(deploymentId, resourceName);
    if(resource == null) {
      throw new ActivitiException("no resource found with name '" + resourceName + "' in deployment '" + deploymentId + "'");
    }
    return new ByteArrayInputStream(resource.getBytes());
  }
View Full Code Here

  public UserInfo getUser() {
    if(authenticate() == false) return null;
   
    String userId = (String) getRequest().getAttributes().get("userId");
    if(userId == null) {
      throw new ActivitiException("No userId provided");
    }
    User user = ActivitiUtil.getIdentityService().createUserQuery().userId(userId).singleResult();
    UserInfo response = new UserInfo(user);
    return response;
  }
View Full Code Here

    this.entityClass = entityClass;
  }

  public String execute(CommandContext commandContext) {
    if(entityClass == null) {
      throw new ActivitiException("entityClass is null");
    }
    return commandContext
      .getTableDataManager()
      .getTableName(entityClass, true);
  }
View Full Code Here

  public InputRepresentation getPicture() {
    if(authenticate() == false) return null;
   
    String userId = (String) getRequest().getAttributes().get("userId");
    if(userId == null) {
      throw new ActivitiException("No userId provided");
    }
    Picture picture = ActivitiUtil.getIdentityService().getUserPicture(userId);
   
    String contentType = picture.getMimeType();
    MediaType mediatType = MediaType.IMAGE_PNG;
View Full Code Here

    this.cascade = cascade;
  }

  public Void execute(CommandContext commandContext) {
    if(deploymentId == null) {
      throw new ActivitiException("deploymentId is null");
    }

    commandContext
      .getDeploymentManager()
      .deleteDeployment(deploymentId, cascade);
View Full Code Here

    this.isLocal = isLocal;
  }

  public Map<String, Object> execute(CommandContext commandContext) {
    if(executionId == null) {
      throw new ActivitiException("executionId is null");
    }
   
    ExecutionEntity execution = commandContext
      .getExecutionManager()
      .findExecutionById(executionId);
   
    if (execution==null) {
      throw new ActivitiException("execution "+executionId+" doesn't exist");
    }

    Map<String, Object> executionVariables;
    if (isLocal) {
      executionVariables = execution.getVariablesLocal();
View Full Code Here

 
  protected void initializeProcessEngine() {
    if (cachedProcessEngine==null) {
      cachedProcessEngine = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration().setProcessEngineName("default").buildProcessEngine();
      if (cachedProcessEngine==null) {
        throw new ActivitiException("no in-memory process engine available");
      }
      // hack to circumvent the loading of the activiti-context.xml of the REST web application
      ProcessEnginesRest.init();
      ProcessEngines.registerProcessEngine(cachedProcessEngine);
    }
View Full Code Here

          .getDelegateInterceptor()
          .handleInvocation(new JavaDelegateInvocation((JavaDelegate) delegate, execution));
        leave(execution);

      } else {
        throw new ActivitiException("Delegate expression " + expression
                + " did neither resolve to an implementation of " + ActivityBehavior.class
                + " nor " + JavaDelegate.class);
      }
    } catch (Exception exc) {
View Full Code Here

      ObjectNode successNode = new ObjectMapper().createObjectNode();
      successNode.put("success", true);
      return successNode;
     
    } catch (Exception e) {
      throw new ActivitiException("Failed to execute jobs", e);
    }
  }
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.