[
https://issues.jboss.org/browse/DROOLS-3702?page=com.atlassian.jira.plugi...
]
Roger Martinez commented on DROOLS-3702:
----------------------------------------
Hey [~kgaevski] yep good point, on the BPMN side it works (in the "main"
canvas), but not for DMN... so Ì also think the bug is on the DMN side.
[~manstis] [~dadossan] Looking at the (wrong) behavior this is what I think it happens:
* Once creating a connection between two nodes, from the contextual menu (toolbox), it
creates both source/target connections by using the "auto-magnet" strategy (see
[
MagnetConnection#auto|https://github.com/kiegroup/kie-wb-common/blob/mast...]
field). It means that while changing the locations for the shapes, the connection is
automatically being updated and attached to the "closest" magnet. See the
"auto-magnet" behavior:
!auto-magnets.gif!
* On the other hand, not sure about DMN, but the BPMN spec does not considers these magnet
strategies that Stunner uses, it means that once marshalling/unmarshalling there is no
supported attribute for keeping this info in the source XML file. So our BPMN marshallers
are actually taking this into account and creating/consuming some custom attribute for it
(see
[
here|https://github.com/kiegroup/kie-wb-common/blob/master/kie-wb-common-...])
* Saying this, I understand that DMN marshallers are not supporting this
"auto-magnet" strategy, is that correct? I think this is the reason why once
opening a DMN diagram, instead of using the "auto-magnet" strategy as it
defaults on the UI, it's using the "fixed-magnet" one, so the connections
are always attached to the same magnet. See the "fixed-magnet" behavior, which
is the one you get once loading a DMN diagram:
!fixed-magnets.gif!
Sooo if the comments above make sense for you guys, I would say you've *two possible
solutions*:
* Either adding support on the DMN marshallers for the auto-magnet and center-magnet
strategies as well as we did on the BPMN ones
* Either dropping the support for auto-magnet and center-magnet only for DMN - which has
some implications on the code as well as actually we don't support different
strategies by domain, we should improve this stuff a bit for doing so
PS: There exist *3 connection/magnet strategies* in Stunner:
* *Fixed* magnet - The connection is attached to a certain magnet, it does never change
automatically. It happens when a user drops a connection to some of the magnets attached
into the shape's border
* *Auto* magnet - The connection is not really attached to any magnet... depending the
source/target node locations the magnet being used is automatically calculated. It happens
when a user drops a connection over a shape, not to any concrete magnet
* *Center* magnet - The connection is not really attached to any magnet neither... it just
"follows" the shape's border, depending on the source/target node locations.
It happens when a user drops a connection to the CENTER magnet of a shape
[Stunner] Arrows are incorrectly positioned when save-open diagram
------------------------------------------------------------------
Key: DROOLS-3702
URL:
https://issues.jboss.org/browse/DROOLS-3702
Project: Drools
Issue Type: Bug
Components: DMN Editor
Reporter: Daniel José dos Santos
Assignee: Michael Anstis
Priority: Major
Labels: Stunner
Attachments: auto-magnets.gif, fixed-magnets.gif,
process-designer-connectors-magnets-issues.png, weird_arrow.gif
1. Add a `Decision Node`
2. Add a `Input Data Node` bellow `Decision Node`
3. Connect `Input Data Node` to `Decision Node`
4. Save
5. Close
6. Open againThe arrow from `Input Data Node` to `Decision Node` will be at right of the
`Decision Node` and if you move the `Input Data Node`, the arrow is not repositioned.
I noticed this in DMN Showcase and in drools-wb.
And if you add a new `Decision Node` and a new `Input Data Node`, without save and close,
it behaves as expected.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)