Question

4
Replies
2331
Views
Harindra Morya (moryh)
PEGA
Senior Software Engineer
Pegasystems Inc.
IN
moryh Member since 2017 7 posts
PEGA
Posted: March 30, 2019
Last activity: April 3, 2019
Posted: 30 Mar 2019 8:17 EDT
Last activity: 3 Apr 2019 1:18 EDT
Closed

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:



<pega:withPage name="Register">
  <pega:include name="Registration" type="Rule-HTML-Section" >
  </pega:include>
</pega:withPage>


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.


When i check the documentation of include tag,



<pega:include name=".GameResults" type="Rule-HTML-Section" >
	
</pega:include>


In documentation section name is starting with dot. So i tried with below code:

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:

<pega:withPage name="Register">
  <pega:include name="Registration" type="Rule-HTML-Section" >
  </pega:include>
</pega:withPage>

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.

When i check the documentation of include tag,

<pega:include name=".GameResults" type="Rule-HTML-Section" >
	
</pega:include>

In documentation section name is starting with dot. So i tried with below code:

<pega:withPage name="Register">
  <pega:include name=".Registration" type="Rule-HTML-Section" >
  </pega:include>
</pega:withPage>

But this is not getting saved and throwing error :

Unable to locate a rule with the given keys {pxObjClass=Rule-HTML-Section, pyClassName=O5OOVU-SIRA-Work-Registration, pyStreamName=.Registration}

Basically it is looking for section name ".Registration" instead of "Registration".

please help me in knowing why above code is working weirdly and let me know how to include section of different class in HTML rule.

Thanks in advance.

Low-Code App Development User Experience
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.