Interface IPluginFormPreProcess

Position of pre-processing plugins in Xima® Formcycle's program flow. They are run just before workflow processing starts.

Use cases

Allows you to add a custom check whether workflow processing should start or not. When a plugin aborts workflow processing, no actions will be executed and the form will remain in the system state Received. Use this plugin when you wish to cancel the default workflow actions, but still keep and save the form data to the database.

When multiple pre-processing plugins are installed, their order of execution is arbitrary. You should not rely on a certain fixed order.

Pre-processing plugins are run for all forms of the client they belong to, or for all existing forms when installed as a system plugin. We recommend you check whether the plugin should be executed for the current form, for example by defining a plugin property containing a list of allowed forms.

Method signature

IPluginFormPreProcessRetVal execute(IPluginFormPreProcessParams 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 and all form fields (getFormVersion())
  • session attributes (getSessionAttributes())
  • the current user context for access to the database (getUserContext())

Return value

The execute method must return an object implementing IPluginFormPreProcessRetVal.

The class PluginGenericFormProcessingRetVal provides a reference implementation. Its constructor expects a boolean flag continueProcessing:

  • true
    Workflow processing will be started.

  • false
    Workflow processing will be cancelled.

Tags:
Copyright 2000-2024