org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartElseCoords = getStartIconElseArrowCoords();
org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = null;
org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates activityEntryCoords = null;
org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates activityExitCoords = null;
Iterator<ActivityInterface> itr = subActivities.iterator();
Element subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
while (itr.hasNext()) {
activity = itr.next();
activityEntryCoords = activity.getEntryArrowCoords();
activityExitCoords = activity.getExitArrowCoords();
if (activity instanceof ElseIfImpl || activity instanceof ElseImpl) {
if (prevActivity != null && prevActivity instanceof ElseIfImpl) {
exitCoords = ((ElseIfInterface) prevActivity).getNextElseExitArrowCoords();
// activityEntryCoords = activity.getEntryArrowCoords();
id = prevActivity.getId() + "-" + activity.getId();
subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(),
exitCoords.getYTop(), activityEntryCoords.getXLeft(),
activityEntryCoords.getYTop(), id, prevActivity, activity));
subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(),
activityExitCoords.getYTop(), myExitCoords.getXLeft(),
myExitCoords.getYTop(), id, prevActivity, activity));
} else {
// activityEntryCoords = activity.getEntryArrowCoords();
subGroup.appendChild(getArrowDefinition(doc, myStartElseCoords.getXLeft(),
myStartElseCoords.getYTop(), activityEntryCoords.getXLeft(),
activityEntryCoords.getYTop(), id, prevActivity, activity));
subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(),
activityExitCoords.getYTop(), myExitCoords.getXLeft(),
myExitCoords.getYTop(), id, prevActivity, activity));
}
} else {
if (prevActivity != null) {
exitCoords = prevActivity.getExitArrowCoords();
// activityEntryCoords = activity.getEntryArrowCoords();
// activityExitCoords = activity.getExitArrowCoords();
id = prevActivity.getId() + "-" + activity.getId();
subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(),
exitCoords.getYTop(), activityEntryCoords.getXLeft(),
activityEntryCoords.getYTop(), id, prevActivity, activity));
} else {
// activityEntryCoords = activity.getEntryArrowCoords();
subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(),
myStartCoords.getYTop(), activityEntryCoords.getXLeft(),
activityEntryCoords.getYTop(), id, this, activity));
subGroup.appendChild(getArrowDefinition(doc, activityExitCoords.getXLeft(),
activityExitCoords.getYTop(), myExitCoords.getXLeft(),
myExitCoords.getYTop(), id, this, activity));
}
}