menu

This object

class viewflow.This

Helper for building forward referenced flow task.

The rationale is ability to specify references to the class attributes and methods before they are declared.

this is like a self but for the class body.

The references 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.

property owner

Return user that was assigned to the task.