org.yawlfoundation.yawl.resourcing.interactions
Class OfferInteraction

java.lang.Object
  extended by org.yawlfoundation.yawl.resourcing.interactions.AbstractInteraction
      extended by org.yawlfoundation.yawl.resourcing.interactions.OfferInteraction

public class OfferInteraction
extends AbstractInteraction

This class describes the requirements of a task at the offer phase of allocating resources.

Author:
Michael Adams v0.1, 02/08/2007

Field Summary
static int ROLE_PARAM
           
static int USER_PARAM
           
 
Fields inherited from class org.yawlfoundation.yawl.resourcing.interactions.AbstractInteraction
_initiator, _ownerTaskID, SYSTEM_INITIATED, USER_INITIATED
 
Constructor Summary
OfferInteraction()
           
OfferInteraction(int initiator)
           
OfferInteraction(String ownerTaskID)
           
 
Method Summary
 void addConstraint(AbstractConstraint c)
           
 void addConstraints(Set constraints)
           
 void addFilter(AbstractFilter f)
           
 void addFilters(Set filters)
           
 boolean addInputParam(String name, int type)
           
 void addInputParams(Map pMap)
           
 void addParticipant(Participant p)
          variation of the above
 void addParticipant(String id)
          Adds a participant to the initial distribution list
 void addParticipants(Set pSet)
           
 void addParticipantsByID(Set idSet)
           
 void addParticipantsByID(String idList)
           
 void addParticipantUnchecked(String id)
           
 void addRole(Role r)
           
 void addRole(String rid)
           
 void addRoles(Set rSet)
           
 void addRoles(String roleList)
           
 void addRoleUnchecked(String rid)
           
 Set<AbstractConstraint> getConstraints()
           
 Set<Participant> getDistributionSet()
           
 Set<String> getDynParamNames()
           
 Set<AbstractFilter> getFilters()
           
 Set<Participant> getParticipants()
           
 Set<Role> getRoles()
           
 void parse(org.jdom.Element e, org.jdom.Namespace nsYawl)
           
 Set<Participant> performOffer(WorkItemRecord wir)
          Takes the initial distribution set of participants, then expands any roles and/or dynamic parameters to their 'set of participants' equivalents, then applies the specified filters and/or constraints, and returns the final distribution set of participants.
 void setFamiliarParticipantTask(String taskid)
           
 String toXML()
           
 void withdrawOffer(WorkItemRecord wir, HashSet<Participant> offeredSet)
           
 
Methods inherited from class org.yawlfoundation.yawl.resourcing.interactions.AbstractInteraction
getInitiator, getInitiatorString, getOwnerTaskID, isSystemInitiated, parseInitiator, parseParams, setInitiator, setOwnerTaskID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_PARAM

public static final int USER_PARAM
See Also:
Constant Field Values

ROLE_PARAM

public static final int ROLE_PARAM
See Also:
Constant Field Values
Constructor Detail

OfferInteraction

public OfferInteraction()

OfferInteraction

public OfferInteraction(String ownerTaskID)

OfferInteraction

public OfferInteraction(int initiator)
Parameters:
initiator - - either AbstractInteraction.SYSTEM_INITIATED or AbstractInteraction.USER_INITIATED
Method Detail

addParticipant

public void addParticipant(String id)
Adds a participant to the initial distribution list

Parameters:
id - - the id of the participant

addParticipantUnchecked

public void addParticipantUnchecked(String id)

addParticipant

public void addParticipant(Participant p)
variation of the above

Parameters:
p - - the Participant object to add to the initial distribution list

addParticipantsByID

public void addParticipantsByID(String idList)

addParticipantsByID

public void addParticipantsByID(Set idSet)

addParticipants

public void addParticipants(Set pSet)

addRole

public void addRole(String rid)

addRoleUnchecked

public void addRoleUnchecked(String rid)

addRole

public void addRole(Role r)

addRoles

public void addRoles(String roleList)

addRoles

public void addRoles(Set rSet)

addInputParam

public boolean addInputParam(String name,
                             int type)

addInputParams

public void addInputParams(Map pMap)

addFilters

public void addFilters(Set filters)

addFilter

public void addFilter(AbstractFilter f)

addConstraints

public void addConstraints(Set constraints)

addConstraint

public void addConstraint(AbstractConstraint c)

setFamiliarParticipantTask

public void setFamiliarParticipantTask(String taskid)

getParticipants

public Set<Participant> getParticipants()

getRoles

public Set<Role> getRoles()

getFilters

public Set<AbstractFilter> getFilters()

getConstraints

public Set<AbstractConstraint> getConstraints()

getDistributionSet

public Set<Participant> getDistributionSet()

getDynParamNames

public Set<String> getDynParamNames()

performOffer

public Set<Participant> performOffer(WorkItemRecord wir)
Takes the initial distribution set of participants, then expands any roles and/or dynamic parameters to their 'set of participants' equivalents, then applies the specified filters and/or constraints, and returns the final distribution set of participants.

Parameters:
wir - the workitem being offered
Returns:
the final distribution set of Participant objects

withdrawOffer

public void withdrawOffer(WorkItemRecord wir,
                          HashSet<Participant> offeredSet)

parse

public void parse(org.jdom.Element e,
                  org.jdom.Namespace nsYawl)
           throws ResourceParseException
Throws:
ResourceParseException

toXML

public String toXML()


Copyright © 2004-2012 The YAWL Foundation.