jpaulm / drawfbp

Tool for Creating and Exploring Flow-Based Programming Diagram Hierarchies
http://www.jpaulmorrison.com/fbp/
146 stars 20 forks source link

Ambiguous use of block type "B" & declaring netin, netout ports #16

Closed ERnsTL closed 6 years ago

ERnsTL commented 6 years ago

Greetings, in the .drw files generated by DrawFBP, there is a type information for each block. There are multiple types:

const TypeBlock = "B" // normal component
const TypeIIP = "I"
const TypeEnclosure = "O"  // just for presentation purposes, has .IsSubnet = false
const TypeSubnet = "B"     // reference to actual subnet, has .IsSubnet = true
const TypeExtPortIn = "B"  //TODO type "B" gets reused here...how to discern these? corresponds to INPORT = network inport in .fbp
const TypeExtPortOut = "B" //TODO type "B" gets reused here...how to discern these? corresponds to OUTPORT = network outport in .fbp
const TypeExtPortOI = "B"  //TODO type "B" gets reused here...how to discern these?
const TypeLegend = "L"
const TypeFile = "F"
const TypePerson = "P"
const TypeReport = "R"

As given by the comments, the block type "B" gets reused for multiple block types. How are network-level input and output ports declared in the diagram using the .drw XML format?

Meaning, what is the equivalent of the .fbp form, where network-wide ports are declared using INPORT=... and OUTPORT=...?

INPORT=filter.IN:NETIN
filter(bin/filter-records) OUT -> IN copy(bin/copy)
'OUT1' -> ARGS copy
OUTPORT=copy.OUT1:NETOUT

This declares a network-wide input port NETIN leading into filter.IN, further into the copy component, and from copy.OUT1 into the network-wide output port NETOUT.

If they are not already differentiatable / discernable using some other means than the block type, please make these network-wide input, output and input-output ports discernable / differentiatable, for example using block types NI, NO, NIO for network in, network out, network in-out respectively.

jpaulm commented 6 years ago

This seems to be related to issue #18 - I am starting to address them now. May also be related to #15... Will label this release 2.14.2.

I also note that the Maven version is back-level. I hope to have release 2.14.2 available in a couple of days, both in Github, and on Maven... Apologies!

PS You don't seem to have shared any information about FlowD on the Google Group - https://groups.google.com/forum/#!forum/flow-based-programming - are you considering it? TIA

ERnsTL commented 6 years ago

Greetings Paul, no problem and thanks for addressing this - then the .drw format can be used for defining subnets with their network in/out/IO ports as well.

An announcement on the FBP Google group is planned for the near future - I wrote you an email about that to your @rogers and @gmail.com addresses (not knowing which is current).

jpaulm commented 6 years ago

With the v2.14.2 corrections, the types for External Ports are 'C', 'D' and 'E'.

PS Both email addresses are good - the rogers one forwards to gmail.

Best regards,

ERnsTL commented 6 years ago

Regarding feedback on external ports legend: The new one is:

"ExtPorts: In", "... Out", "... Out/In"

That's totally fine!

ERnsTL commented 6 years ago

Regarding this block type:

static public class Types {
        [...]
        static String UP = "Z";
}

What is it being used for? Or is this an obsolete type?

In the bottom of the DrawFBP interface, where one can choose the block type, in the very bottom right, there is a button labeled "up", but it is greyed out resp. deactivated.

jpaulm commented 6 years ago

Well spotted! This is obsolete - I guess I forgot to remove it!

Sounds like your jar file is back level... If you download the latest jar file in https://github.com/jpaulm/drawfbp/releases (v2.14.2), you should see a rectangle showing 'Go to Directory' - I think it works...!

ERnsTL commented 6 years ago

OK, upgraded ;-) Attaching the .jar to the Github release is the most direct way for getting the release file anyway.

The "Go To Directory" button in the bottom right works like the "open file"-functionality for me.

Just updated an example FBP network with external in and out ports. The symbols look nice! The new block types are also as expected now (C, D, E) and it is easy to discern them now when parsing the .drw file programatically.

I think this issue can be closed then!

jpaulm commented 6 years ago

Closed with v2.14.2