Hide last authors
XIMA Admin 1.1 1 {{content/}}
2
gru 1.12 3 == Interface IPluginProcessing ==
XIMA Admin 1.1 4
gru 1.12 5 {{figure image="plugin_processing.png"}}
6 Position of workflow processing plugins in {{formcycle/}}'s program flow. They are run as an action during workflow processing.
XIMA Admin 1.1 7 {{/figure}}
8
gru 1.12 9 === Use cases ===
XIMA Admin 1.1 10
gru 1.12 11 * Sending the data of submitted forms to an web service
12 * Custom actions such as creating custom PDF files
XIMA Admin 1.1 13
gru 1.12 14 === Method signature ===
XIMA Admin 1.1 15
gru 1.12 16 {{code language="java"}}
17 IPluginProcessingRetVal execute(IPluginProcessingParams params) throws FCPluginException
18 {{/code}}
XIMA Admin 1.1 19
gru 1.12 20 == Parameters ==
rth 1.9 21
XIMA Admin 1.1 22 {{warning}}
gru 1.12 23 For each paramter passed to the plugin, all [[variables will be replaced>>doc:Formcycle.UserInterface.Variables]]. For example, when a parameter contains the substring //[%tf1%]//, this substring will be replaced by the value of the forms field named //tf1//. Variable evaluation cannot be turned off currently.
XIMA Admin 1.1 24 {{/warning}}
25
gru 1.12 26 An object of type {{jpath path="de.xima.fc.interfaces.plugin.param.workflow.IPluginProcessingParams"/}} is passed to the execute method, providing access to the following properties:
XIMA Admin 1.1 27
gru 1.12 28 * The action for which this plugin has been selected. (//getAction()//)
29 * The parameters that have been set for this plugin. ((//getParams()//)
30 * The workflow processing context (//getWorkflowProcessingContext()//), granting access to:
31 ** The current form record (//getVorgang()//)
32 ** The form data (//getFormDataAdapter()//)
33 ** Session attributes (//getSessionAttributes()//)
34 ** A temporary directory for storing data (//getTempDirPath()//)
XIMA Admin 1.1 35
gru 1.12 36 == Return value ==
XIMA Admin 1.1 37
gru 1.12 38 The execute method must return an object implementing {{jpath path="de.xima.fc.interfaces.plugin.retval.workflow.IPluginProcessingRetVal"/}}.
39
40 This interface allows you to return either a simple boolean flag as the result, indicating whether the plugin has been successful, or multiple values as string or binary data.
41
42 There are multiple interfaces extending {{jpath path="de.xima.fc.interfaces.plugin.retval.workflow.IPluginProcessingRetVal"/}} that can be used, the following list provides a quick overview
43
XIMA Admin 1.1 44 {{table dataTypeAlpha="0-1"}}
gru 1.12 45 |= Interface|=Reference implementation|=Description
46 |IProcessingResultSuccess|ProcessingResultSuccess|For returning the success status as a simple boolean flag.
47 |IProcessingResultIntValue|ProcessingResultIntValue|In addition to the success status, allows for returning an integer return code as well.
48 |IProcessingResultStringValue|ProcessingResultStringValue|In addition to the success status, allows for returning a message as a string as well.
49 |IProcessingResultMultiValue|ProcessingResultMultiValue|In addition to the success status, allows for returning a map of strings as well
50 |IProcessingResultFilePath|ProcessingResultFilePath|In addition to the success status, allows for returning a path to a file as well.
51 |IProcessingResultFileData|ProcessingResultFileData|In addition to the success status, allows for returning binary data as well.
XIMA Admin 1.1 52 {{/table}}
gru 1.12 53
54 An exception of type {{jpath path="de.xima.fc.plugin.exception.FCPluginException"/}} is thrown when any errors have occurred in the plugin. By [[setting up an appropriate error handler>>doc:Formcycle.UserInterface.MyForms.WorkflowProcessing.ErrorHandling]], the exception can be caught and actions can be taken accordingly.
Copyright 2000-2024