Creating custom function types

Top  Previous  Next

The extensibility of JSCAPE MFT Server Triggers is not limited to the creation of custom action types, MFT Server's extensible API also enables you to create your own custom functions.

 

For a custom function class to work, it must:

 

Extend the abstract class com.jscape.inet.mft.Function;
Implement the abstract methods: getName(), getTemplates(), and evaluate(Object[] value)

 

Other requirements

 

Before you compile your custom function, make sure you include all Java libraries found in the libs directory relative to your JSCAPE MFT Server installation in your IDE project CLASSPATH.

 

To make your custom functions accessible from JSCAPE MFT Server, you must create a JAR archive that contains your custom functions, place it in the libs/ext directory relative to your JSCAPE MFT Server installation, and restart your JSCAPE MFT Server instance.

 

In addition, any third party libraries that your functions depend on should be placed in libs directory of your JSCAPE MFT Server installation.

 

You must also include a MANIFEST.MF file in your JAR archive that identifies those classes that are functions.

 

Lastly, to verify that your function has been successfully installed, login to the JSCAPE MFT Server administrative interface, navigate to the Triggers module of your domain, and click the Functions tab. Your custom function should be found there.

 

Example

 

For a more detailed explanation, tutorial, and complete source code example on creating custom function types please see the following:

 

https://www.jscape.com/blog/how-to-create-custom-trigger-functions

 

Open source custom functions

 

We invite you to check out the open-source functions we've made available for free at the JSCAPE Marketplace. The JSCAPE Marketplace features a large collection of free, open-source custom functions and trigger actions, which you can use to add more functionality to your installations of JSCAPE MFT Server.

 

See also

 

Adding triggers

Event types

Action types
Function types