Package org.huihoo.workflow.usermodel

Examples of org.huihoo.workflow.usermodel.WorkflowParticipant


    return null;
  }
  public ObjectService[] findServices() throws WorkflowException
  {
    Vector vector = new Vector(0);
    WorkflowParticipant participant = session.getParticipant();
    String userid = participant.getUUID();
    String password = participant.getPassword();
    if (willow_engine != null)
    {
      Context[] contexts = willow_engine.findChildren();
      for(int i=0;i<contexts.length;++i)
      {
View Full Code Here


    {
      String username = (String) env.get(WorkflowClient.SECURITY_PRINCIPAL);
      String password = (String) env.get(WorkflowClient.SECURITY_CREDENTIALS);
      SessionManager manager = willow_engine.getSessionManager();
      RealmDatabase realmDatabase = willow_engine.getRealmDatabase();
      WorkflowParticipant participant = realmDatabase.authenticate(username, password);
      if (participant == null)
      {
        throw new WorkflowException("login workflow  engine unsuccessfully.username=" + username + ",password=" + password);
      }
      this.session = manager.createSession();
View Full Code Here

    }
  }
  private boolean authenticate(WorkflowService workflowService, String userid, String password) throws WorkflowException
  {
    UserDatabase userDatabase = workflowService.getUserDatabase();
    WorkflowParticipant user = userDatabase.findParticipant(userid);
    if (user != null && user.getPassword().equals(password))
    {
      return true;
    }
    return false;
  }
View Full Code Here

   * @param workflowUser The new WorkflowParticipant, or <code>null</code> if none
   */
  public void setParticipant(WorkflowParticipant workflowUser)
  {

    WorkflowParticipant oldWorkflowUser = this.workflowUser;
    this.workflowUser = workflowUser;
    support.firePropertyChange("participant", oldWorkflowUser, this.workflowUser);

  }
View Full Code Here

  }
  // --------------------------------------------------------- Public Methods
  public WorkflowParticipant authenticate(String username, String credentials)
  {
    // Does a user with this username exist?
    WorkflowParticipant user = userDatabase.findParticipant(username);
    if (user == null)
    {
      return (null);
    }
    // Do the credentials specified by the user match?
    // FIXME - Update all realms to support encoded passwords
    boolean validated = false;
    validated = credentials.equals(user.getPassword());
    if (!validated)
    {
      if (debug >= 2)
      {
        log(sm.getString("userDatabaseRealm.authenticateFailure", username));
View Full Code Here

    }

    log.debug("[dispatch_manual] postUsers: " + users);

    int sizePerformer = users.size();
    WorkflowParticipant performer = null;
    String dispWorkId = null;
    WorkflowWork dispWork = null;

    if (workflowWork instanceof WorkflowSubWork)
    {
View Full Code Here

  {
    ArrayList results = new ArrayList();
    Iterator users = database.getParticipants();
    while (users.hasNext())
    {
      WorkflowParticipant user = (WorkflowParticipant) users.next();
      if (user.isInGroup(this))
      {
        results.add(user);
      }
    }
    return (results.iterator());
View Full Code Here

  public void removeParticipants()
  {
    Iterator users = database.getParticipants();
    while (users.hasNext())
    {
      WorkflowParticipant user = (WorkflowParticipant) users.next();
      if (user.isInGroup(this))
      {
        user.removeGroup(this);
      }
    }
  }
View Full Code Here

//------------------------------------------------------------------------------------- 
  public boolean accept(WorkflowSession session, WorkflowWork workItem)
    throws WorkflowException
  {
    WorkflowParticipant participant = session.getParticipant();
    WorkflowWorkValidator workValidator =
    spiCaseDatabase.getWorkflowWorkValidator();
    if (workValidator != null)
    {
      workValidator.checkAccept(participant, workItem);
View Full Code Here

      workItem);
  }
  public boolean dispatch(WorkflowSession session, WorkflowWork workItem)
    throws WorkflowException
  {
    WorkflowParticipant participant = session.getParticipant();

    WorkflowWorkValidator workValidator =
    spiCaseDatabase.getWorkflowWorkValidator();
    if (workValidator != null)
    {
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.usermodel.WorkflowParticipant

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.