implement personalization using contexthub in AEM

Statement :
  • How to Implement content personalization using ContextHub in AEM
  • Content personalization using Based on the profile information.
Solution :
Follow the below steps.

Step 1 : Create audiences.







Step 1.1 : Assign Segment to Audiences for Boy and Girl as per below screenshots




Step 2 : Create a Brand for audineces



Step 3: Create Activity






Step 4: Click on Next to map Experience to Sampleactivity as shown in below screenshots -->click on + add experience to add the audiences created in earlier steps and map







Step 5: Enable target component for image


  • Switch edit mode to Target mode -->click on start target --> and select the authored image component to enable the target as shown in screenshot 
  • Click on Start Targeting, Highlight image component while selecting the default target option and enable target-->click on target icon as shown below.



  • Now again select the same image component but  select the target as Male Option and author different image as show in below 
  • Now again select the same image component but  select the target as Female Option and author different image as show in below 
  • Click on Next





  • Click on Save


  • Switch to preview mode and switch  profile to male/Female based on the profile selection you can see different images are shown. refer below screenshots.




  • That's All!.


How to perform Datastore Consistency Check in AEM

Statement- 

  • How to find datastore consistency 
  • How to fix data store inconsistencies.


Solution :


How to find datastore consistency:




  • Observe the log files as below in the RUN log console, it shows consistency check is done and Zero error found.

How to fix data store inconsistencies.
  • Assume if there were any repository inconsistency as per the above run, select only Fix inconsistency options else choose the all options to find inconsistencies and fix the same.
      • Traversal check
      • Fix inconsistencies
      • Log each node
      • Data store consistency check




  • That's It!.


Transient workflow is not working - workflow instance is not getting initiated in AEM 6.3

Statement - Asset update workflow was converted to Transient workflow but transient workflow was not working.

Solution  :

clear the stale workflows, please follow below steps:
  1. Go to system console (http://localhost:4502/system/console)
  1. Stop the following bundles
  • Adobe Granite Replication (com.day.cq.cq-replication)
  • Apache Sling Event Support (org.apache.sling.event)
  1. Open crx/de
  2. Go to /etc/workflow/instances, clear everything under this folder. Yon can also move /etc/workflow/instances under /tmp and then create a new /etc/workflow/instances folder with the exact same properties of the original /etc/workflow/instances
  1. Go to /var/eventing/jobs and delete all the content under it.
  1. Go to /var/replication/data and Delete all the content under it.
  1. Start the bundles stopped in step 2.
  1. Now try running transient workflow.
That's It!