Shark shark = Shark.getInstance();
ExecutionAdministration ea = shark.getExecutionAdministration();
WAPI wapi = shark.getWAPIConnection();
WfProcessIterator wpi = sc.get_iterator_process();
ProcessFilterBuilder fb = shark.getProcessFilterBuilder();
WMSessionHandle sessionHandle = sc.getSessionHandle();
WMFilter filter1 = fb.addPackageIdEquals(sessionHandle, packageId);
WMFilter filter2 = fb.addVersionEquals(sessionHandle, version);
WMFilter filter = fb.and(sessionHandle, filter1, filter2);
wpi.set_query_expression(fb.toIteratorExpression(sessionHandle, filter));
WfProcess[] procs = wpi.get_next_n_sequence(0);