The marshaller is the only custom service type that is not OSGi compliant. You need to place the jar in the
RULEPOINT_HOME/lib
directory and not the custom directory. As the marshaller is not OSGi compliant, RulePoint does not autodetect the marshaller that you add. You need to restart the run-time if it is running for the RulePoint run-time to detect the marshaller.
Extend the service class that extends from the com.informatica.cep.sdk.base.BaseActivator abstract class.
The following example shows a service class that extends from the AbstractPluggableMarshaller class:
/**
*
*
*/
public class SampleMarshaller extends AbstractPluggableMarshaller {
Implement the following methods:
com.informatica.cep.sdk.service.AbstractMarshaller.configure(Properties): Implement this method to set the required instance variables with the values from the user interface. The ServiceController framework calls the configure method during deployment of the source with the properties provided in the user interface.
com.informatica.cep.sdk.Marshaller.transform(Map<String, Object>): Implement this method to use the original event or activation map and add, remove, or modify the properties with the transformation logic and return the transformed event or activation. If the transform method throws a RuntimeException, the exception is delegated to the ServiceController layer. You can view this error on the dashboard.
Package the class into the jar and copy it to the
RULEPOINT_HOME/lib
directory.
Start the design-time and run-time environment.
The marshaller class name and configured properties appear in the list in the corresponding page of the user interface.