Skip to Content
author's profile photo Former Member
Former Member

Unsuccessful Catalog synchronization through impex file upload

We have created an impex file with code to execute cronjob to synchronize master content to stage and then stage to online, for different catalog versions. Synchronization works fine through HAC Import - >Import Content, but somehow, when we upload the same impex through HAC Import -> Import Script, successful message is displayed but catalogs don't get synchronized.

We are using Hybris version-5.3.0.0 Please suggest if anyone has a solution to this.

Impex code :

 #CronJob creation...........................................................
 
 INSERT_UPDATE CatalogVersionSyncJob;code[unique=true];$sourceVersion;$targetVersion;createNewItems;removeMissingItems;rootTypes(code);syncLanguages(isoCode);syncOrder
 ;se_bluecontent_master_sync_job_partial;$masterContentCatalog:Staged;$seBlueContentCatalog:Staged;true;false;$ROOTTYPES;"sv";0
 
 #Code to execute cronjob created above.......................................
 
 "#% private ModelService modelService = Registry.getApplicationContext().getBean(""modelService"", ModelService.class);"
 "#% private CommonItemModelDao commonItemModelDao = Registry.getApplicationContext().getBean(""commonItemModelDao"", CommonItemModelDao.class);"
 "#% private CronJobService cronJobService = Registry.getApplicationContext().getBean(""cronJobService"", CronJobService.class);"
 
 "#% long startTime = System.currentTimeMillis();"
 "#% CatalogVersionSyncJob catalogVersionSyncJob = modelService.getSource(commonItemModelDao.getSyncJobfromCode(""se_bluecontent_master_sync_job_partial""));"
 "#% CatalogVersionSyncCronJob catalogVersionSyncCronJob = (CatalogVersionSyncCronJob) catalogVersionSyncJob.newExecution();"
 "#% CatalogVersionSyncCronJobModel catalogVersionSyncCronJobModel =modelService.get(catalogVersionSyncCronJob);"
 "#% cronJobService.performCronJob((catalogVersionSyncCronJobModel) ,true);"
 "#% long endTime = System.currentTimeMillis();"
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 11, 2015 at 01:42 PM

    Make sure you've checked Enable Code Execution Checkbox. For scripting Groovy would be preferred over Beanshell to avoid such over heads. Any specific reason to use Beanshell?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.