WMSessionHandle sessionHandle = sc.getSessionHandle();
Shark shark = Shark.getInstance();
ExecutionAdministration ea = shark.getExecutionAdministration();
WfProcessIterator pi = sc.get_iterator_process();
ProcessFilterBuilder pieb = shark.getProcessFilterBuilder();
WMFilter filter = pieb.addIdEquals(sessionHandle, procInstanceId);
pi.set_query_expression(pieb.toIteratorExpression(sessionHandle, filter));
WfProcess[] wfProcessList = pi.get_next_n_sequence(0);
WfProcess wfProcess = null;
if (wfProcessList != null && wfProcessList.length > 0) {
wfProcess = wfProcessList[0];
}