if (chilrenActivity != null) {
for (int i = 0; i < chilrenActivity.size(); i++) {
Activity act = chilrenActivity.get(i);
if (act.isHidden() == false) {
ProcessDefinitionInfo pdInfo = prefixLogic(act);
pdInfo.setName(act.getName().getText());
pdInfo.setTracingTag(act.getTracingTag());
if (act instanceof HumanActivity) {
HumanActivity humanAct = (HumanActivity) act;
pdInfo.setRoleName(humanAct.getRole().getDisplayName().getText());
pdInfo.setDuration(String.valueOf(humanAct.getDuration()));
pdInfo.setDescription(humanAct.getDescription().getText());
}
if (act instanceof SubProcessActivity) {
pdInfo.setSubDefId(((SubProcessActivity)act).getDefinitionId());
}
String activityClassName = act.getClass().toString();
pdInfo.setType(activityClassName.substring(activityClassName.lastIndexOf(".") + 1, activityClassName.length()));
if (act instanceof SwitchActivity) {
Condition[] condition = ((SwitchActivity) act).getConditions();
String[] conditionDescription = new String[condition.length];
for (int j = 0; j < condition.length; j++) {
conditionDescription[j] = condition[j].getDescription().getText();
}
pdInfo.setCondition(conditionDescription);
}
pdInfo = suffixLogic(act, pdInfo);
if(act instanceof ComplexActivity) {
pdInfo.setChildren(makeChildren(((ComplexActivity) act).getChildActivities()));
if (pdInfo.getChildren() != null) {
if (pdInfo.getChildren().size() != 0) {
returnProcessDefinitionInfos.add(pdInfo);
}
}
} else {
if (this.onlyHumanActivity == true) {