} else if (entity.getType().equalsIgnoreCase("subflow")) { //redirect to the first activity id from sub flow
WfProcess[] wfProcesses = wfAct.get_sequence_performer(0);
WfProcess wfProcess = (wfProcesses.length > 0 ? wfProcesses[0] : null);
if (wfProcess != null) {
WfActivity[] wfActivityTempList = wfProcess.get_sequence_step(0);
return getNextActivity(sessionHandle, mgr, admin, xpdl, wfProcess.key(), wfActivityTempList);
}
} else {
WfAssignment ass = getSharkAssignment(connect(), activityId);
if (ass != null) {
WorkflowActivity activityStarted = new WorkflowActivity();