Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Pega include directive is not working in HTML rule

SA-22603

Summary



Pega include directive is not working in HTML rule. It is looking for the stream rule in the @baseclass.

Error Messages



Could not find a rule when appending a stream com.pega.pegarules.pub.generator.RuleNotFoundException: Failed to find instance @baseclass.YYYY of type Rule-HTML-Section.


Steps to Reproduce



1. Create a HTML rule 'XXXX', which uses the pega include directive to include the 'YYYY' in the work class.
2. Create an activity and call Show-HTML to show the 'XXXX'.
3. Run the activity.

Root Cause



This is working as per design. The activity call with Show-HTML with include directive, will work for the stream rules in @baseclass only.

Resolution



Perform the following local-change:

1. Instead of the include directive, modify the html to include the below script:
<% 
StringMap keys = new HashStringMap(); 
keys.putString("pxObjClass", "Rule-HTML-Section"); 
keys.putString("pyStreamName", "SectionName"); 
keys.putString("pyClassName", "ClassName"); 


String stream = tools.getStream(keys, null); 
// Append the stream to 
out.println(stream); 

%> 

 
2. Create an Activity and call the Show-HTML, to call the above HTML rule, using the step page of the work class.

Published May 4, 2016 - Updated October 8, 2020

Was this useful?

50% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us