'Collect history as well as input datasets and collections.'

def _collect_inputs(self, tool, trans, incoming, history, current_user_roles):

    app = trans.app
    if (not history):
        history = tool.get_default_history_by_trans(trans, create=True)
    if (history not in trans.sa_session):
        history = trans.sa_session.query(app.model.History).get(history.id)
    inp_dataset_collections = self.collect_input_dataset_collections(tool, incoming)
    inp_data = self._collect_input_datasets(tool, incoming, trans, history=history, current_user_roles=current_user_roles)
    return (history, inp_data, inp_dataset_collections)
