}
private StringBuffer getActivityContent(GraphActivity graphAct, ProcessInstance instance, Map options, boolean isVirtical) {
StringBuffer sb = new StringBuffer();
ActivityViewer sav = null;
Activity act = graphAct.getReferenceActivity();
String divId = getActivityWebId(graphAct, instance, options);
if (act instanceof SubProcessActivity) {
sav = DefaultActivityViewer.createViewer(act);
} else {
sav = new DefaultActivityViewer();
}
sb.append("<table id='" + divId + "' cellspacing='0' cellpadding='0'><tr>");
if (isVirtical) {
sb.append("<td align='center'>");
} else {
sb.append("<td>");
}
if (graphAct.isStartGraphActivity()) {
sb.append("<img src='"+imageRootPath+"images/start.gif'>");
} else if (graphAct.isEndGraphActivity()) {
sb.append("<img src='"+imageRootPath+"images/end.gif'>");
} else {
Vector<GraphActivity> incommings = graphAct.getPrevious();
if (incommings.get(0).getReferenceActivity() instanceof SwitchActivity) {
SwitchActivity switchActivity = (SwitchActivity) incommings.get(0).getReferenceActivity();
Vector<Activity> children = switchActivity.getChildActivities();
appendSwitchActivityDescription(act, switchActivity, children, sb);
}
sb.append(sav.render(act,instance, (act instanceof ComplexActivity ? noDecoratedOption : options)));
}
sb.append("</td></tr></table>");
return sb;
}