Channel Messages to Event Conversion
The overall function of your channel is to receive messages from your data source, convert them to Event instances and call EventProcess.processEvent to hand off the events to BusinessEvents for further processing.
In order to serialize your messages to BusinessEvents events, you must use the serializer that is configured in your destination. You can extend the BaseEventSerializer class to create a serializer for your channel. Also, you need to implement the Event interface which holds the underlying event related data.
- Create a new Event instance and populate event fields with Event.setProperty.
- Set the event's URI using Event.setEventUri and set it to the project's event type, for example, /Events/MyEvent.
- (Optional) Set an XML String payload using the Event.setPayload method.
- (Optional) Set the Event's extID using the Event.setExtId method.
Your event must return all those values that are set using corresponding getter methods. In particular, your event must properly return a list of all properties that are set using getAllPropertyNames. The framework uses various getter methods to create and populate a BusinessEvents event type as defined by setEventUri.