private CommandExecutionResult executeInternal(
      ActivityDiagram system, RegexResult arg, IEntity note) {

    note.setSpecificBackcolor(HtmlColorUtils.getColorIfValid(arg.get("COLOR", 0)));

    IEntity activity = system.getLastEntityConsulted();
    if (activity == null) {
      activity = system.getStart();
    }

    final Link link;

    final Position position =
        Position.valueOf(arg.get("POSITION", 0).toUpperCase()).withRankdir(system.getRankdir());

    final LinkType type = new LinkType(LinkDecor.NONE, LinkDecor.NONE).getDashed();

    if (position == Position.RIGHT) {
      link = new Link(activity, note, type, null, 1);
    } else if (position == Position.LEFT) {
      link = new Link(note, activity, type, null, 1);
    } else if (position == Position.BOTTOM) {
      link = new Link(activity, note, type, null, 2);
    } else if (position == Position.TOP) {
      link = new Link(note, activity, type, null, 2);
    } else {
      throw new IllegalArgumentException();
    }
    system.addLink(link);
    return CommandExecutionResult.ok();
  }