Plugin development
Plugins for extending Xima® Formcycle
Many services and functions of Xima® Formcycle can be customized and extended by using plugins. Each plugin type extends a certain aspect of Xima® Formcycle, such as workflow processing or preprocessing forms. To create a custom plugin, you need to setup a Java project first of all.
API documentation
The API documentations for Xima® Formcycle can be found here: Javadocs
Project setup
Setup a new Java project with the IDE of your choice. Xima® Formcycle uses the build management system Apache Maven) to resolve dependencies. Dependencies are provided by our public artifactory http://artifactory.xima-services.de/artifactory/fc-plugin-dev. It contains all components needed for developing plugins. The main artifact you will need is the artifact fc-plugin-common, containing all Java interfaces available for plugins.
Maven uses configuration files named pom.xml (project object model). A pom for plugin development might look as follows:
Example for a pom.xml
Certain plugins may require additional classes and functionality of the Xima® Formcycle system, which is provided by the artifact fc-logic. To add it as a dependency, modify the pom as follows:
<dependency>
<groupId>de.xima.fc</groupId>
<artifactId>fc-logic</artifactId>
<version>${xfc-version}</version>
<scope>provided</scope>
</dependency>
...
This artifact becomes necessary especially when working with databases or the workflow processing. You can also that includes the fc-logic artifact.
Furthermore, note that all dependencies must be declared with the provide scope. This prevent class path issues and keeps the plugin size small. When possible, use libraries already in use by Xima® Formcycle, eg. certain Apache Common libraries.
Developing a plugin for Xima® Formcycle can be as simple as implementing one of the plugin interfaces. To install a plugin, upload them on the administrative interface either as a client or system plugin.
Demo plugins
As an introduction and to help you getting started with developing plugins, we provide several fully commented demo maven projects for each plugin type on our download pages. After downloading them, you can import them into the IDE of your choice, compile them and upload them to Xima® Formcycle.
Special terms
Some Java methods and classes contain German technical terms as used by Xima® Formcycle. For reference, see the following list for their English counterparts.
German | English | Example |
---|---|---|
Aktion | Action (workflow) | public Aktion getFolgeAktion() (get next action) |
Bedingung | Condition (action) | public Bedingung getBedingung() (get the condition of an action) |
Benutzer | User | public Benutzer getCurrentBenutzer() (get user currently logged in) |
Beschreibung | Description | public String getBeschreibung() |
Datei | File | public FormEingangDatei getDatei() (get attached file) |
Datenquelle | Data source | public IPluginDataSourceRetVal executeDatenquelle(...) (get serializable JSON array from a data source) |
Kategory | Category | public ETextbausteinKategorie getKategorie() |
Mandant | Client | public Mandant getMandant() (get client) |
Postfach | Inbox | public Postfach getCurrentPostfach() (get current inbox) |
Projekt | Project, a former term for a form containing files and multiple form versions | public Projekt getProjekt() |
Rolle | Role | public List<Rolle> getRollen() (get all roles for a user) |
Textbaustein | Template | public ETextbausteinKategorie getKategorie() (get template type) |
Vorgang | Form record | public Postfach getByVorgang(UserContext uc, Vorgang vorgang) (get inbox for form record) |
Weiterverarbeitung | Further processing | public EWeiterverarbeitung_Aktion getWeiterverarbeitungBeiFehler() (how to continue when an error has occurred) |