Contents

Functionality

This component is aimed at demonstrating the dynamic generation of ports based on the configuration made. By default, there are no input and output ports for this sample component. In the component's custom property sheet (CPS), a property called "Number of Ports" can be seen; input and output ports will be generated based on the value of this property.

Default Behavior

By default, the component sends the message received on a particular input port to all the output ports.

Changes required to use a different CPS

  1. Add the following lines in etc\ServiceDescriptor.xml under "execution" element after "separate-process" element,

    Add
  2. Under "servicerefs" element, make the following service reference changes:
     

    Add
    Remove
  3. 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:

     

  4. Add class DynamicPortsPM.

  5. Provide default constructor and a parameterized constructor (taking "CPSHelper" as the parameter)

    Add the following methods:

    1. private void generateInports(int val)

    2. private void generateOutports(int val)

  6. Also follow steps 2-4 in ..\PortProperties\readme.txt

 

Service Dependencies Used

Icon

The Service Dependencies used by this sample can be seen in the "servicerefs" element present in the "deployment" in the service descriptor file (etc/ServiceDescriptor.xml).

Icon
  • To check the functionality of this component, it should be registered with the server.
  • The steps to register the samples is specified in the Sample Templates section.
Adaptavist ThemeBuilder EngineAtlassian Confluence