Package org.activiti.engine

Examples of org.activiti.engine.ActivitiException


        logger.log(Level.FINE, "ProcessEngineLookup service "+processEngineLookup.getClass()+" retuned 'null' value.");
      }
    }
   
    if(processEngineLookup == null) {
      throw new ActivitiException("Could not find an implementation of the org.activiti.cdi.spi.ProcessEngineLookup service " +
          "returning a non-null processEngine. Giving up.");
    }
   
    ActivitiServices activitiServices = ProgrammaticBeanLookup.lookup(ActivitiServices.class, beanManager);
    activitiServices.setProcessEngine(processEngine);
View Full Code Here


  @Override
  public void ungetProcessEngine() {
    try {
      ProcessEngines.getProcessEngine(getProcessEngineName()).close();
    } catch (Exception e) {
      throw new ActivitiException("Unable to close the local ProcessEngine", e);
    }
  }
View Full Code Here

        throw (Exception) cause;
      } else {
        throw e;
      }
    } catch (Exception e) {
      throw new ActivitiException("Error while starting process using @StartProcess on method  '"+ctx.getMethod()+"': " + e.getMessage(), e);
    }
  }
View Full Code Here

    this.picture = picture;
  }

  public Object execute(CommandContext commandContext) {
    if(userId == null) {
      throw new ActivitiException("userId is null");
    }
    UserEntity user = (UserEntity) commandContext
      .getUserManager()
      .findUserById(userId);
    if(user == null) {
      throw new ActivitiException("user "+userId+" doesn't exist");
    }
    user.setPicture(picture);
    return null;
  }
View Full Code Here

  }

  public Void execute(CommandContext commandContext) {
   
    if(executionId == null) {
      throw new ActivitiException("ProcessInstanceId cannot be null.");
    }
   
    ExecutionEntity executionEntity = commandContext.getExecutionManager()
      .findExecutionById(executionId);

    if(executionEntity == null) {
      throw new ActivitiException("Cannot find processInstance for id '"+executionId+"'.");
    }
    if(!executionEntity.isProcessInstance()) {
      throw new ActivitiException("Cannot set suspension state for execution '"+executionId+"': not a process instance.");
    }
   
    SuspensionStateUtil.setSuspensionState(executionEntity, getNewState());
   
    // All child executions are suspended
View Full Code Here

    TaskEntity task = Context
      .getCommandContext()
      .getTaskManager()
      .findTaskById(taskId);
    if (task == null) {
      throw new ActivitiException("No task found for taskId '" + taskId +"'");
    }
   
    if(task.getTaskDefinition() != null) {
      TaskFormHandler taskFormHandler = task.getTaskDefinition().getTaskFormHandler();
      if (taskFormHandler == null) {
        throw new ActivitiException("No taskFormHandler specified for task '" + taskId +"'");
      }
     
      return taskFormHandler.createTaskForm(task);
    } else {
      // Standalone task, no TaskFormData available
View Full Code Here

    if (is != null) {
      InputRepresentation output = new InputRepresentation(is);
      return output;
   
    } else if (form != null){
      throw new ActivitiException("The form for process definition '" + processDefinitionId + "' failed to render.");
   
    } else {
      throw new ActivitiException("The form for process definition '" + processDefinitionId + "' cannot be rendered using the rest api.");
    }
  }
View Full Code Here

      }
      StartProcessInstanceResponse response = new StartProcessInstanceResponse(processInstance);
      return response;
     
    } catch (Exception e) {
      throw new ActivitiException("Failed to retrieve the process definition parameters", e);
    }
  }
View Full Code Here

  public ObjectNode getTasksSummary() {
    if(authenticate() == false) return null;
   
    String user = getQuery().getValues("user");
    if(user == null) {
      throw new ActivitiException("No user provided");
    }
   
    TaskService ts = ActivitiUtil.getTaskService();
   
    GroupQuery query = ActivitiUtil.getIdentityService()
View Full Code Here

    } else {
     
      ExecutionEntity execution = commandContext.getExecutionManager().findExecutionById(executionId);
     
      if (execution == null) {
        throw new ActivitiException("Cannot find execution with id '" + executionId + "'");
      }
     
      if (execution.isSuspended()) {
        throw new ActivitiException("Cannot throw signal event '" + eventName
                + "' because execution '" + executionId + "' is suspended");
      }
     
      signalEvents = commandContext.getEventSubscriptionManager()
        .findSignalEventSubscriptionsByNameAndExecution(eventName, executionId);
     
      if(signalEvents.isEmpty()) {
        throw new ActivitiException("Execution '"+executionId+"' has not subscribed to a signal event with name '"+eventName+"'.");     
      }
    }
       
    HashMap<String, Object> payload = null;
    if(variables != null) {
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.