Package org.jbpm.api

Examples of org.jbpm.api.JbpmException


    Session session = Environment.getFromCurrent(Session.class);

    if (taskDbid!=null) {
      TaskImpl task = (TaskImpl) session.get(TaskImpl.class, taskDbid);
      if (task==null) {
        throw new JbpmException("task "+taskDbid+" was not found");
      }

      Set<ParticipationImpl> participations = new HashSet<ParticipationImpl>(task.getParticipations());
      for (ParticipationImpl participation : participations) {
        boolean userMatch = userId!=null ? userId.equals(participation.getUserId()) : false;
View Full Code Here


    } else if (value instanceof String) {
      stringValue = (String)value;
    } else if (value instanceof Long) {
      longValue = (Long)value;
    } else {
      throw new JbpmException("value type "+value.getClass().getName()+" not supported (only string and long)");
    }
  }
View Full Code Here

 
  protected String executionId = null;
 
  public SetExecutionVariablesCmd(String executionId) {
    if (executionId==null) {
      throw new JbpmException("executionId is null");
    }
    this.executionId = executionId;
  }
View Full Code Here

 
  protected String taskId;
 
  public GetTaskCmd(String taskId) {
    if (taskId==null) {
      throw new JbpmException("taskId is null");
    }
    this.taskId = taskId;
  }
View Full Code Here

  public Object execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
   
    DeploymentImpl deployment = (DeploymentImpl) repositorySession.getDeployment(deploymentId);
    if (deployment==null) {
      throw new JbpmException("deployment "+deploymentId+" doesn't exist");
    }
   
    deployment.suspend();
   
    // removing deployment from the cache
View Full Code Here

      oos.writeObject(o);
      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      ObjectInputStream ois = new ObjectInputStream(bais);
      return ois.readObject();
    } catch (Exception e) {
      throw new JbpmException("serialization exception", e);
    }
  }
View Full Code Here

  protected String commentId;
 
  public DeleteCommentCmd(String commentId) {
    if (commentId==null) {
      throw new JbpmException("commentId is null");
    }
    this.commentId = commentId;
  }
View Full Code Here

    HistoryDetailImpl comment = (HistoryDetailImpl) dbSession.get(HistoryDetailImpl.class, Long.parseLong(commentId));
    if (comment!=null) {
      dbSession.delete(comment);
     
    } else {
      throw new JbpmException("comment "+commentId+" doesn't exist");
    }
    return null;
  }
View Full Code Here

          addResourceFromStreamInput(entryName, new ByteArrayStreamInput(bytes));
        }
        zipEntry = zipInputStream.getNextEntry();
      }
    } catch (Exception e) {
      throw new JbpmException("couldn't read zip archive", e);
    }
    return this;
  }
View Full Code Here

    try {
      InputStream inputStream = streamInput.openStream();
      bytes = IoUtil.readBytes(inputStream);
      inputStream.close();
    } catch (IOException e) {
      throw new JbpmException("couldn't read from "+streamInput, e);
    }
    Lob lob = new Lob(bytes);
    resources.put(name, lob);
    return this;
  }
View Full Code Here

TOP

Related Classes of org.jbpm.api.JbpmException

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.