Interface IPluginProcessing

Position of workflow processing plugins in Xima® Formcycle's program flow. They are run as an action during workflow processing.

Use cases

  • Sending the data of submitted forms to an web service
  • Custom actions such as creating custom PDF files

Method signature

IPluginProcessingRetVal execute(IPluginProcessingParams params) throws FCPluginException

Parameters

For each paramter passed to the plugin, all variables will be replaced. 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.

An object of type IPluginProcessingParams is passed to the execute method, providing access to the following properties:

  • The action for which this plugin has been selected. (getAction())
  • The parameters that have been set for this plugin. ((getParams())
  • 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 IPluginProcessingRetVal.

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.

There are multiple interfaces extending IPluginProcessingRetVal that can be used, the following list provides a quick overview

 InterfaceReference implementationDescription
IProcessingResultSuccessProcessingResultSuccessFor returning the success status as a simple boolean flag.
IProcessingResultIntValueProcessingResultIntValueIn addition to the success status, allows for returning an integer return code as well.
IProcessingResultStringValueProcessingResultStringValueIn addition to the success status, allows for returning a message as a string as well.
IProcessingResultMultiValueProcessingResultMultiValueIn addition to the success status, allows for returning a map of strings as well
IProcessingResultFilePathProcessingResultFilePathIn addition to the success status, allows for returning a path to a file as well.
IProcessingResultFileDataProcessingResultFileDataIn addition to the success status, allows for returning binary data as well.

An exception of type FCPluginException is thrown when any errors have occurred in the plugin. By setting up an appropriate error handler, the exception can be caught and actions can be taken accordingly.

Tags:
Copyright 2000-2024