return group1;
}
protected Element getArrows(SVGDocument doc) {
if (subActivities != null) {
ActivityInterface prevActivity = null;
ActivityInterface prevElseActivity = null;
ActivityInterface activity = null;
String id = null;
org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myExitCoords = getEndIconEntryArrowCoords();
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();