/** * Helper method connecting two activities using this edge. * The previous connection is removed. * * @param source New source of the edge. * @param target New target of the edge. */ public void connect(MActivity source, MActivity target) { if (this.source != null) { this.source.removeOutgoingMessagingEdge(this); } if (this.target != null) { this.target.removeIncomingMessagingEdge(this); } this.source = source; this.target = target; source.addOutgoingMessagingEdge(this); target.addIncomingMessagingEdge(this); }
throw new RuntimeException("Could not find message: "+id); act.addIncomingMessagingEdge(msg); msg.setTarget(act);
throw new RuntimeException("Could not find message: "+id); act.addIncomingMessagingEdge(msg); msg.setTarget(act);
/** * Sets the target. */ public void setTarget(mxICell target) { MMessagingEdge medge = (MMessagingEdge) getBpmnElement(); if (medge != null) { if (getTarget() != null) { VActivity vtgt = (VActivity) getTarget(); ((MActivity) vtgt.getBpmnElement()).removeIncomingMessagingEdge(medge); } super.setTarget(target); if (target != null) { VActivity vtgt = (VActivity) getTarget(); ((MActivity) vtgt.getBpmnElement()).addIncomingMessagingEdge(medge); medge.setTarget((MActivity) vtgt.getBpmnElement()); } } else { super.setTarget(target); } }
medge.setTarget(tact); sact.addOutgoingMessagingEdge(medge); tact.addIncomingMessagingEdge(medge);