String actStatus = "Ready";
SwimlaneViewer viewer = new SwimlaneViewer();
GraphActivity sga = (GraphActivity) coodinate.getGraphList().get(i);
Activity activityIncomming = sga.getReferenceActivity();
String sgaTT = viewer.getActivityWebId(sga, instance, options);
Vector<GraphActivity> outgoing = sga.getNext();
for (int j = 0; j < outgoing.size(); j++) {
GraphActivity tga = (GraphActivity) outgoing.get(j);
String tgaTT = viewer.getActivityWebId(tga, instance, options);
Activity activityOutgoing = tga.getReferenceActivity();
if (tga == null || sga == null)
continue;
if (tga.isEndGraphActivity()) {
if (activityIncomming != null) {
actStatus = activityIncomming.getStatus(instance);
if(!"Completed".equals(actStatus) && !"Skipped".equals(actStatus))
{
actStatus = "Ready";
}
}
} else if(sga.isStartGraphActivity()) {
actStatus = activityOutgoing.getStatus(instance);
} else {
if ("Running".equals(actStatus) || "Timeout".equals(actStatus)) {
if (sga.isStartGraphActivity()) {
actStatus = "Completed";
} else {
actStatus = "Ready";
}
} else if (
activityIncomming instanceof SwitchActivity
|| activityIncomming instanceof AllActivity
|| activityIncomming == null
) {
actStatus = activityOutgoing.getStatus(instance);
} else {
actStatus = activityIncomming.getStatus(instance);
if(!"Completed".equals(actStatus) && !"Skipped".equals(actStatus))
{
actStatus = "Ready";