DefaultDecisionMaker

This class represents a decision logic object that be attached to an AbleJasConversationAgent to act as a decision logic during the execution of any conversation. This bean tries to arrive at decisions by presenting a user with a DecisionPanel that shows MessageFormInterfacePanels supplied to it by the MessageFormInterfacePanelFactory.

The DefaultDecisionMaker obtains the message-form for each outgoing transition (decision) from a particular state (decision point) by querying the Conversation Manager. Then, it obtains a panel, MessageFormInterfacePanel from the MessageFormInterfacePanelFactory for each of the message-forms obtained from the conversation manager. MessageFormInterfacePanels provide a means for both displaying message-form data to the user and for accepting input data from the user to construct a message-form. The getData() method of the MessageFormInterfacePanel is used to validate and obtain the user-input received from the user while the setData(Object[]) method is used to prefill and modify the display of the interface panel when is is being used in dislaying message-form data.

The defaultDecision() method serves as the point of attachment to an AbleJasConversationAgent. To use the DefaultDecisionMaker as the decision logic code for a conversation, one would customize the agent's decision functions to use this method. For example, in the serialized example agent (agent1.ser) provided with the distribution, the agent has been customized to use the 'defaultDecision' function of the DefaultDecisionMaker bean to make decisions for the Chat conversation. For more information on this, refer to the AbleJasConversationAgent.

The figure below shows an example of a decision panel showing both an input message-form and output message-form options available for the user to make a decision. In this particular case, the MetaConversation policy is configured to be handled by the DefaultDecisionMaker. The DecisionPanel is being shown to the user at the A-Requested state in the conversation with the decision options available at the stage being StartCP, Accept and OK. While the bottom panel shows in the input mesage-form data, the top portion shows the same panel for accepting user-input.