org.processmining.framework.models.recommendation
Interface RecommendationProvider

All Known Implementing Classes:
LogBasedRecommendation, RecommendationProviderProxy, TestProvider

public interface RecommendationProvider

This abstract class provides a clean high-level interface for obtaining recommendations for task scheduling in a process-aware information system. Encoding of queries and results is performed in dedicated data container classes.

Author:
Christian W. Guenther (christian@deckfour.org)

Method Summary
 RecommendationResult getRecommendation(RecommendationQuery query)
          This is the main query method, which can be used to retrieve recommendations for specific queries.
 void signalPickedResult(RecommendationResult result, int index)
          This method may be used to let the recommendation provider know, which of the provided results has been picked by the requesting party finally.
 void signalPickedResult(RecommendationResult result, Recommendation picked)
          This method may be used to let the recommendation provider know, which of the provided results has been picked by the requesting party finally.
 

Method Detail

getRecommendation

RecommendationResult getRecommendation(RecommendationQuery query)
                                       throws java.lang.Exception,
                                              java.io.IOException

This is the main query method, which can be used to retrieve recommendations for specific queries. All communication and encoding of parameters can be assumed to be performed in subclasses implementing this interface.

Note: This method may block for an unspecified time, including network transport and resolving the query on the provider side. Use this method in a separate thread if you wish your application to remain responsive.
Also note that the query can fail, both due to transmission errors (which will yield an IOException, and due to the provider's inability to resolve the query (i.e., an error occurred while handling the issued request, signaled by an ordinary Exception being thrown; or, the query did not yield any usable result, which results in a null response value.

Parameters:
query - The query for recommendations.
Returns:
The resulting set of recommendations (correlated with the issued query), or null, of no result could be obtained (may also be empty result list).
Throws:
java.lang.Exception - Signals an error in the recommendation provider implementation.
java.io.IOException - Signals an error due to network transport problems.

signalPickedResult

void signalPickedResult(RecommendationResult result,
                        int index)

This method may be used to let the recommendation provider know, which of the provided results has been picked by the requesting party finally. The provider will use this information for logging purposes, or to improve future results.

Parameters:
result - The result set which has been delivered earlier on.
index - Index of the result which has been picked for usage in the result set. If the given index is negative, the semantics are that the requesting party has picked neither of the provided recommendations, i.e. ignored them or found them not useful.

signalPickedResult

void signalPickedResult(RecommendationResult result,
                        Recommendation picked)

This method may be used to let the recommendation provider know, which of the provided results has been picked by the requesting party finally. The provider will use this information for logging purposes, or to improve future results.

Parameters:
result - The result set which has been delivered earlier on.
pcked - The result which has been picked for usage from the result set. If the given result is null, the semantics are that the requesting party has picked neither of the provided recommendations, i.e. ignored them or found them not useful.