Upgrading from the Previous Release
This section provides information on how you can upgrade from CEP 3.1.0 to CEP 4.0.0. For more information on release versions, see the Release Matrix.
WSO2 CEP 4.0.0 is not backward compatible
Artifacts of CEP 4.0.0 are not backward comparable as there were major changes in the CEP architecture. Therefore, they need to be rewritten and deployed manually.
Preparing to upgrade
The following prerequisites must be completed before upgrading:
- Make a backup of the CEP 3.1.0 database and copy the <CEP_HOME_3.1.0> directory in order to backup the product configurations.
- Download CEP 4.0.0 from http://wso2.com/products/complex-event-processor/.
Note
The downtime is limited to the time taken for switching databases in the production environment.
Upgrading the databases
The instructions in this section describe how you can perform a data migration to upgrade the 3.1.0 database for use in CEP 4.0.0.
You cannot roll back the upgrade process. However, it is possible to restore a backup of the previous database so that you can restart the upgrade progress.
Before you upgrade to CEP 4.0.0, create a new database and restore the backup of the CEP 3.1.0 database in this new database.
Note
You should NOT connect a new version of WSO2 CEP to an older database that has not been upgraded.
Select the relevant script for the upgrade from here and run it on the new database. Running this script will ensure that the new database is upgraded to have the additional tables and schemas that are required for CEP 4.0.0.
Note
There are three migration scripts available: Â
migration-service-provider.sql
 ,migration-identity.sql
 and migration.sql
. However, only the Âmigration.sql
 script is required to be executed for the CEP database upgrade.
Handling Artifacts
Artifacts cannot be directly migrated from CEP 3.1.0 to CEP 4.0.0 since the configurable objects in CEP 4.0.0 are different to that in CEP 3.1.0. Therefore, the configuration should be handled as follows.
Artifact Type in CEP 3.1.0 Â | Replaced in CEP 4.0.0 By | Note | Recommended Action |
---|---|---|---|
| Event Receiver | The | Identify the input event adapters and event builders used in combination in CEP 3.1.0, and redefine them as event receivers. For detailed instructions, see Configuring Event Receivers. |
| N/A | Â | Redefine the event streams in CEP 4.0.0. For detailed instructions, see Understanding Event Streams. |
| Event Publisher | The Event Publisher artifact in CEP 4.0.0 embeds both the Output Event Adapter and Event Formatter artifacts in CEP 3.1.0. | Identify the output event adapters and event formatters used in combination in CEP 3.1.0, and redefine them as event publishers. For detailed instructions, see Configuring CEP to Create Alerts. |
| N/A | The Siddhi Query Language in CEP 4.0.0 is different to that in CEP 3.1.0. | Redefine the execution plans in CEP 4.0.0. For detailed instructions on defining execution plans, see Creating a Standalone Execution Plan and Creating a Storm Based Distributed Execution Plan. For the modified Siddhi Query Language, see SiddhiQL Guide 3.0. |
Testing the upgrade
- When the database upgrade scripts are executed, the following are some of the new tables that will be created in the database:
- UM_DOMAIN
- UM_SYSTEM_USER
- UM_SYSTEM_ROLE
- UM_SYSTEM_USER_ROLE
- Verify that all the required scenarios are working as expected. This confirms that the upgrade is successful.