Synopsis
I\'m developing a web application to learn Django (python 3.4 & Django 1.6.10). The web app has complex and often updated workflows. I decided
to start manually:
from viewflow import flow
from viewflow.base import this, Flow
from .models import CIE
from viewflow import frontend
from django.utils.decorators import method_decorator
@frontend.register
class CIE(Flow):
process_class = CIE
start = flow.StartFunction(this.create_flow).Next(this.end)
end = flow.End()
@method_decorator(flow.flow_start_func)
def create_flow(self, activation):
activation.prepare()
activation.done()
return activation
after that expose rpc:
from modernrpc.core import rpc_method
from flow.flows import CIE
@rpc_method
def start():
CIE.start.run()