The kabaret.flow package.
This package is used to model and enact a graph that represent the workflow and the dataflow of a project.
The flow is composed of nodes.
A node contains some params with value that can be connected to other node’s param values, or computed by the node itself.
Each created node exists for a given ‘case’. The case drives the value of some of the node params.
A Case can contain sub-case.
The node tree describe the dataflow with the node params and the workflow with the cases, relations and status params. The root of this tree is known by a specialized Flow. This Flow can be passed along for querying, data manipulation and status management (like interactive gantt chart, reporting tools, render farm, etc...)
and dependencies. Those nodes will provide tools, action and stuffs like that. - Subclass Node to represent the work entities. Those nodes will contain some tool node declared in previous step, and relations that ties them together. - Subclass CaseData to bind some parameter value with a persistence thing (BDD, other python package, ...) - Subclass Flow to generate your root class. - Give an instance of your flow class (or the class itself) to the tools using it.
Once done, several users will enjoy triggering actions based on a common and official flow (with local cpu munching only :p) and automatic status update (thanks to the external case data storage).
The kabaret.flow.case package. Defines the base class CaseData for case data handling.
The kabaret.flow.nodes package. Defines the basic Node and bundled convenient sub-classes.
The kabaret.flow.params package. Defines the base Param and sub-classes needed to build a great flow.
A Node class contain one or more Param. It uses the Param to read or compute a value. A Param can use another Param as source so that a Node can affect another.
A Param is a descriptor for a ParamValue. To add a Param to a Node class, you must store a Param instance in the class definition:
- class MyNode(Node):
- my_param = Param()
You can then access the ParamValue as an attribute of the node instance:param_value = my_node.my_param value = param_value.get()
The kabaret.flow.relations package. Defines all the possible Relations between flow Nodes.
The flow is composed of nodes related which each others.
The simplest relation is ‘Child’. A Child node is ‘contained’ in the parent node and is created as soon as the parent is created. This relation is useful to package some behavior in specialized Node class so that you can reuse it somewhere else. It can also be used to simply group things together.
The ‘One’ and ‘Many’ relations are related to the ‘case’ concept. For example, a Film contains several Shots. You don’t want to write a specific Node class for each film, you want to write a Film Node that contains several (one per case) Shots Nodes. This is a Many relation. The One and Many related nodes are lazily created. That means you can build a huge flow using those relations.