Workflow Design Dilemma – State Machine, yes or no

A state machine is a very powerful technique to implement, although I would recommend that you consider a framework called StateLess by Nicholas Blumhardt (Autofaq creator), as it is an amazingly simple implementation of a state machine that avoids the unnecessary complexity of Windows Workflow. His approach avoids the issue of long running workflows being … Read more

How to create a django ViewFlow process programmatically

There are two additional Start build-in Tasks available for Flows StartFunction – starts flow when the function called somewhere: @flow_start_func def create_flow(activation, **kwargs): activation.prepare() activation.done() return activation class FunctionFlow(Flow): start = flow.StartFunction(create_flow) \ .Next(this.end) # somewhere in the code FunctionFlow.start.run(**some_kwargs) StartSignal – starts flow on django signal receive: class SignalFlow(Flow): start = flow.StartSignal(some_signal, create_flow) \ … Read more

Importing modules in Python – best practice

Disadvantage of each form When reading other people’s code (and those people use very different importing styles), I noticed the following problems with each of the styles: import modulewithaverylongname will clutter the code further down with the long module name (e.g. concurrent.futures or django.contrib.auth.backends) and decrease readability in those places. from module import * gives … Read more