How to create an Ephesoft plugin ?

This blog explains how I created my first plugin for Ephesoft. I didn't want to create a very difficult plugin but I wanted to highlight the complexity of creating a new plugin, packaging it and deploying it. The blog will be split in 4 parts: (1) the global structure of the project, (2) the Java code, (3) the plugin description, (4) the packaging, and finally (5) the deploying.

Let's talk about the scope of the plugin. When you create a batch class in Ephesoft, you obviously need to test it. But, it's not possible to use standard testing methodologies or tools like JMeter. So, you need to refresh the list of running batch instances and it can be quite annoying. So, I decided to create a plugin sending a notification on an Android device when a batch instance is on review or validation step. And this plugin can be useful and re-usable. Moreover, Ephesoft is compatible with some tablets. So an operator receives a notification on his Android device, clicks on it and opens directly the web application. To simplify, I decided to use an applcation called PushBullet that you can install in an Android device. PushBullet provides an API to send notification to Android devices.

Structure of the project

The project is created using Maven. As usual, the folder "src/main/java" contains the Java code. In our project, we created 3 different packages. The package "com.bataon.ephesoft.dcma.notification" contains the Java class NotificationProperties  to handle properties configurable in Ephesoft. The class PushBulletHelper is dedicated to manage interactions with the server PushBullet. And the last 2 classes are the real plugin and are the entry point of the plugin. 

The folder "src/main/resources" contains all resources that will be used during the packaging phase, like usual in a Maven project. But, I will spend more time on the file ephesoft-module-notification.xml. This one contains the configuration of the plugin that will be used during the import.

The last interesting piece is the file distribution.xml  is a file that is used during the Maven packaging phase to follow rules and constraints of Ephesoft during the import. The assembly plugin provides the capability to create binary and source distributions. These distributions (assemblies) are defined using an assembly descriptor.

Java code

The first important class is NotificationProperties containing the definition of all properties that will be configurable using the Ephesoft user interface. The important thing is that keys have to match with the name property defined in the file ephesoft-module-notification.xml.

public final class NotificationProperties implements PluginProperty {
private NotificationProperties(String fieldKey) {
	this.key = fieldKey;
}<p>	public String getPropertyKey() {
	return key;
}<p>	public static final NotificationProperties NOTIFICATION_ACTIVE;
public static final NotificationProperties NOTIFICATION_API_KEY;
public static final NotificationProperties NOTIFICATION_DEVICE_IDS;
public static final NotificationProperties NOTIFICATION_TITLE;
public static final NotificationProperties NOTIFICATION_BODY;
public static final NotificationProperties NOTIFICATION_ADD_LINK;
public static final NotificationProperties NOTIFICATION_URL;<p>	String key;<p>	static {
	NOTIFICATION_ACTIVE = new NotificationProperties("");
	NOTIFICATION_API_KEY = new NotificationProperties("notification.APIKey");
	NOTIFICATION_DEVICE_IDS = new NotificationProperties("notification.deviceIds");
	NOTIFICATION_TITLE = new NotificationProperties("notification.title");
	NOTIFICATION_BODY = new NotificationProperties("notification.body");
	NOTIFICATION_ADD_LINK = new NotificationProperties("notification.addLink");
	NOTIFICATION_URL = new NotificationProperties("notification.url");


Next, we define an interface including the method that will be called by Ephesoft. The name of this method has to match with the value in the tag method-name in the file ephesoft-module-notification.xml

public interface NotificationPlugineService {

void pushNotification(final BatchInstanceID batchInstanceID, final String pluginWorkflow) throws DCMAException;


Next, we create the implementation of this interface. You can check the code directly on Github. I just want to highlight the use of the Batch Class Plugin Config Service to retrieve configuration parameters.

The Plugin Description

This XML file is very important to describe the behavior and the configuration of the plugin. A lot of rules exists for this XML file. I'm not going to explain all rules that applies to this file, but only important ones:

  • The value of the tag plugin-service-instance has to match the bean identifier.
  • The value of the tag method-name has to match the name of the method that has to be called by Ephesoft.
  • The value of the tag application-context-path has to match the name of the context file in your Maven project.
<?xml version="1.0" encoding="UTF-8"?>
			<description>Active ?</description>
			<description>API Key</description>
			<description>Device IDs</description>
			<description>Add link ?</description>
			<description>Link URL ?</description>

 The assembly configuration

To import a plugin in Ephesoft, you have to provide a ZIP file containing two files: (1) The XML file ephesoft-module-notification.xml that contains the definition of the plugin and (2) a JAR file using the same, i.e. ephesoft-module-notification.jar. So, I decided to use the assembly plugin to match these constraints. First, you need to configure your POM file with this piece of XML code:

						<id>make-assembly</id> <!-- this is used for inheritance merges -->
						<phase>package</phase> <!-- bind to the packaging phase -->

The next thing is to define the distribution:

<assembly xmlns="" xmlns:xsi=""

The deploying phase

After building the ZIP file, you need:

  • Open the Workflow Magement page on http://<EPHESOFT_URL>/dcma/CustomWorkflowManagement.html
  • Click on the button Add New Plug-in and upload the ZIP file.
  • After uploading the ZIP file, you need to re-start your Ephesoft server.
  • When your server is successfully restarted, you need to open the batch class management page and edit the batch class that you want.
  • Click on the module where you want to add the plugin. In our case, it will be the Validate Document module.
  • Click on the button Configure and add the Android Notification plugin just before the Validate plugin.

  • Next, click on the button OK
  • After, you need to deploy the workflow. To accomplish that, you need to click on the button Validate.
  • And next Deploy Workflow and the button Normal Workflow.
  • Now, the plugin is imported and deployed but you still need to configure it. You just need to double-click on the plugin ANDROID_NOTIFICATION_PLUGIN and fill all parameters.

Your plugin is ready to use and you can just test it.


It needs me a bit of time to develop my plugin following instructions on the Ephesoft wiki: But, there is not a lot of information to do that. After this learning step, it becomes now easy to create new plugins. You can find all the code in GitHub:

Show Comments