Hi zhiyong,
search by process definition infor is more complicated. Please there is no table for process definition, and the id, key, name, version column was stored in the deploy_prop table. I am afraid you have to use lots of 'join' to achieve this.
And if you want to get Session, please use this:
EnvironmentImpl.getFromCurrent(Session.class);
before using this, please make sure you have already open an Environment.