Functionality
This component is aimed at demonstrating the addition of custom CPS.
This sample shows how to write a new custom property sheet and how to handle the configuration serialization and deserialization.
Default Behavior
By default, there is no business logic or send logic implemented in the component's code. So it does not send out any message to the output port.
Changes required to use a different CPS
A class which holds the configuration should be created
A property sheet class containing UI which should be shown when CPS is launched should be created
This property sheet class should extend TifosiCustomPropertySheet.
Add the following lines in etc\ServiceDescriptor.xml under "execution" element after "separate-process" element
Add following service references under "servicerefs" element
Remove
Add 'cpsClass' and 'cpsMandatory' (if the configuration is mandatory) attributes in service-export ant task (present in the target "deploy") in common.xml as shown below:
Now make the following changes to the elements below:
Elements | Changes Required |
---|---|
ILookupConfiguration.java | Add method String getConfigurationLookupName(); |
RuntimeArguments.java | Add and implement method String getConfigurationLookupName(); |
LookupHelper.java | Add field String configurationLookupName and initialize in constructor Add and implement method Object lookupSerializedConfiguration() throws NamingException |
CustomCPS.java | Add field CustomCPSPM configuration Provide getter for configuration. |
CustomCPSMessageListener.java | Change constructor to take CustomCPSPM instead of RuntimeArguments |
JMSObjects.java | Change CustomCPSMessageListener constructor in create() method to pass configuration object instead of runtime arguments object |