Feeder
The Feeder component is used to feed data to any other component connected to its output port.
- This component cannot be launched in-memory of the peer server.
- This component can only be deployed in a server with services.bat script and if the peer in which the components are deployed into is launched as a windows service, the panels will not be shown on screen.
Configuration and Testing
Message Type Configuration
Feeder can be used to send Text messages or XML messages to the component(s) connected to its output port.
The figure below shows the CPS of the Feeder configured to send XML messages defined by the provided XSD, choosing Output Message Format as 'XML'. Schema can be copied or it can be loaded by clicking Load button. After the schema is placed in the editor, choose the root element by clicking the ellipses button against Select Root Element property. Choose Output Message Format as 'Plain Text' in order to use Text message.
Figure 1: Specifying the XSD of the outgoing messages
To use the Schema of a component that is connected to the Feeder, click Connected Port Schemas button and In the Connected ports dialog box, select the input port to enable connection between output port of Feeder and input port of that component.
Figure 2: Choosing the Input port of the connected component
Message Details Configuration
Body
Feeder provides the feature of auto generation of XML messages corresponding to the XSD provided in the Message Type Configuration panel of the CPS. The figure below shows a sample XML generated (after clicking Generate Sample button) for the XSD provided in Figure 1 above. If a different XML is specified, it can be validated against the XSD using the Validate button as seen in the below figure.
Figure 2: Auto generation of sample XML messages
Headers
To add headers to identify the message, click the Add button in the Headers tab.
Figure 3: Header tab
Attachments
To add attachments as message, click the Add button in the Attachments tab.
Figure 4: Attachments tab
Encrypt Configuration
Use Encryption Configuration tab to encrypt the output messages and decrypt the input messages.
Figure 5: Encrypt Configuration tab
Input and Output
Input Schema
Feeder does not have input port and hence it does not have any input schema.
Output Schema
The XSD provided in the CPS is itself the output schema of the component.
Functional Demonstration
Scenario 1
Sending XML messages corresponding to the provided XSD.
Configure the Feeder as mentioned in Configuration and Testing section. Connect a Display to its output port as shown in the below figure.
Figure 6: Sample event process depicting the functionality of Feeder
Now, we have two pop-up frames on the screen, one each for Feeder and Display components. Click the Send button in the Feeder frame shown in Figure 4 to get the output in the Display component as shown in Figure 5.
Figure 7: Sending a sample XML message from the Feeder
Figure 8: Display component showing the XML message received from Feeder
Use Case Scenario
In the sample event process Hospitality Service, the Feeder component is used to send the operation type. To work with this example, refer the help provided in the context of this flow in eStudio.
Figure 9: A sample event process
Useful Tips
- Feeder is very useful in testing the functionality of components by feeding-in the data they require.
- This component cannot be launched In-memory of the peer server.
Replace $index feature
The Replace "$index" feature in the Feeder could be used to auto generate unique keys for every outgoing message. The $index in the outgoing message would be replaced by unique numbers corresponding to the message that is currently being sent.
For example, for the message shown in Figure 10, the first outgoing message would be as shown in Figure 11.
Figure 10: Using the feature 'Replace $index' and providing values as $index1 and $index2
Figure 11: The first outgoing message when the message is sent carries the unique keys in place of "$index"