Package org.jbpm.api

Examples of org.jbpm.api.JbpmException


  protected org.jboss.identity.idm.api.Group findIdmGroupByIdmGroupId(String groupId) {
  try {
    return identitySession.getPersistenceManager().findGroupById(groupId);
  } catch (IdentityException e) {
    throw new JbpmException("couldn't find the group by groupId: " + groupId, e);
 
  }
View Full Code Here


  public List<User> findUsersById(String... userIds) {
    List<User> users = session.createCriteria(UserImpl.class)
        .add(Restrictions.in("id", userIds))
        .list();
    if (userIds.length != users.size()) {
      throw new JbpmException("not all users were found: " + Arrays.toString(userIds));
    }
    return users;
  }
View Full Code Here

  }

  public void createMembership(String userId, String groupId, String role) {
    User user = findUserById(userId);
    if (user == null) {
      throw new JbpmException("user " + userId + " doesn't exist");
    }
    Group group = findGroupById(groupId);
    if (group == null) {
      throw new JbpmException("group " + groupId + " doesn't exist");
    }

    MembershipImpl membership = new MembershipImpl();
    membership.setUser(user);
    membership.setGroup(group);
View Full Code Here

  public boolean isRollbackOnly() {
    try {
      return lookupJeeUserTransaction().getStatus()==Status.STATUS_MARKED_ROLLBACK;
    } catch (SystemException e) {
      throw new JbpmException("couldn't get status of user transaction: "+e.getMessage(), e);
    }
  }
View Full Code Here

  public void setRollbackOnly() {
    try {
      lookupJeeUserTransaction().setRollbackOnly();
    } catch (Exception e) {
      throw new JbpmException("couldn't set user transaction to rollback only: "+e.getMessage(), e);
    }
  }
View Full Code Here

  public void registerSynchronization(Synchronization synchronization) {
    try {
      lookupJeeTransaction().registerSynchronization(synchronization);
    } catch (Exception e) {
      throw new JbpmException("couldn't register synchronization: "+e.getMessage(), e);
    }
  }
View Full Code Here

 
  public void begin() {
    try {
      lookupJeeUserTransaction().begin();
    } catch (Exception e) {
      throw new JbpmException("couldn't begin transaction: "+e.getMessage(), e);
    }
  }
View Full Code Here

 
  public void rollback() {
    try {
      lookupJeeUserTransaction().rollback();
    } catch (Exception e) {
      throw new JbpmException("couldn't rollback: "+e.getMessage(), e);
    }
  }
View Full Code Here

 
  public void commit() {
    try {
      lookupJeeUserTransaction().commit();
    } catch (Exception e) {
      throw new JbpmException("couldn't commit: "+e.getMessage(), e);
    }
  }
View Full Code Here

 
  public javax.transaction.Transaction suspend() {
    try {
      return lookupJeeTransactionManager().suspend();
    } catch (Exception e) {
      throw new JbpmException("couldn't suspend: "+e.getMessage(), e);
    }
  }
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.