Backend API

interface FlowInterface

Interface describing the methods a Flow must have.

Most of the methods corresponds to messages exchanged on the Flow Based Programming Network Protocol.

Created by antoine on 30/05/17.

boolean addNode (String id, String component, JSONObject metadata, String graph, boolean executable)

Add a node to the flow

boolean removeNode (String id, String graph)

Remove a node from the flow

boolean renameNode (String from, String to, String graph)

Change the id of a node

boolean changeNode (String id, JSONObject metadata, String graph)

Update the metadata of a node.

boolean addEdge (String id, JSONObject src, JSONObject tgt, JSONObject metadata, String graph)

Add an edge, connecting two nodes on the graph.

boolean removeEdge (String id, String graph, JSONObject src, JSONObject tgt)

Remove an existing edge from the graph.

boolean changeEdge (String id, String graph, JSONObject metadata, JSONObject src, JSONObject tgt)

Modify the src, tgt and metadata of an edge

boolean addGroup (String name, JSONArray nodes, JSONObject metadata, String graph)

Create a new group that is a kind of subgraph user can run independently.

boolean removeGroup (String name, String graph)

Remove an existing group

boolean renameGroup (String from, String to, String graph)

Rename a group.

boolean changeGroup (String name, JSONObject metadata, String graph)

Change the metadata of a group.

String serialize ()

Serialize the flow as json