Wednesday, 13 June 2018

Configuring GroupingApplicationRoutingStrategy

The GroupingApplicationRoutingStrategy allows more flexible groupings of sites than
SiteApplicationRoutingStrategy does. For example, with GroupingApplicationRoutingStrategy,
you can have three sites handled by one EAC application and two other sites handled by a second EAC application. If a site has multiple languages, all records for the site are directed to the site’s EAC application, regardless of the language.

Mapping of applications to sites is done through the applicationGroupingMap property of the
GroupingApplicationRoutingStrategy component. This property is a Map where each key is the name
of an EAC application and the corresponding value is a list of the site IDs of the sites to be routed to that
application. 

Naviate to /atg/endeca/ApplicationConfiguration

set 

applicationRoutingStrategy=\
  /atg/endeca/configuration/GroupingApplicationRoutingStrategy

 To ensure that separate records are created for each EAC application, you need to add
the MultipleSiteVariantProducer to the variantProducers property of each
EndecaIndexingOutputConfig component. For example:

variantProducers+=/atg/search/repository/MultipleSiteVariantProducer

 Also, mention the siteIDsToIndex property with all the sites required to index in output config. please consider this as an important step, if you are not doing this your indexing will always be a failure.

 Set the routingObjectAdapter property of the /atg/endeca/index/IndexingApplicationConfiguration component to specify the ContextRoutingObjectAdapter component to use:

routingObjectAdapter=\
 /atg/endeca/index/configuration/GroupingContextRoutingObjectAdapter

Set the routingObjectAdapter property of the /atg/endeca/assembler/AssemblerApplicationConfiguration component to specify the RequestRoutingObjectAdapter component to use:

routingObjectAdapter=\
 /atg/endeca/index/configuration/GroupingRequestRoutingObjectAdapter

eg: ApplicationConfiguration

workbenchHostName=localhost

# Our Workbench Port
workbenchPort=8006

applicationRoutingStrategy=\
  /atg/endeca/configuration/GroupingApplicationRoutingStrategy

defaultLanguageForApplications=

applicationKeyToMdexHostAndPort=\
ClothSiteAPP=localhost:15000,\
ApprealSiteApp=localhost:16000

keyToApplicationName^=/Constants.null

where ClothSiteAPP & ApprealSiteApp are EAC apps of the site. 


eg: GroupingApplicationRoutingStrategy

applicationGroupingMap=\
 ClothSiteAPP=ClothSite|shoeSiteCanada,\
 ApprealSiteApp=ApprealSite|clothesSiteUK|clothesSiteCanada

 It is necessary to mention two groups here otherwise you won't the response back from the assembler.

 For these group of sites, these apps will be used.

eg:IndexingApplicationConfiguration

CASHostName=localhost
CASPort=8500
EACHostName=localhost
EACPort=8888
routingObjectAdapter=\
  /atg/endeca/index/configuration/GroupingContextRoutingObjectAdapter
cxfLogLevelOverride^=/Constants.null


eg: AssemblerApplicationConfiguration

routingObjectAdapter=\
  /atg/endeca/assembler/configuration/GroupingRequestRoutingObjectAdapter

useFileStoreFactory=true


applicationKeyToStoreFactory=\
ClothSiteAPP=/atg/endeca/assembler/cartridge/manager/ClothSiteFileStoreFactory,\
ApprealSiteApp=/atg/endeca/assembler/cartridge/manager/ApprealSiteFileStoreFactory


Here you cannot use the default file store Factory, you have to use the filestore factory for separate instances.

Create a component 

eg :ClothSiteFileStoreFactory with the below data

$class=atg.endeca.assembler.content.ExtendedFileStoreFactory
configurationPath=\
C:\\Endeca\\Apps\\ClothSite
appName=ClothSiteApp

Last you mention about the 

eg:EndecaAdministrationService

/atg/endeca/assembler/admin/EndecaAdministrationService

$class=atg.endeca.assembler.MultiAppAdministrationService
storeFactory^=/Constants.NULL

Set this property to handle the multiple Applications.

Happy Learning !!!! 

No comments:
Write comments