Adding new property to line json object

Hi, Is it possible to add a textbox in the property pane for “line” so that we can use that text in our business logic as a condition to decide something. Actually I tried using the “text” from the shapes section but that is not adding this label property into the line object, it is adding it as a separate object. Please provide some workaround to add text property into the property panel for line.

Thanks in advance.

It is not available to add the title to the shape connetor, but you are able to place the “text” control in your diagram with the requried positioning