Sunday, April 23, 2017

Usage of Requestor Types in Pega

In Pega PRPC, all are built as rules only. Even to display the login screen that sections , HTMLs and UI are built as rules. So how initially we will get access, when we were unauthenticated.

So for this reason, pega had built four different types of Requestor Types, through this it will give access for some basic rules authentication with.
App
Browser
Batch
Portal

about these types in help materials we can find more. Under Sysadmin category --> Requestor type is available.






For Each system name, one requestor type set. because each system can be authenticated 

or accessed differently, so for this reason.

Whenever we are creating a new System name, all these four types will create.
In Pega 7.2.2, Designer Studio --> System --> Settings-->System name.
















To execute which system name or to set the system name as below.
<env name="identification/systemName" value="prpcpe"/>


We can change by setting it in the dynamic data system settings.
Pega-Engine • prconfig/identification/systemName/default

Humans will connect PRPC pega through web browsers only, so browser requestor type we need to check.
In Browser requestor types, pega had created a access group for unauthenticated users.
so if we need to modify login screen or for authentication related any changes need to do, for example, for IAC Authentication or for SSO, or for LDAP to pick our custom authentication activity rules, Our application mentioned access group we need to add in this rule.










Note:
By default 2 0r 3 sets of these requestor type will be available. so dont change all, those which is your system name for that alone you have to change.Because most of the time while doing changes we might miss some changes to do and it will not allow to login. 
We need to be very careful while doing those changes, since to revert that changes without login it will be difficult. 

If we got some error like that then we need to change the system name in the prconfig file.so that other system requestor types will picked up, which is having default one.

We should try not to change "PRPC:Unauthenticated" access group. because this access group is the default one it will be added to all Requestor types.

Thursday, April 6, 2017

To Change Context name in PRPC in Tomcat

Sometimes we will be having many application  or environment URLs like Dev, SIT, UAT and Prod. With URL it will be difficult to find, so we can change the name of the context to identify it easily.

Or sometimes, in same tomcat, we might need to deploy two different Pega PRPC Apps, then we need to change the context of the application.

Say our URL is 
http://localhost:8089/prweb/PRServlet

Need to change this URL to:
http://localhost:8089/<<context name>>/<<App name>>
http://localhost:8089/Test/app


If we want to change context to different name like our application name, then below steps need to follow.

Step 1:
In tomcat folder, Tomcat/webapps we will deploy our "prweb.war" once we start our tomcat, "prweb" folder will get created. Stop the tomcat and then rename the folder to <<context name>>, "Test" as in this case. 

Step 2:
In new renamed, folder under WEB-INF folder, web.xml u can find it.
in this case Tomcat_home/webapps/Test/WEB-INF/web.xml

Step 3:
In web.xml, search with PRServlet name, find the exact match and replace that string with the <<App Name>>, in this case "app".

Before editing:
<servlet-mapping>
                <servlet-name>WebStandard</servlet-name>
                <url-pattern>/PRServlet</url-pattern>
         </servlet-mapping>
<servlet-mapping>
<servlet-name>WebStandard</servlet-name>
<url-pattern>/PRServlet/*</url-pattern>
</servlet-mapping> 

After editing:
<servlet-mapping>
<servlet-name>WebStandard</servlet-name>
<url-pattern>/app</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>WebStandard</servlet-name>
<url-pattern>/app/*</url-pattern>
</servlet-mapping>

Step 4:
Start the Tomcat Again and try with the new URL.