items come directly from the source system. This stage begins by loading data into the Hybris Data Hub using the inbound extension. Then the program transforms the received data into raw items, which continue the integration process.
During the stage, Raw items go through grouping and filtering, which reduces the number of data blocks to process becoming canonical items. It is organised, consistent, and ready for use by a target system .
During the stage, the canonical items are converted into the target one. Hybris Data Hub then sends the target items to the target system for publication using the outbound extension, which is the final touch of integration.
The IDoc format, which is the main one for import/export files in SAP ERP, it is used for asynchronous data transfer. SAP ERP sends IDocs via HTTP to Hybris Data Hub, where the files are processed using the adapter and imported into the Hybris platform database.
Step for Data hub implementation
Basic prerequisites software and its version for installing Data Hub.
Java 1.8
SAP/hybris Commerce 6.0 or higher (I am using 6.3)
Tomcat apache-tomcat-7.0.78 or higher
Data Base MySql
Maven apache-maven-3.5.0 or higher
Download tomcat(apache-tomcat-7.0.78) from https://tomcat.apache.org/download-70.cgi.
Unpack the tomcat zip on hard drive i.e. <TOMCAT_HOME>
Add CATALINA_HOME environment variable to <TOMCAT_HOME>
Update PATH environment variable, append Tomcat bin folder – %CATALINA_HOME%\bin
Download the Maven(apache-maven-3.5.0) from http://maven.apache.org/download.cgi
Unpack the Maven zip file on hard drive i.e. <MAVEN_HOME>
Add both M2_HOME and MAVEN_HOME environment variables to <MAVEN_HOME>
Update PATH environment variable, append Maven bin folder – %M2_HOME%\bin
Directory structure needs to create for data hub i.e. <ROOT>\<projectname>\datahub
Archetype in this folder, datahub-extension-archetype-6.3.0.0-RC2 and datahub-extension-sdk-6.3.0.7-RC1 jars will be resided here.
Config in this folder, all config files will be resided here i.e. local.properties and encryption-key.txt. this is used for local environment.
crm in this folder, all custom data hub extension will be resided here.
dependencies in this folder, all data hub dependencies related jar will be resided here.
erp in this folder, all out of the box data hub extension will be resided here.
others in this folder, database connector will be resided here.
Archetype :Download the datahub-extension-archetype-6.3.0.0-RC2 jar and copy in folder
copy datahub-extension-sdk-6.3.0.7-RC1 jar from <HYBRIS_HOME>\hybris\bin\ext-integration\datahub\sdk and paste in archetype folder.
In Config folder create 2 file
Encryption-key.txt which will contain encryption key. Copy 32 digit key and paste in encryption-key file.
DAADDE8B29A08DF0C78852D582FD6162
local.properties will contain all the properties which is needed for data hub configuration.
#Below sample of My Sql DB Setup config replace with used DB config
#dataSource.className=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
dataSource.driverClass=com.mysql.jdbc.Driver
dataSource.jdbcUrl=jdbc:mysql://localhost/javaoops?useConfigs=maxPerformance
dataSource.username=root
dataSource.password=root
#media storage
mediaSource.className=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
mediaSource.driverClass=com.mysql.jdbc.Driver
mediaSource.jdbcUrl=jdbc:mysql://localhost/javaoops?useConfigs=maxPerformance
mediaSource.username=root
mediaSource.password=root
#Export url, username and password.
datahub.extension.exportURL=http://localhost:9001/datahubadapter
datahub.extension.username=admin
datahub.extension.password=nimda
#Target system url, username and password.
targetsystem.hybriscore.url=http://localhost:9001/datahubadapter
targetsystem.hybriscore.username=admin
targetsystem.hybriscore.password=nimda
# Encryption
datahub.encryption.key.path=encryption-key.txt
# enable/disable secured attribute value masking
datahub.secure.data.masking.mode=true
# set the masking value
datahub.secure.data.masking.value=*******
kernel.autoInitMode=create-drop
#kernel.autoInitMode=update
#====
sapcoreconfiguration.pool=SAPCONFIGURATION_POOL
sapcoreconfiguration.autocompose.pools=GLOBAL,SAPCONFIGURATION_POOL
sapcoreconfiguration.autopublish.targetsystemsbypools=GLOBAL.HybrisCore,SAPCUSTOMER_INBOUND_POOL.HybrisCore
datahub.publication.saveImpex=true
datahub.server.url=http://localhost:8080/datahub-webapp/v1
#datahub.core.export.service.clientid=eic
#datahub.core.export.service.clientsecret=secret
Now copy all jars from <HYBRIS_HOME>\Hybris\hybris\bin\ext-integration\datahub\dependencies and paste in this folder
Now copy all jars from <HYBRIS_HOME>\hybris\bin\ext-integration\datahub\extensions\sap and paste in erp folder.
Database connector jar will be resided here. Download the mysql-connector-java-XXX-bin.jar file and copy to the others
Login to MYSQL Database and create a Schema "javaoops"
Go to <TOMCAT_HOME>/conf/
create folder Catalina/localhost.
create xml file datahub-webapp.xml .
<Context antiJARLocking="true" docBase="<Your_PATH>/hybris/bin/ext-integration/datahub/web-app/datahub-webapp-6.3.0.7-RC1.war" reloadable="true">
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath=
"<Your_PATH>/datahub/config;
<Your_PATH>/datahub/crm/*.jar;
<Your_PATH>/datahub/erp/*.jar;
<Your_PATH>/datahub/dependencies/*.jar;
<Your_PATH>/datahub/others/*.jar"/>
</Context>
Go to the following path for disable Spring secure
<!-- Spring Security -->
<!--
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
Now validate datahub is up or not
DataHub Integration is successful completed