please provide the version you are referring too.
Please provide the full class names incl. the package structure as there are two classes TaskSearchQueryTerm.
Please provide the method name incl. input parameter structure for IDirectorySession as IDirectorySession is an Interface class.
You can check these informations by downloading the CAF_and_MWS_Java_API_Reference from the product documentation area available via Empower.
I assume that you are referring to OUTCOME_OK and OUTCOME_ERROR in the class com.webmethods.caf.faces.bean.BaseFacesBean.
These have been deprecated with the following information in 9.12:
With JSF2, the outcome of an action is generally expected to be null or the name of the page to redirect to.
Instead of checking for OUTCOME_OK and OUTCOME_ERROR you should check for the outcome of the action for null (=Error) or for the existence of the name of the page to redirect to (=OK).