Is there a lang spec documenting how model files in elk and json are to be defined ?
Ask your questions i have this large model ( i could not get a link from the web model )
I am trying to understand how to specify edges between nodes in my graph. unfortunately i cant grasp the logic of what is allowed and what is not allowed when specifying edges. specifying nodes was super simple to understand (from my untrained eyes). edges .. not so much :-)
to give context. my graph is autogenerated so from that angle i was hoping i could generate all edges at the end ( like the graph i have linked above) but it looks like that is not allowed.
I also tried putting the edges in the parent of the node being the source but also that failed. for example if the target node is on the top of the graph the sugestion from the editor was to put it on the top.
another question is: are the rules the same for elk files and json ? if its easier for me to generate the json maybe i will switch to using json instead.
(Optional) Expected behavior a simple way to defined edges between nodes when the graph is hierarchical and multiple nested levels
(Optional) ELK Version snapshot
BTW this is a snipet of the json that generated from the engine now with the above model
{
"id": "mur_2491043083",
"sources": [
"mur_809189348"
],
"targets": [
"mur_1572453709"
]
},
all sections and points are missing. I was hoping that the engine would fail if something is semantically wrong in the graph. so it is succesful but it is not returning useful data
here is the plain java code i am using to convert the elk file to json. Please let me know if the way i am doing is wrong by any chance
this think is correctly generated in that the ui does not complain about it but i am still getting no sections for the
nodes with no sections returned
'mur_404404239' to root
'mur_1673771001' to root
'mur_2556112743' to root
'mur_227252067' to root
'mur_859005725' to root
'mur_4188991162' to root
revised model
node mur_3319792167 {
// nid: demo02
// name: demo02
// path: demo02
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction : RIGHT
label "demo02"
node mur_1454737705 {
// nid: ingest
// name: demo02_ingest
// path: demo02_ingest
layout [size: 0, 0] // has to be first
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,200.0)"
algorithm: "elk.layered"
elk.direction: DOWN
hierarchyHandling: "INCLUDE_CHILDREN"
cycleBreaking.strategy: "INTERACTIVE"
layering.strategy: "INTERACTIVE"
label "demo02_ingest"
node mur_364389292 {
// nid: server
// name: demo02_ingest_server
// path: demo02_ingest_server
layout [size: 0, 0] // has to be first
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
label "demo02_ingest_server"
}
node mur_1246401472 {
// nid: web
// name: demo02_ingest_web
// path: demo02_ingest_web
layout [size: 0, 0] // has to be first
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
label "demo02_ingest_web"
}
node mur_758764981 {
// nid: mobile
// name: demo02_ingest_mobile
// path: demo02_ingest_mobile
layout [size: 0, 0] // has to be first
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
label "demo02_ingest_mobile"
}
node mur_3055755795 {
// nid: rdbms
// name: demo02_ingest_rdbms
// path: demo02_ingest_rdbms
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_ingest_rdbms"
}
node mur_3573779915 {
// nid: crm
// name: demo02_ingest_crm
// path: demo02_ingest_crm
layout [size: 0, 0] // has to be first
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
label "demo02_ingest_crm"
}
node mur_3271830165 {
// nid: erp
// name: demo02_ingest_erp
// path: demo02_ingest_erp
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_ingest_erp"
}
node mur_1159152644 {
// nid: sensor
// name: demo02_ingest_sensor
// path: demo02_ingest_sensor
layout [size: 0, 0] // has to be first
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
label "demo02_ingest_sensor"
}
edge mur_2364367992: mur_1454737705.mur_364389292 -> mur_1454737705.mur_1246401472
// uuid: 5164ebf0_7e5a_43f6_ab12_33ff88484607
// path: demo02_ingest_server to demo02_ingest_web
edge mur_1916527269: mur_1454737705.mur_1246401472 -> mur_1454737705.mur_758764981
// uuid: 570346e6_a748_4eab_9052_b11fea3ef45e
// path: demo02_ingest_web to demo02_ingest_mobile
edge mur_133659634: mur_1454737705.mur_758764981 -> mur_1454737705.mur_3055755795
// uuid: b73fdd88_1fb1_42ab_8059_7cc40ab054a8
// path: demo02_ingest_mobile to demo02_ingest_rdbms
edge mur_3915222018: mur_1454737705.mur_3055755795 -> mur_1454737705.mur_3573779915
// uuid: 68d8f59d_5821_4736_99bc_40d7588929ae
// path: demo02_ingest_rdbms to demo02_ingest_crm
edge mur_2931251695: mur_1454737705.mur_3573779915 -> mur_1454737705.mur_3271830165
// uuid: ceff0a83_0ca1_479b_b713_68ae98d5150c
// path: demo02_ingest_crm to demo02_ingest_erp
edge mur_1860334977: mur_1454737705.mur_3271830165 -> mur_1454737705.mur_1159152644
// uuid: 55d8e552_712e_470f_bfc4_963ccb32f9a0
// path: demo02_ingest_erp to demo02_ingest_sensor
}
node mur_954681658 {
// nid: edw
// name: demo02_edw
// path: demo02_edw
layout [size: 0, 0] // has to be first
elk.direction: DOWN
hierarchyHandling: "INCLUDE_CHILDREN"
cycleBreaking.strategy: "INTERACTIVE"
layering.strategy: "INTERACTIVE"
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,200.0)"
algorithm: "elk.layered"
label "demo02_edw"
node mur_3752990908 {
// nid: edw1
// name: demo02_edw_edw1
// path: demo02_edw_edw1
layout [size: 0, 0] // has to be first
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0, 200.0)"
algorithm: layered
elk.direction: DOWN
label "demo02_edw_edw1"
node mur_3434748611 {
// nid: z1
// name: demo02_edw_edw1_z1
// path: demo02_edw_edw1_z1
layout [size: 0, 0] // has to be first
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
label "demo02_edw_edw1_z1"
}
node mur_1128641776 {
// nid: z2
// name: demo02_edw_edw1_z2
// path: demo02_edw_edw1_z2
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_edw_edw1_z2"
}
node mur_4212901654 {
// nid: z3
// name: demo02_edw_edw1_z3
// path: demo02_edw_edw1_z3
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_edw_edw1_z3"
}
}
node mur_1170205750 {
// nid: edw2
// name: demo02_edw_edw2
// path: demo02_edw_edw2
layout [size: 0, 0] // has to be first
nodeSize.minimum: "(100.0, 200.0)"
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
label "demo02_edw_edw2"
node mur_2002758949 {
// nid: z1
// name: demo02_edw_edw2_z1
// path: demo02_edw_edw2_z1
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_edw_edw2_z1"
}
node mur_1722765677 {
// nid: z2
// name: demo02_edw_edw2_z2
// path: demo02_edw_edw2_z2
layout [size: 0, 0] // has to be first
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
label "demo02_edw_edw2_z2"
}
node mur_4141859671 {
// nid: z3
// name: demo02_edw_edw2_z3
// path: demo02_edw_edw2_z3
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_edw_edw2_z3"
}
}
node mur_2484791916 {
// nid: edw_space
// name: demo02_edw_edw_space
// path: demo02_edw_edw_space
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0, 200.0)"
label "demo02_edw_edw_space"
node mur_4186793489 {
// nid: z1
// name: demo02_edw_edw_space_z1
// path: demo02_edw_edw_space_z1
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_edw_edw_space_z1"
}
node mur_3135725058 {
// nid: z2
// name: demo02_edw_edw_space_z2
// path: demo02_edw_edw_space_z2
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_edw_edw_space_z2"
}
node mur_3130462350 {
// nid: z3
// name: demo02_edw_edw_space_z3
// path: demo02_edw_edw_space_z3
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_edw_edw_space_z3"
}
}
edge mur_1086516631: mur_954681658.mur_3752990908 -> mur_954681658.mur_2484791916
// uuid: f3b0191d_b54c_48ac_b168_60c176c7bda9
// path: demo02_edw_edw1 to demo02_edw_edw_space
edge mur_276888914: mur_954681658.mur_2484791916 -> mur_954681658.mur_1170205750
// uuid: b4a7ff9a_8fc1_49a8_a495_1b184dba728e
// path: demo02_edw_edw_space to demo02_edw_edw2
}
node mur_3117795223 {
// nid: bi_team
// name: demo02_bi_team
// path: demo02_bi_team
layout [size: 0, 0] // has to be first
algorithm: "elk.layered"
elk.direction: DOWN
hierarchyHandling: "INCLUDE_CHILDREN"
cycleBreaking.strategy: "INTERACTIVE"
layering.strategy: "INTERACTIVE"
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,200.0)"
label "demo02_bi_team"
node mur_809189348 {
// nid: s1
// name: demo02_bi_team_s1
// path: demo02_bi_team_s1
layout [size: 0, 0] // has to be first
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
elk.direction: DOWN
label "demo02_bi_team_s1"
}
node mur_1572453709 {
// nid: s2
// name: demo02_bi_team_s2
// path: demo02_bi_team_s2
layout [size: 0, 0] // has to be first
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
elk.direction: DOWN
label "demo02_bi_team_s2"
}
node mur_387288526 {
// nid: s3
// name: demo02_bi_team_s3
// path: demo02_bi_team_s3
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_bi_team_s3"
}
edge mur_2491043083: mur_3117795223.mur_809189348 -> mur_3117795223.mur_1572453709
// uuid: 21adc225_d341_4719_b9c0_21e8975a6a17
// path: demo02_bi_team_s1 to demo02_bi_team_s2
edge mur_3417531181: mur_3117795223.mur_1572453709 -> mur_3117795223.mur_387288526
// uuid: 4d94f051_e118_4fcb_9d4d_88ae33dc699a
// path: demo02_bi_team_s2 to demo02_bi_team_s3
}
node mur_138116183 {
// nid: etl
// name: demo02_etl
// path: demo02_etl
layout [size: 0, 0] // has to be first
nodeSize.minimum: "(100.0,200.0)"
algorithm: "elk.layered"
elk.direction: DOWN
hierarchyHandling: "INCLUDE_CHILDREN"
cycleBreaking.strategy: "INTERACTIVE"
layering.strategy: "INTERACTIVE"
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
label "demo02_etl"
node mur_1006074455 {
// nid: fluent
// name: demo02_etl_fluent
// path: demo02_etl_fluent
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_etl_fluent"
}
node mur_1694821368 {
// nid: js_sdk
// name: demo02_etl_js_sdk
// path: demo02_etl_js_sdk
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_etl_js_sdk"
}
node mur_273818263 {
// nid: mobile_sdk
// name: demo02_etl_mobile_sdk
// path: demo02_etl_mobile_sdk
layout [size: 0, 0] // has to be first
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
label "demo02_etl_mobile_sdk"
}
node mur_4242558093 {
// nid: bulk-ldr
// name: demo02_etl_bulk_ldr
// path: demo02_etl_bulk_ldr
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_etl_bulk_ldr"
}
node mur_2095185581 {
// nid: data_comp
// name: demo02_etl_data_comp
// path: demo02_etl_data_comp
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_etl_data_comp"
}
node mur_487719266 {
// nid: iot
// name: demo02_etl_iot
// path: demo02_etl_iot
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_etl_iot"
}
edge mur_1109653919: mur_138116183.mur_1006074455 -> mur_138116183.mur_1694821368
// uuid: 45132b46_98c2_45b7_bf3b_c0167c879897
// path: demo02_etl_fluent to demo02_etl_js_sdk
edge mur_2035919591: mur_138116183.mur_1694821368 -> mur_138116183.mur_273818263
// uuid: 97d2a9aa_0c48_42a9_bf27_2f85085ec76c
// path: demo02_etl_js_sdk to demo02_etl_mobile_sdk
edge mur_2703043514: mur_138116183.mur_273818263 -> mur_138116183.mur_4242558093
// uuid: d2184949_5c89_423f_aa62_607c7c3ee827
// path: demo02_etl_mobile_sdk to demo02_etl_bulk_ldr
edge mur_510742791: mur_138116183.mur_4242558093 -> mur_138116183.mur_2095185581
// uuid: 069474d4_7e13_416f_95c9_0056f4ee08a2
// path: demo02_etl_bulk_ldr to demo02_etl_data_comp
edge mur_517272391: mur_138116183.mur_2095185581 -> mur_138116183.mur_487719266
// uuid: fa2fd6fe_87ad_4398_8172_64077d0f5a01
// path: demo02_etl_data_comp to demo02_etl_iot
}
node mur_346062964 {
// nid: end_user
// name: demo02_end_user
// path: demo02_end_user
layout [size: 0, 0] // has to be first
algorithm: layered
nodeSize.minimum: "(100.0, 200.0)"
elk.direction: DOWN
hierarchyHandling: "INCLUDE_CHILDREN"
cycleBreaking.strategy: "INTERACTIVE"
layering.strategy: "INTERACTIVE"
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
label "demo02_end_user"
node mur_1371604804 {
// nid: s1
// name: demo02_end_user_s1
// path: demo02_end_user_s1
layout [size: 0, 0] // has to be first
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
label "demo02_end_user_s1"
}
node mur_1903981470 {
// nid: s2
// name: demo02_end_user_s2
// path: demo02_end_user_s2
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_end_user_s2"
}
node mur_2134726108 {
// nid: s3
// name: demo02_end_user_s3
// path: demo02_end_user_s3
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_end_user_s3"
}
node mur_2618102183 {
// nid: s4
// name: demo02_end_user_s4
// path: demo02_end_user_s4
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_end_user_s4"
}
node mur_3209238872 {
// nid: s5
// name: demo02_end_user_s5
// path: demo02_end_user_s5
layout [size: 0, 0] // has to be first
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
algorithm: layered
elk.direction: DOWN
label "demo02_end_user_s5"
}
node mur_3863462496 {
// nid: s6
// name: demo02_end_user_s6
// path: demo02_end_user_s6
layout [size: 0, 0] // has to be first
algorithm: layered
elk.direction: DOWN
nodeSize.constraints: "MINIMUM_SIZE NODE_LABELS"
nodeSize.minimum: "(100.0,100.0)"
label "demo02_end_user_s6"
}
}
edge mur_404404239: mur_138116183.mur_1006074455 -> mur_954681658.mur_2484791916
// uuid: 71dc8c71_22fb_43e6_a018_57fdf2f49ae7
// path: demo02_etl_fluent to demo02_edw_edw_space
edge mur_1673771001: mur_138116183.mur_1694821368 -> mur_954681658.mur_2484791916
// uuid: 747a117e_ee7d_410f_b75b_1b0a4b9af4aa
// path: demo02_etl_js_sdk to demo02_edw_edw_space
edge mur_2556112743: mur_138116183.mur_273818263 -> mur_954681658.mur_2484791916
// uuid: 6d35de3a_0b5e_4c70_82a0_0d5ae9abcb47
// path: demo02_etl_mobile_sdk to demo02_edw_edw_space
edge mur_227252067: mur_138116183.mur_4242558093 -> mur_954681658.mur_2484791916
// uuid: c4314e70_ffc1_4e3f_8469_c95206c372d8
// path: demo02_etl_bulk_ldr to demo02_edw_edw_space
edge mur_859005725: mur_138116183.mur_2095185581 -> mur_954681658.mur_2484791916
// uuid: c5707cbd_548d_4a6d_b2dd_0663b74709e0
// path: demo02_etl_data_comp to demo02_edw_edw_space
edge mur_4188991162: mur_138116183.mur_487719266 -> mur_954681658.mur_2484791916
// uuid: 1f3a5a1d_2710_4470_abf0_c3f738b4b4af
// path: demo02_etl_iot to demo02_edw_edw_space
}
Here is a small example for edges and were they should be in the graph hierarchy. Does this answer your question?
thank you for that quick response
// this one is super clear to me
edge n1 -> n2 // On the level of the two nodes
// 1) is it invalid to put it anywhere ?
// 2) why does it go here is not clear to me ? can you explain what the heuristic is ? is the location of the edge based on the src/dst at all ?
edge p -> n1 // On the level of the top level port/node
}
// 3) do i need to use ports when doing nested nodes ?
edge p -> inside.p // on the level of the top level port
}
-
I think ELK just does not search the whole hierarchy for the correct node. This works kind of but the edge is not layouted.
-
An edge should always be at the same level as its top level element. The only exception are ports on nodes that are on the same level. In this case, the edge is on the same level as the nodes.
-
I recommend it if you do not want or can use INCLUDE_CHILDREN.
Great explanation i am mostly getting there
An edge should always be at the same level as its top level element.
just to be clear i assume as its top level element meaning for both source and target endpoint.
a0->a1->a2->a3 b0->b1->b2->b3
(-> here means left hand side is parent of righ hand side ) edge from a1 to b2 should be at a1 level ? edge from a1 to b1 should be at where ?
An edge from a1 to b2 is not directly possible. You would need an edge from a1 to a0 in a0, a0 to b0 at top level, b0 to b1 in b0, and b1 to b2 in b1 with ports inbetween.
Thank you for that explanation i am starting to understand now !