See Also: Writing Registry Plugins and Registry Person Vetting
The interface for Vetter Plugins is experimental and may change across minor releases. |
Some additional conventions are required when writing a Dashboard Widget Plugin.
FooVetter
.FooVetters
model and a corresponding Controller.StandardPluginController
, which provides some behind the scenes common functionality.foo_vetters
table will be created. There is no add operation or view required. The skeletal row will point to the parent Vetting Step.foo_vetter/foo_vetters/edit/#
. This will be called immediately after the Plugin is first instantiated.cm_foo_vetters
should include a foreign key to cm_vetting_steps:id
.FooVetter::vet($vettingStepId, $coPersonId, $coPetitionId=null)
, which will be called to perform the vetting. This function will be called from Registry Job Shell (via VetJob), and so should be able to operate without user interaction.foo_vetter/foo_vetters/review/#
. This view should parse the Vetting Result (available in $vv_result
) and render a display suitable for an administrator to understand the request status. The Vetting Step configuration will be available in $foo_vetter
. (The controller function is implemented in StandardPluginController, only the view file itself is required.)It is up to the Plugin to determine which elements of the CO Person record to use for vetting, and how to use them.
The vet()
call should return a VettingStatusEnum as follows:
Canceled
: The request was canceled by an administrator.Error
: An error occurred during vetting and no result could be determined.Failed
: The subject failed vetting.PendingManual
: The request requires administrator review. This result will cause Registry to send a notification to an administrator to take further action. If the system called by the Plugin will handle administrator review, PendingResult
should be returned instead.PendingResult
: The request is pending on further action. This result will cause Registry to stop processing the request. In order to resume processing, the Plugin should take the following steps:VettingStep::resolve()
with the appropriate results.VettingRequest::queue()
with $requeue=true
. Processing will resume (or complete) at the next run of VetJob.