Wiki source code of Vor Beginn Statusverarbeitung


Hide last authors
gru 1.1 1 {{content/}}
2
3 == Interface IPluginFormPreProcess ==
4
5 === Use cases ===
6
7 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.
8
9 {{warning}}
10 When multiple pre-processing plugins are installed, their order of execution is arbitrary. You should not rely on a certain fixed order.
11 {{/warning}}
12
13 {{warning}}
14 The form PreProcess implementations are always executed before each form call in the respective application area (system or client plug-in) in which they were installed. It is therefore recommended to first check in the implementation logic whether the //PreProcess// implementation should be executed for the respective form processing. This can be made configurable, for example, by using //Plugin-Properties//.
15 {{/warning}}
16
17 {{figure image="plugin_preprocess_en.png"}}
18 Placement of the //PreProcess// plug-in in the process chain of {{formcycle case="dat"/}}
19 {{/figure}}
20
21 === Method signature ===
22
23 {{code language="java"}}
24 IPluginFormPreProcessRetVal execute(IPluginFormPreProcessParams params) throws FCPluginException
25 {{/code}}
26
27 == Parameters ==
28
29 An object of type {{jpath path="de.xima.fc.interfaces.plugin.param.form.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:
30
31 * the current project (//getProjekt()//)
32 * the current client ((//getMandant()//)
33 * the current form record (//getVorgang()//)
34 * the current version of the form and all form fields (//getFormVersion()//)
35 * session attributes (//getSessionAttributes()//)
36 * the current user context for access to the database (//getUserContext()//)
37
38 == Return value ==
39
40 The return value must be of type //IPluginFormPreProcessRetVal //s. A reference implementation is provided by the class //PluginGenericFormProcessingRetVal//.
41
42 When instantiating a corresponding object, a boolean flag is expected. If this has the value //true//, further processing is continued in {{formcycle case="dat"/}}. If //false//, processing is aborted.