Interface Enquiry
-
- All Superinterfaces:
Serializable
public interface Enquiry extends Serializable
An enquiry allows an agent to suspend a running activity, annotate it with a question and delegate it to other agents who can then reply the question or help the originator in solving the problem. One of the recipients resumes the activity, executes the activity (partially), suspends it again and sends it back with a reply for the originator.
This resembles delegation but differs in the stacking, that is, a delegation does not need to be replied, but an enquiry does.Recipients of enquiries may also finish the activity. In this case a reply is still needed and the reply will also be forwarded to the corresponding originator of the enquiry. This is done until the enquiry stack is empty and the first originator has received the corresponding reply. Since the enquiry can not be resumed in this case (it has already been finished), the receiver can remove it by replying (without providing a reply at all).
This interface represents one enquiry and encapsulates the necessary data, that is, the initiator of an enquiry, the recipients of an enquiry as well as the question/comment of the initiator and the corresponding reply.
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
Generated ID for serialisation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description QualifiedAgent
getOriginator()
Gets the agent who has initiated this enquiry.String
getQuestion()
Gets the question (and therefore the reason) for this enquiry.Set<QualifiedAgent>
getRecipients()
Gets the agents who receive this enquiry.QualifiedAgent
getReplier()
Gets the agent that has replied this enquiry.String
getReply()
Gets the reply for this enquiry which is set by the recipients of this enquiry.
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
Generated ID for serialisation.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOriginator
QualifiedAgent getOriginator()
Gets the agent who has initiated this enquiry.- Returns:
- The agent who has initiated this enquiry.
-
getRecipients
Set<QualifiedAgent> getRecipients()
Gets the agents who receive this enquiry. There may be several recipients of the enquiry but only one agent will actually deal with it. This is equal to the behaviour of an activated node that has items in several worklists but only one agent will execute the node.- Returns:
- A set of agents that receive this enquiry.
-
getQuestion
String getQuestion()
Gets the question (and therefore the reason) for this enquiry. This is set by the initiator of this enquiry.- Returns:
- The question of this enquiry as set by the initiator. This may be the empty string (not null).
-
getReply
String getReply()
Gets the reply for this enquiry which is set by the recipients of this enquiry.- Returns:
- The reply for the question of this enquiry as set by the replier. This will be null if this enquiry has not been replied yet, otherwise it will be a valid string (including the empty string).
-
getReplier
QualifiedAgent getReplier()
Gets the agent that has replied this enquiry.- Returns:
- The agent that replied this enquiry. This will be null if this enquiry has not been replied yet.
-
-