Package com.starflow.wf.engine.model

Examples of com.starflow.wf.engine.model.Participant


      List<WorkItem> workItems = event.getWorkItemRep().findActivityWorkItems(event.getActivityInst().getActivityInstId());
      for(WorkItem workItem : workItems) {
        int state = StarFlowState.WORKITEM_RUNNING;
        List<Participant> participants = event.getWorkItemRep().findWorkItemParticipants(workItem.getWorkItemId());
        if(participants.size() == 1) {
          Participant participant = participants.get(0);
          if(Constants.PARTICIPANT_TYPE_PERSON.equals(participant.getParticType()))
            state = StarFlowState.WORKITEM_RUNNING;
          else
            state = StarFlowState.WORKITEM_WAITING_RECEIVE;
        } else
          state = StarFlowState.WORKITEM_WAITING_RECEIVE;
View Full Code Here


   */
  protected int getCurrentState(List<Participant> participants) {
    if(participants.size()>1)
      return StarFlowState.WORKITEM_WAITING_RECEIVE;
    else {
      Participant participant = participants.get(0);
      if(Constants.PARTICIPANT_TYPE_PERSON.equalsIgnoreCase(participant.getParticType()))
        return StarFlowState.WORKITEM_RUNNING;
      else
        return StarFlowState.WORKITEM_WAITING_RECEIVE;
    }
  }
View Full Code Here

    List<Participant> participants = new LinkedList<Participant>();
    List list = actEl.selectNodes(StarFlowNames.ACT_CHILD_PARTICIPANT);
    Iterator iter=list.iterator();
        while(iter.hasNext()){
            Element el = (Element)iter.next();
            Participant p = new Participant();
            p.setParticipant(el.attributeValue(StarFlowNames.ACT_CHILD_PARTICIPANT_ID));
            p.setParticipant2(el.attributeValue(StarFlowNames.ACT_CHILD_PARTICIPANT_NAME));
            p.setParticType(el.attributeValue(StarFlowNames.ACT_CHILD_PARTICIPANT_TYPE));
            participants.add(p);
        }
        return participants;
  }
View Full Code Here

  }
 
  private static class ParticipantRowMapper implements RowMapper<Participant> {
    @Override
    public Participant mapRow(ResultSet resultSet, int index) throws SQLException {
      Participant participant = new Participant();
      participant.setParticId(resultSet.getLong("particId"));
      participant.setParticipant2(resultSet.getString("participant2"));
      participant.setParticipant(resultSet.getString("participant"));
      participant.setParticType(resultSet.getString("particType"));
      participant.setWorkItemId(resultSet.getLong("workItemId"));
      return participant;
    }
View Full Code Here

  public List<Participant> queryActivityExecutors(long processInstId, String activityDefId) {
    List<Participant> participants = new ArrayList<Participant>();
    List<String> users = workItemRep.queryActivityExecutors(processInstId, activityDefId);
    if(users != null) {
      for(String userid : users) {
        Participant participant = new Participant();
        participant.setParticipant(userid);
        participant.setParticType(Constants.PARTICIPANT_TYPE_PERSON);
        participants.add(participant);
      }
    }
    return participants;
  }
View Full Code Here

*/
public class ProcStarterParticipantMode implements ParticipantMode{

  public List<Participant> creatParticipants(AbstractFlowEvent event, ActivityElement activityXml) {
    String userid = event.getProcessInstance().getCreator();
    Participant participant = new Participant();
    participant.setParticipant(userid);
    participant.setParticType(Constants.PARTICIPANT_TYPE_PERSON);
   
    List<Participant> list = new LinkedList<Participant>();
    list.add(participant);
   
    return list;
View Full Code Here

TOP

Related Classes of com.starflow.wf.engine.model.Participant

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.