Placeholder substitution (system)
Schnittstelle IPluginSystemReplacer
Use cases
This type of plugin allows you to define new system variables or modify how existing variables are being evaluated. These plugins will be run before variables are processed by Xima® Formcycle.
For example, this allows you to change the URLs of certain system variables and to redirect them to other URLs.
System variables use the following syntax:
[%$variableName>%]
Method signature
IPluginSystemReplacerRetVal replace(IPluginSystemReplacerParams params) throws FCPluginException
Parameters
An object of type IPluginSystemReplacerParams is passed to the execute method, providing access to the following properties:
- The entire variable string, including its syntax, eg. [%$ATTACHMENT_LIST%]. (getPlaceholder())
- The variable name, without its syntax, eg. ATTACHMENT_LIST. (getPlaceholderContent())
- The workflow processing context (getWorkflowProcessingContext()), granting access to:
- The current form record (getVorgang())
- The form data (getFormDataAdapter())
- Session attributes (getSessionAttributes())
- A temporary directory for storing data (getTempDirPath())
Return value
The execute method must return an object implementing IPluginSystemReplacerRetVal.
The class PluginGenericReplacerRetVal provides a reference implementation. Its constructor takes the string containing the evaluated value of the variable.