There are two representations of the Type System:
Initialization
Initialization drops existing type definitions from the database prior to rebuilding, so the entire type system is created from scratch.
Method 1:
1. HAC > Platform > Initialization
2. The Initialization page now displays
Method 2:
Optionally, you can pass the parameter -Dtenant=$tenantname
Activities:
Generate Initialization Scripts without executing
Method 1:
1. HAC > Platform > Initialization
2. The Initialization page now displays
3. Click the SQL Scripts button. It takes you to the following page:
4. Click the Generate scripts button for initialization.
The generated scripts can be seen directly on the web page or can be downloaded as a ZIP file.
Method 2:
From the command line, by running ant initialize -DdryRun=true.
The dryRun parameter set to true means that the scripts are generated but not executed.
The generated SQL init scripts can be found in the following files:
<HYBRIS_TEMP_DIR>/init_<TENANT>_drop_schema.sql
<HYBRIS_TEMP_DIR>/init_<TENANT>_schema.sql
<HYBRIS_TEMP_DIR>/init_<TENANT>_data.sql
Update
Type system definitions in the database are modified to match the new type system definition in the items.xml files.
Update mechanism makes sure that all data that existed in the system before the update is still accessible after the update.
About Update
Method 1:
1. HAC > Platform > Update
2. The Update page now displays
Options:
Activities:
Generate Update Scripts without executing
Method 1:
1. HAC > Platform > Update
2. The Update page now displays
3. Click the SQL Scripts button. It takes you to the following page:
4. Click the Generate scripts button for update.
The generated scripts can be seen directly on the web page or can be downloaded as a ZIP file.
Method 2:
From the command line, by running ant updatesystem -DdryRun=true.
The dryRun parameter set to true means that the scripts are generated but not executed.
The generated SQL init scripts can be found in the following files:
<HYBRIS_TEMP_DIR>/update_<TENANT>_schema.sql
<HYBRIS_TEMP_DIR>/update_<TENANT>_data.sql
Locking SAP Hybris Commerce
HAC allows locking the system against initialization or update.
While this lock is in effect, Hybris can neither be updated nor initialized.
Lock prevents loss of data.
Lock can be activated or deactivated from either Initialization or Update page of HAC
- File-based representation, spread across in various items.xml files of Hybris extensions.
- Not actively used by Hybris at runtime.
- Can modify this representation any time by modifying the items.xml file of an extension, but only take effect after initialization or update of Hybris.
- The database of Hybris contains a representation of the type system.
- Used by Hybris at runtime.
- Reflects the state the type system was in when Hybris was last updated or initialized.
Initialization
Initialization drops existing type definitions from the database prior to rebuilding, so the entire type system is created from scratch.
Method 1:
1. HAC > Platform > Initialization
2. The Initialization page now displays
Method 2:
Optionally, you can pass the parameter -Dtenant=$tenantname
Configuration from HAC can be used to initialize system from the command line by passing all configuration options via -DconfigFile=<your file>
On clicking Dump Configuration button, we get all the current configurations for initialization.
- Aborts all running cron jobs
- Removes all tables from the database schema. The DROP TABLE statement is used. This removes not only Hybris data, but all data stored in the database schema. During the initialization process, the system only removes those tables that are declared in its current items.xml files. Old tables - orphaned data - stay intact.
- The init process prepares the ddl and dml scripts and executes them (unless dryrun is enabled, in which case the scripts are not executed). This way - the schema is prepared and persisted into DB. ddl scripts also remove tables.
- Clears cache
- Creates a number of media folders.
- Sets licenses
- The Initialization continues with creating essential data and project data (This is optional, but enabled for all extensions by default).
- Furthermore, during the init process the hmc configuration is cleared and types are localized.
Generate Initialization Scripts without executing
Method 1:
1. HAC > Platform > Initialization
2. The Initialization page now displays
3. Click the SQL Scripts button. It takes you to the following page:
The generated scripts can be seen directly on the web page or can be downloaded as a ZIP file.
Method 2:
From the command line, by running ant initialize -DdryRun=true.
The dryRun parameter set to true means that the scripts are generated but not executed.
The generated SQL init scripts can be found in the following files:
<HYBRIS_TEMP_DIR>/init_<TENANT>_drop_schema.sql
<HYBRIS_TEMP_DIR>/init_<TENANT>_schema.sql
<HYBRIS_TEMP_DIR>/init_<TENANT>_data.sql
Update
Type system definitions in the database are modified to match the new type system definition in the items.xml files.
Update mechanism makes sure that all data that existed in the system before the update is still accessible after the update.
About Update
- Preserves the table name, to which a type was mapped, even if it was changed in items.xml
- Preserves the column name, to which an attribute was mapped, even if it was changed in items.xml
- Preserves the column type for an attribute, even if it was changed in items.xml
- Does not drop any tables and columns
- Does not delete any item data
- Drops and recreate indices, if they are added or changed in items.xml
- Does NOT change the attribute from optional to mandatory, even if it was changed in items.xml
- Does NOT change the attribute from non-unique to unique, even if it was changed in items.xml
- Type code change is not possible. The system treats such a change as a new type being added.
- Forgotten/changed deployment: Trying to change a deployment name have no effect, the data is still stored under the previous one.
Method 1:
1. HAC > Platform > Update
2. The Update page now displays
3. Click the Update button
Options:
- Update running system
- This rebuilds all type definitions from items.xml files.
- Clear the HMC configuration from the database
- This removes the timestamp on the HMC configuration in the database and uploads an empty HMC configuration into the database.
- An empty HMC configuration without timestamp causes the HMC to upload the configuration stored in the hmc.xml files into the database.
- Create essential data
- Essential data is automatically loaded after creation of tenant.
- Localize types
- To localize the type system
- Project Data
- To view the list of available extensions, consult the Project Data section on both Initialization and Update pages.
- lucenesearch
- If you do not want your lucenesearch indexes to be modified in any way, set both values (update.index.configuration and rebuild.indexes) under lucenesearch to false.
- After sample data has been created, the LucenesearchManager deletes all available Lucene-based indexes. This happens because the default setting of update.index.configuration box is true.
- To disable recreating the indexes, make sure the update.index.configuration box is set to false.
- If the update.index.configuration box is set to false, LucenesearchManager does not delete the index. Instead, it triggers a rebuild of all available Lucene-based indexes. This happens because the default setting of rebuild.indexes box is true. This process can be time-consuming, it is not always necessary to have Lucene indexes up-to-date.
- To disable rebuilding the indexes, make sure the rebuild.indexes box is set to false.
- Update - Orphaned Types
- Type system definitions that exist in the database but are not defined in any items.xml file are referred to as orphaned types. The data backed by orphaned types are safe and can be made accessible again by redefining the type in any items.xml file. However, the data backed by orphaned types and the definition of the orphaned types themselves remain in the database and continue to use up space.
- Restarting Cron Jobs and Tasks
- After the initialization or update has completed, Hybris Commerce restarts cron jobs and tasks because task.engine.loadonstartup property is set to true by default.
- If task.engine.loadonstartup is set to false, no cron jobs or tasks are restarted automatically.
Method 2:
From the command line, by running ant updatesystem.
Optionally, you can pass the parameter -Dtenant=$tenantname
Configuration from HAC can be used to update system from the command line by passing all configuration options via -DconfigFile=<your file>
On clicking Dump Configuration button, we get all the current configurations for update.
Optionally, you can pass the parameter -Dtenant=$tenantname
Configuration from HAC can be used to update system from the command line by passing all configuration options via -DconfigFile=<your file>
On clicking Dump Configuration button, we get all the current configurations for update.
- Type system definitions from all extensions items.xml files are read in.
- Type system in the database is modified according to the type definitions of all extensions items.xml files.
- Adding newly defined types to the type system definition in the database.
- Type definitions and attribute definitions that are not part of the type system definition in the database are added.
- Modifying existing types to match the type system definition in the database.
- Type definitions and attribute definitions that are changed compared to the type system definition in the database are modified.
- The update, ddl and dml scripts are also generated here.
- Update continues with creating essential and project data, optionally, if selected.
Generate Update Scripts without executing
Method 1:
1. HAC > Platform > Update
2. The Update page now displays
3. Click the SQL Scripts button. It takes you to the following page:
Method 2:
From the command line, by running ant updatesystem -DdryRun=true.
The dryRun parameter set to true means that the scripts are generated but not executed.
The generated SQL init scripts can be found in the following files:
<HYBRIS_TEMP_DIR>/update_<TENANT>_schema.sql
<HYBRIS_TEMP_DIR>/update_<TENANT>_data.sql
Locking SAP Hybris Commerce
HAC allows locking the system against initialization or update.
While this lock is in effect, Hybris can neither be updated nor initialized.
Lock prevents loss of data.
Lock can be activated or deactivated from either Initialization or Update page of HAC
No comments:
Post a Comment