Plugin-Typen - Workflow plugin

Page / - last modified by gru on 28.04.2020, 16:28

Workflow plugin

last modified by gru

on 28.04.2020, 16:28

Table of Contents

Interface IPluginProcessing

Use cases

Method signature

Parameters

Return value

Content [ Hide ]

Interface IPluginProcessing

Use cases

Method signature

Parameters

Return value

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

Interface	Reference implementation	Description
IProcessingResultSuccess	ProcessingResultSuccess	For returning the success status as a simple boolean flag.
IProcessingResultIntValue	ProcessingResultIntValue	In addition to the success status, allows for returning an integer return code as well.
IProcessingResultStringValue	ProcessingResultStringValue	In addition to the success status, allows for returning a message as a string as well.
IProcessingResultMultiValue	ProcessingResultMultiValue	In addition to the success status, allows for returning a map of strings as well
IProcessingResultFilePath	ProcessingResultFilePath	In addition to the success status, allows for returning a path to a file as well.
IProcessingResultFileData	ProcessingResultFileData	In 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.