Module reahl.domainui.bootstrap.workflow

New in version 3.2.

A User interface that allows a user to monitor tasks allocated to the user’s queues and to complete those tasks.

Run ‘reahl componentinfo reahl-domainui’ for configuration information.

InboxUI

class reahl.domainui.bootstrap.workflow.InboxUI(parent_ui, relative_base_path, slot_map, for_bookmark, name, **ui_arguments)

A user-facing UserInterface for monitoring an reahl.systemaccountmodel.Inbox. It allows a user to work on tasks.

Slots:
  • main_slot: All UI elements are put into this Slot for any View in this UserInterface.

Views

Call AccountUI.get_bookmark() passing one of these relative URLs as the relative_url kwarg in order to get a Bookmark for the View listed below:

/

The inbox itself.

assemble(login_bookmark=None, get_queues=None)

Programmers override this method in order to define the contents of their UserInterface. This mainly means defining Views or other UserInterfaces inside the UserInterface being assembled. The default implementation of assemble is empty, so there’s no need to call the super implementation from an overriding implementation.

TaskWidget

class reahl.domainui.bootstrap.workflow.TaskWidget(view, task)

The Widget used to display a particular reahl.workflowdomain.Task.

Programmers need to create a subclass of TaskWidget to display a particular Task, also written by the programmer. Such a Widget should display whatever a user needs to see to complete the Task, including the relevant Buttons for deferring, or releasing the Task.

Register each of your TaskWidget subclasses in your pyproject.toml file as a class on the entrypoint ‘reahl.workflowui.task_widgets’. For example:

[project.entry-points."reahl.workflowui.task_widgets"]
"TaskWidget" = "reahl.domainui.bootstrap.workflow:TaskWidget"
classmethod displays(task)

Override this method, and let it return True only if cls is the correct Widget for displaying the given task instance.