- class reahl.workflowmodel.DeferredAction(**kwargs)¶
A DeferredAction implements something the system should do some time in the future. A DeferredAction will be done once a number of Requirements are fulfilled. The success_action method of a DeferredAction contains the code that needs to be executed when all Requirements are fulfilled. If all Requirements are not fulfilled by the given deadline (a DateTime), the deadline_action is executed instead, before the DeferredAction is deleted.
requirements – A list of
Requirementinstances to be satisfied before .success_action can be executed.
deadline – The DateTime by which deadline_action will be executed if all requirements are not fulfulled by that time.
Override this method to supply the code that needs to execute upon all instances of
Override this method to supply the code that needs to execute once the DateTime limit has been reached, and not all
Requirementhave been fulfilled
- class reahl.workflowmodel.Requirement(**kwargs)¶
Something that needs to be fulfilled before a
DeferrredActioncan be completed. Programmers are required to create subclasses of Requirement that call self.set_fulfulled() somewhere in a method of the subclass in order to indicate that the Requirement is fulfilled.
Tasks and Queues¶
- class reahl.workflowmodel.WorkflowInterface¶
An object that @exposes a number of Events that user interface Widgets can use to access the functionality of this module.
Obtain an instance of WorkflowInterface by merely instantiating it.
take_task = Requests that the given task be reserved for the account currently logged in.
defer_task = Indicates that the current user will tend to the given task later.
go_to_task = Indicates that the current user is attending to a task previously deferred.
release_task = Releases the current task back into the que for other users to tend to.
- class reahl.workflowmodel.Queue(**kwargs)¶
A first-in, first-out queue that is monitored by users for Tasks that the system indicated need to be done.
- class reahl.workflowmodel.Inbox(queues)¶
The inbox of a user monitors several Task Queues.