View Source Fountainedge.Graph (Fountainedge Workflow Engine v1.0.8)

Graphing functions.

Link to this section Summary

Functions

Graphs a schema as a UML Activity Diagram using Graphviz.

Ranks all nodes in a given schema.

Link to this section Functions

Graphs a schema as a UML Activity Diagram using Graphviz.

If given a workflow, the graph will be decorated with stateful information such as the current node (or nodes.)

The graph can then be compiled by Graphviz:

Fountainedge.Graph.graph(workflow)
|> Graphvix.Graph.compile("workflow_graph", :svg)

Ranks all nodes in a given schema.

Will set the rank field on each Fountainedge.Node within the schema.

Requires the filename of the dot file given to Graphvix.Graph.compile/3.

Useful for determining backward and forward directions between two nodes. If the rank of the out edge node is less than the current node, then the direction is backwards. Otherwise, if greater, then the direction is forwards.

dot creates hierarchical or layered drawings of directed graphs. A ranking algorithmn is used to determine this heirarchy. It may be useful to use these ranks when determining direction in a workflow. Call this function to calculate ranks per each node.