# Connection shape

**URL:** <https://forum.bpmn.io/t/connection-shape/11074>\
**Category:** Modeler\
**Created:** [May 27, 2024, 9:50am UTC](https://forum.bpmn.io/t/connection-shape/11074 "2024-05-27T09:50:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aws\_rayyan](https://forum.bpmn.io/user_avatar/forum.bpmn.io/aws_rayyan/32/5152_2.png) [@Aws\_rayyan](https://forum.bpmn.io/u/Aws_rayyan)\
**Post date:** [May 27, 2024, 9:50am UTC](https://forum.bpmn.io/t/connection-shape/11074/1 "2024-05-27T09:50:22Z")

</div>

I would like to make the connections to “Data Object Reference” element and “Data Store Reference” the same as that when connecting tasks and gates together instead of a straight line, how can i do it ?

thanks

---

<div class="post-metadata">

**Author:** ![Aws\_rayyan](https://forum.bpmn.io/user_avatar/forum.bpmn.io/aws_rayyan/32/5152_2.png) [@Aws\_rayyan](https://forum.bpmn.io/u/Aws_rayyan)\
**Post date:** [May 27, 2024, 11:09am UTC](https://forum.bpmn.io/t/connection-shape/11074/2 "2024-05-27T11:09:13Z")

</div>

in simple words i want to convert data input association to sequence flow

---

<div class="post-metadata">

**Author:** ![Aws\_rayyan](https://forum.bpmn.io/user_avatar/forum.bpmn.io/aws_rayyan/32/5152_2.png) [@Aws\_rayyan](https://forum.bpmn.io/u/Aws_rayyan)\
**Post date:** [May 27, 2024, 11:19am UTC](https://forum.bpmn.io/t/connection-shape/11074/3 "2024-05-27T11:19:27Z")

</div>

I found the solution by doing the following:  
I modified the BPMNLayouter.js file as follows

Original code:

```auto

  if (is(connection, 'bpmn:Association') ||
      is(connection, 'bpmn:DataAssociation')) {

    if (waypoints && !isCompensationAssociation(source, target)) {
      return [].concat([connectionStart], waypoints.slice(1, -1), [connectionEnd]);
    }
  }

  var layout = isDirectionHorizontal(source) ? PREFERRED_LAYOUTS_HORIZONTAL : PREFERRED_LAYOUTS_VERTICAL;

  if (is(connection, 'bpmn:MessageFlow')) {
    manhattanOptions = getMessageFlowManhattanOptions(source, target, layout);
  } else if (is(connection, 'bpmn:SequenceFlow') || isCompensationAssociation(source, target)) {

    if (source === target) {
      manhattanOptions = {
        preferredLayouts: getLoopPreferredLayout(source, connection, layout)
      };
    } else if (is(source, 'bpmn:BoundaryEvent')) {
      manhattanOptions = {

```

after modification

```auto

  var layout = isDirectionHorizontal(source) ? PREFERRED_LAYOUTS_HORIZONTAL : PREFERRED_LAYOUTS_VERTICAL;

  if (is(connection, 'bpmn:MessageFlow')) {
    manhattanOptions = getMessageFlowManhattanOptions(source, target, layout);
  } else {

    if (source === target) {
      manhattanOptions

```

So basically, I removed the “if” condition that checks if the connection is DataAssociation or Association and removed the last condition in the if-else statement so that all the connections other than message flow are treated the same.

however, now I am facing an issue with the styling as the lines are dashed instead of solid lines. any recommendation ?

---

<div class="post-metadata">

**Author:** ![system](https://forum.bpmn.io/uploads/default/original/2X/b/b534893973385c2d302b38572464112e4adae002.png) [@system](https://forum.bpmn.io/u/system)\
**Post date:** [June 3, 2024, 11:20am UTC](https://forum.bpmn.io/t/connection-shape/11074/4 "2024-06-03T11:20:13Z")

</div>

Closed on June 3, 2024, 11:20am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
