Friday 24 June 2016

Resolved | FATAL : Multiple root installs found

While deploying Discover electronics application [CAS based] using deployment template.

You may encounter below error.

FATAL : Multiple root installs found. Only one installer config file may have the update attribute unspecified or set to false.

Solution : You should enter N for the Install base deployment question.

Install base deployment? [Y/N] : N

Tuesday 14 June 2016

Easily Test ATG REST API using HttpRequester

While implementing ATG REST WebServices, We need to test them. There are number of tools available to achieve this. Recently I have used HttpRequester, its a great tool.

Below are the key features of this tool.
  • Easy to install (Available as addon to firefox).
  • Simple User Interface.
  • Preserves the history of request So that user can review or re-execute the request.
Here I am going to explain login\logout using HttpRequester. Sometimes we need to test functionality for registered user, to validate login flows. Using below steps user can login into application and then perform activities finally logout from system

Step 1 : Obtain the session identifier.
Call /atg/rest/SessionConfirmationActor/getSessionConfirmationNumber actor chain. This will return the session identifier.
Session Confirmation Request


Session Confirmation Response

Step 2 : Pass this session identifier in further requests using _dynSessConf request parameter.

Login Request

Note : For logout call also you need to use the same identifier.


Logout Request

Below is the Request history window. Here double click on any request, pop up will appear to re-execute the request.
HttpRequester Request History Window

Friday 3 June 2016

Endeca | Expression Record Manipulator

In Endeca record manipulators are used to change the data associated with record during indexing. 
There are 3 types of manipulators available.

1. Perl Manipulators
2. Java Manipulators
3. Record (Expression) Manipulators

Here we will learn how to configure  Record (Expression) Manipulators.

Below are the steps to configure Record (Expression) Manipulators.

1. Open Endeca project in developer studio.
2. Right Click on pipeline editor select New then Record followed by Manipulator.



 3. In Pop up box enter record manipulator name and record source details.


4.  Double click on newly created manipulator. You will see the below expression editor window.



Now create the expressions as per requirement. Below is the example of expression to create new property based on the value of existing property.

Below algorithm used in this example expression.
if value of Dep_ID property is 123
    then create new property named Location with value Delhi
else if value of Dep_ID property is 456
    then create new property named Location with value Bangalore
else
    then create new property named Location with value Pune 

====================================================================
<EXPRESSION LABEL="" NAME="IF" TYPE="VOID" URL="">

  <EXPRESSION LABEL="" NAME="MATH" TYPE="INTEGER" URL="">
    <EXPRNODE NAME="TYPE" VALUE="STRING"/>
    <EXPRNODE NAME="OPERATOR" VALUE="EQUAL"/>
    <EXPRESSION LABEL="" NAME="IDENTITY" TYPE="PROPERTY" URL="">
      <EXPRNODE NAME="PROP_NAME" VALUE="Dep_ID"/>
    </EXPRESSION>
    <EXPRESSION LABEL="" NAME="CONST" TYPE="INTEGER" URL="">
      <EXPRNODE NAME="VALUE" VALUE="123"/>
    </EXPRESSION>
  </EXPRESSION>

  <EXPRESSION LABEL="" NAME="CREATE" TYPE="VOID" URL="">
    <EXPRNODE NAME="PROP_NAME" VALUE="Location"/>
    <EXPRESSION LABEL="" NAME="CONST" TYPE="STRING" URL="">
      <EXPRNODE NAME="VALUE" VALUE="Delhi"/>
    </EXPRESSION>
  </EXPRESSION>

  <EXPRNODE NAME="ELSE_IF" VALUE=""/>

  <EXPRESSION LABEL="" NAME="MATH" TYPE="INTEGER" URL="">
    <EXPRNODE NAME="TYPE" VALUE="STRING"/>
    <EXPRNODE NAME="OPERATOR" VALUE="EQUAL"/>
    <EXPRESSION LABEL="" NAME="IDENTITY" TYPE="PROPERTY" URL="">
      <EXPRNODE NAME="PROP_NAME" VALUE="Dep_ID"/>
    </EXPRESSION>
    <EXPRESSION LABEL="" NAME="CONST" TYPE="INTEGER" URL="">
      <EXPRNODE NAME="VALUE" VALUE="456"/>
    </EXPRESSION>
  </EXPRESSION>

  <EXPRESSION LABEL="" NAME="CREATE" TYPE="VOID" URL="">
    <EXPRNODE NAME="PROP_NAME" VALUE="Location"/>
    <EXPRESSION LABEL="" NAME="CONST" TYPE="STRING" URL="">
      <EXPRNODE NAME="VALUE" VALUE="Bangalore"/>
    </EXPRESSION>
  </EXPRESSION>

  <EXPRNODE NAME="ELSE" VALUE=""/>

  <EXPRESSION LABEL="" NAME="CREATE" TYPE="VOID" URL="">
    <EXPRNODE NAME="PROP_NAME" VALUE="Location"/>
    <EXPRESSION LABEL="" NAME="CONST" TYPE="STRING" URL="">
      <EXPRNODE NAME="VALUE" VALUE="Pune"/>
    </EXPRESSION>
  </EXPRESSION>

</EXPRESSION>

=====================================================================

5. Edit other pipeline component to use this manipulator as record source.


6. Save the Endeca project and run the baseline. Below is the example data indexed using configuration.