Flowgraph
Getting Started
Create an account
- click on register and enter the required information.
- after submission, you see a message, that you have to activate your email address. Since this is a demo installation you don’t have to verify your email
- go to login page and enter your username and password
Create a project
- Click Create an empty project and enter a project name in the upcoming dialog.
- After submission you see your new project in the list of owned.
- Click the project to open it.
Build a Flowgraph
- Click the file icon, placed in explorer on the left.
- In the upcoming dialog click the Model tab and select the Flowgraph as model type in the dropdown.
- Pick a filename and click on the Create button.
- Click the appearing Flowgraph file in the explorer to open the model in the canvas.
- Now you can start modeling your Flowgraph.
Features
- Start nodes are shown as a green circle and can may have exactly one outgoing Transition
- Activity nodes have attributes name and description and are shown as a blue rectangle showing the name. They can have multiple outgoing LabeledTransition edges, and multiple incoming edges of arbitrary type.
- End nodes are shown as a red double circle and can have multiple incoming edges of arbitrary type.
- Containers add Swimlanes to the FlowGraph model type
- Icons are added for the elements in the palette as well as the
.flowgraph files
- The Appearance Provider renders the Transition edge with dashed a line style, if it is directly connected to an End node
- A Custom Action that searches for the shortest path to an End node is added to the context menu of the Start nodes
- As a Code Generator requires a meaningful model semantics (which does not exist for the FlowGraph model), this one only enumerates all nodes of the model and prints some general information about them.
- Prime References introduce hierarchical models and external components into the FlowGraph language. While the former allows whole
.flowgraph
models to be used as ExternalActivity nodes in any FlowGraph, the latter defines a dedicated Ecore metamodel for the service-oriented inclusion of arbitrary components - A Post-Create Hook is added that randomly sets the name (from a set of pre-defined names) when a new activity is created.
- With Palette Groups the modeling components are sorted into Round Elements and Rectangular Elements
Flowgraph MGL
While you’re modeling the story, compare the definitions from the specification MGL file with the behavior of the modeling tool.
import "platform:/resource/info.scce.cinco.product.flowgraph/model/ExternalLibrary.ecore" as externalLibrary
@style("model/FlowGraph.style")
@primeviewer
@generatable("info.scce.cinco.product.flowgraph.codegen.Generate","/src-gen/")
graphModel FlowGraph {
package info.scce.cinco.product.flowgraph
nsURI "http://cinco.scce.info/product/flowgraph"
iconPath "icons/FlowGraph.png"
diagramExtension "flowgraph"
attr EString as modelName
@style(greenCircle)
@contextMenuAction("info.scce.cinco.product.flowgraph.action.ShortestPathToEnd")
@doubleClickAction("info.scce.cinco.product.flowgraph.action.ShortestPathToEnd")
@icon("icons/Start.png")
@palette("Round Elements")
node Start {
// allow exactly one outgoing Transition
outgoingEdges (Transition[1,1])
}
@style(redCircle)
@icon("icons/End.png")
@palette("Round Elements")
node End{
/*
allow an arbitrary number (>0) of incoming edges
the following would have been valid as well, meaning the same:
incomingEdges (*[1,*])
*/
incomingEdges (*[1,*])
}
// use the "blueTextRectangle" as style and pass the attribute "text" as parameter
@style(blueTextRectangle, "${name}")
@icon("icons/Activity.png")
@palette("Rectangular Elements")
@postCreate("info.scce.cinco.product.flowgraph.hooks.RandomActivityName")
node Activity {
attr EString as name
incomingEdges (*[1,*])
outgoingEdges (LabeledTransition[1,*])
}
@style(greenTextRectangle, "${activity.name}")
node ExternalActivity {
@pvLabel(name)
@pvFileExtension("elib")
prime externalLibrary.ExternalActivity as activity
incomingEdges (*[1,*])
outgoingEdges (LabeledTransition[1,*])
}
@style(greenTextRectangle, "${subFlowGraph.modelName}")
node SubFlowGraph {
prime this::FlowGraph as subFlowGraph
incomingEdges (*[1,*])
outgoingEdges (LabeledTransition[1,*])
}
@style(swimlane, "${actor}")
@icon("icons/Swimlane.png")
@palette("Rectangular Elements")
container Swimlane {
attr EString as actor
attr EBoolean as foo
containableElements (Start[1,1], Activity, End, ExternalActivity, SubFlowGraph)
}
@style(simpleArrow)
edge Transition {
}
@style(labeledArrow, "${label}")
edge LabeledTransition {
attr EString as label
}
}