menu

This object

class viewflow.This

Helper for building forward referenced flow task.

The rationaly is ability to specify referencies to the class attribute and methods before they declated.

this is like a self but for the class body.

The referencies are resolved by the metaclass at the end of the flow construction.

Example:

class MyFlow(Flow):
    start = (
        flow.StartFunction(this.start_flow)
        .Next(this.task)
    )

    task = (
        flow.View(MyView)
        .Assign(this.start.owner)
        .Next(this.end)
    )

    end = flow.End()

    def start_flow(self, activation):
        activation.prepare()
        activation.done()
class viewflow.ThisObject(name)

Helper for forward references on flow tasks.

owner

Return user that was assigned to the task.