Creating entity initialization extensions
Create an entity initialization extension to upload past data to an external data source. Initializing entities with meaningful history enables the solution to process incoming events immediately. You initialize entities only once.
Before you begin
About this task
Use the Entity Initialization Extension wizard to create an EntityInitializer class to initialize an entity. The EntityInitializer class contains two methods.
- The createEntityFromEvent method is called when a specific event type occurs. In this method you specify how the event initializes the entity. The attributes of the entity defined in the model must match the Java™ implementation.
- The initializeEntity method is always called during event initialization after createEntityFromEvent, unless null is returned.
Using the ConceptFactory class you can initialize a sub-class of the entity type from the event and emit new events. You can also make use of solution properties by using the extension API methods getSolutionProperties and getSolutionProperty.
You can initialize extension projects by writing initialization statements. The following example
shows an initialization statement for a vehicle:
a vehicle is initialized from a vehicle activity, where this vehicle comes from the vehicle of this vehicle activity.