A custom plugin is a scripted service that can process data in a customized manner using Java-programming constructs and provides an extension point for adding any customized data processing logic. You can write a Java logic that will execute the service. Java logic has an access to the script service, the context of the process flow this service belongs to, and input and output stream handlers that allow Java logic to access and manipulate input data to generate the output and pass it to another service in a process flow.
You can create a custom plugin using the following three options:
- Script
- Custom APIs
- Spring Bean
To create a custom plugin activity:
Click Configure > EXTENSIONS > Custom Plugin.
Click Create Custom Plugin.
- Provide the name and description of the new custom plugin service in the Name and Description text boxes.
- Type the encoding standard in Character Set Encoding and click Refresh. You can also use the default encoding standard UTF-8.
Type the variables' names and their values in the Variables table.
While writing the Javascript for a custom plugin, you do not need to hard code the values in the code. You can define variables and their values in a tabular format and can use those variables in the custom plugin script. Expand the following two sections to get more details on how you can work with variables and their values.Select the Interpreter Type.
The sections below discuss three different options to define a custom plugin. They also list out the pros and cons of each of the options and help you decide which one to be used.- Expand Advanced Properties and select the Project from drop-down list of Project.
- Click Save.