drawfbp
Repository
"Tool for Creating and Exploring Flow-Based Programming Diagram Hierarchies"
Concepts
Code generation
The tool can generate code in
Java
C#
JSON
FBP
Sample generated Java code from the picture on Connections section
Errors present during the generation
Class missing for 'subnet1' - Diagram needs to be updated
Class missing for 'process1' - Diagram needs to be updated
Class missing for 'process2' - Diagram needs to be updated
Class missing for 'process2' - Diagram needs to be updated
Elements not present on the generated code
Person
File
Report
Also, "legend" and "enclosure" where not shown on picture but where present on the diagram (and not on the resulting code).
package sample; //change package name if desired
import com.jpaulmorrison.fbp.core.engine.*;
@ComponentDescription("Click anywhere on selection area")
@InPort("extportIn1")
@OutPort("extportOut1")
public class drw extends SubNet {
String description = "Click anywhere on selection area";
protected void define() {
component("subnet1","Invalid class".class);
component("SUBOI",SubOI.class);
initialize("extportInOut1", component("SUBOI"), port("NAME"));
component("process1","Invalid class".class);
component("SUBIN",SubIn.class);
initialize("extportIn1", component("SUBIN"), port("NAME"));
component("SUBOUT",SubOut.class);
initialize("extportOut1", component("SUBOUT"), port("NAME"));
component("process2","Invalid class".class);
initialize("IP1", component("process1"), port(""));
connect(component("process1"), port("OUT"), component("subnet1"), port("IN"));
connect(component("subnet1"), port("OUT"), component("process2"), port("IN"));
connect(component("process2"), port("OUT"), component("SUBOI"), port("IN" ));
connect(component("SUBIN"), port("OUT"), component("process1"), port("IN"));
connect(component("process1"), port("OUT"), component("SUBOUT"), port("IN" ));
}
}
/* Errors in generated code - they must be corrected for your program to run -
remove this comment when you are done */