public static WfProcess getWfProcess(GenericDelegator delegator, String workEffortId) throws WfException {
if (delegator == null) throw new WfException("The delegator object cannot be null");
if (workEffortId == null) throw new WfException("The WorkEffort key cannot be null");
WfProcess process = null;
try {
process = new WfProcessImpl(delegator, workEffortId);
} catch (WfException e) {
try {
WfActivity act = WfFactory.getWfActivity(delegator, workEffortId);
if (act != null) {
process = act.container();