Add workflow capabilities, with custom states, transitions and operations, and state transition listeners support
|Reported by:||seccanj||Owned by:||seccanj|
Will add a generic Trac Resource workflow system, allowing to add workflow capabilities to any Trac resource.
Test objects have been implemented as Trac resources as well, so they will benefit of workflow capabilities.
The new ResourceWorkflowSystem component parses the trac.ini configuration file to find all the workflows defined.
To define a workflow state machine for a particular resource realm, add a "<realm>-resource_workflow" section in trac.ini and describe the state machine with the same syntax as the ConfigurableTicketWorkflow component (I may have borrowed some code here and there ;-).
Custom operation providers can be defined that implement the IWorkflowOperationProvider interface.
They will be asked to provide UI controls to let the User perform the specified operation on the given resource.
This control(s) will be rendered inside a form and the input values will be eventually available to the corresponding provider in the perform_operation method, to actually perform the operation on the resource.
Components that require notification when workflow actions are performed on resources, with or without state transitions, can implement the IWorkflowTransitionListener interface.
Components that wish to augment the state machine at runtime, by allowing or denying each transition based on the object and the current and new states, can implement the IWorkflowTransitionAuthorization interface.