AppSchemaChangeEventHandler

public class AppSchemaChangeEventHandler

The AppSchemaChangeEventHandler class listens to notifications about Schema changes and performs actions when such event is received. The current schema is dropped and a call to CommcareHQ is made to fetch the latest schema version. Once we parse the response, tasks are notified to update triggers.

Methods

schemaChange

public synchronized void schemaChange(MotechEvent event)

Responsible for handling SCHEMA_CHANGE_EVENT. This event is fired when the CommCare server sends a notification about schema change to the MOTECH forwarding endpoint. All stored applications that originate from the configuration passed in the event will be deleted and new applications will be downloaded from the CommCare server.

Parameters:
  • event – the schema change event to be handled