// if no constraints, don't do a search...
if (workEffortSearchConstraintList != null && workEffortSearchConstraintList.size() > 0) {
// if the search options have changed since the last search, put at the beginning of the options history list
WorkEffortSearchSession.checkSaveSearchOptionsHistory(session);
ResultSortOrder resultSortOrder = WorkEffortSearchOptions.getResultSortOrder(request);
WorkEffortSearchContext workEffortSearchContext = new WorkEffortSearchContext(delegator, visitId);
workEffortSearchContext.addWorkEffortSearchConstraints(workEffortSearchConstraintList);
workEffortSearchContext.setResultSortOrder(resultSortOrder);