How can be not found rule that located in @baseclass ?
There are several error messages like this:
(ternal.mgmt.StreamBuilderTools) ERROR sbld-sup.bpm.lanit sbld-research.bpm.lanit #UserName# - Could not find a rule when appending a stream com.pega.pegarules.pub.generator.RuleNotFoundException: Failed to find instance @baseclass.CoveredHeaderForReview of type Rule-Obj-HTML.
As I had read this means that rule was not found because the primary page was not found. (The attempt to generate stream rule was failed)
Can you please suggest any solutions or/and scenarios to reproduce problem?
I find this confusing also: but I think to my understanding the message is actually saying something like:
"I looked for the Rule Called <XYZ> and I couldn't find it anywhere : I even checked all the way back to root (@baseclass)"
In anycase: I am able to demonstrate the error and how to avoid it below:
Here's an example on 719 which shows an Activity running a 'Show-Stream' method ; it will look for a HTML RULE and display it.
The HTML RULE and the Activity live in the same CLASS Structure which is "tmp-scratch-work' in this example:
The Stream Rule is just a 'hello world' file like this:
And the Activity is just a two-stepper:
Which defines a single Page (which again has the same class as both the Stream Rule and the Activity itself):
If I run this Activity - the Stream Rule is found and displayed correctly: and this pattern seems to work well regardless of PRPC version.
If I now modify my Activity , so that it does not create the Page 'MyContextPage' (I'm still keeping the definition on 'Pages and Classes' and I'm still referencing it as a 'Step Page' on my Step) like this:
And (since I didn't remember to do a Page-Remove in my Activity [which is a bad habit !]), I must now remove it manually for this test to work:
And now I re-run the Activity - which no longer creates a Page : we get an error:
( The error tells me to consult with my system administrator ; but I've never met them - so I guess it must mean me..... )
I checked the PRPC logs and I can see the error as:
Caused by: com.pega.pegarules.pub.generator.RuleNotFoundException: Failed to find instance @baseclass.TestStream of type Rule-Obj-HTML.
Now: one other test on 719: I can remove the step completely - and everything starts working again:
But I have vague memory that different versions of PRPC are subtley different here.
That is: I believe I remember seeing different behaviours with regard to :
1. An Empty Step Page.
2. Pages Defined on 'Step Page', but not explicitly created.
3. Pages Not Defined, but still referenced on the Step Page.
So : wherever possible - I tend to stick to the explicit pattern above: that is defining, creating and referencing exactly the page : I have found that doing this - means the Activity works in the same way the same across all versions of PRPC that I have tried....