Pre-persist
Interface IPluginFormPrePersist
Use cases
Allows you to add a custom check whether submitted forms are to be saved, or rejected. When a submitted form is rejected, it will not be processed any further.
Method signature
IPluginFormPrePersistRetVal execute(IPluginFormPrePersistParams params) throws FCPluginException
Parameters
An object of type IPluginFormPrePersistParams will be passed to the execute method, providing access to an object of type IFormRequestContext. A form request context provides you with access to many properties of the submitted form, including:
- the current project (getProjekt())
- the current client ((getMandant())
- the current form record (getVorgang())
- the current version of the form with all form fields (getFormVersion())
- session attributes (getSessionAttributes())
- current user context that can be used for accessing the database(getUserContext())
Return value
The execute method must return an object implementing IPluginFormPrePersistRetVal.
The class IPluginFormPrePersistRetVal provides a reference implementation. Its constructor expects a boolean flag continueProcessing:
true
The form will be accepted and processed further.false
The form will not be saved and all further processing stops.