Posted: 30 Mar 2019 8:17 EDT Last activity: 3 Apr 2019 1:18 EDT
Including Section of Different class into HTML Rule
I am using pega 8.1 version.I have created a section named "Registration" in class "O5OOVU-SIRA-Work-Registration" and ruleset "Unauthenticated:01-01-01". I want to add this section in HTML rule named "Web-Login" in class "@baseclass" and ruleset "Unauthenticated:01-01-01".
In Web-Login, i have mentioned Register page with class "O5OOVU-SIRA-Work-Registration" in pages and classes tab. And i am using below line of code to include section in HTML rule:
But when i am executing this rule than this section is not getting displayed. And on checking logs i saw the error : com.pega.pegarules.pub.generator.RuleNotFoundException: Failed to find instance @baseclass.Registration of type Rule-HTML-Section.
So here pega is not taking the context of Register page even after specifying the <pega:withPage> tag.
Have you tried doing a Save-As of the Web-Login OOTB HTML rule in your class (O5OOVU-SIRA-Work-Registration) and then trying to add the section? Since Web-Login is an Available rule you could give this a try and then add your section.
I am working on Registration functionality and this will be available on login screen of pega. So till the time operator is not logged in, he will have role "PegaRULES:Guest". And this access role will not provide access to class "O5OOVU-SIRA-Work-Registration". This role only have access to some limited functionality. So even if i saved Web-Login in my class than also it will not work.
You can create the new operator record by running the AddNewOperator OOTB activity.
You can use the SnapStart URL ("/prweb/PRServlet/?UserIdentifier=<username>&Password=<Base64encodedPassword>&pyActivity=pyMobileSnapStart&Action=runActivity&pzActivity=Data-Admin-Operator-ID.AddNewOperator") in the Web-login HTML rule onclick of signup button by passing the userid and password in the URL.
The activity AddNewOperator then uses HTML stream to display the New Operator form, which in turn submits to another activity to validate and create the operator instance.
Using SnapStart URL, i am able to create operator record. But my requirement include multiple custom fields like postal address, attachments of id proof. So i need to modify the HTML stream rule which is getting called from AddNewOperator activity.
There is one issue with snapStart URL that , After clicking on snapStart URL, if user click back button of browser then he will logged into pega with the credentials used in snapStart URL(?UserIdentifier=<username>&Password=<Base64encodedPassword>). So i need to disable the back button of browser.