I’m trying to override one of the OOTB components to extend it’s functionality.
After the component was created in the Override folder we started to modify (extend) its functionality by adding a custom property and attempting to use it in the field configuration (a custom description) but when we publish the component to the server we don’t see the new property anywhere on AppStudio.
Is it better to create a custom component altogether instead? The idea is that all Radiobutton components would have an extra description per item which we’re trying to figure out how to pass it from a data page but at the moment even adding one simple property does not seem to be reflected when creating and rendering an OOTB Radio button
When you want to extend the functionality of an OOTB component, it is generally better to create a custom component based on the OOTB component.
This way, you can add your custom properties and functionality without affecting the original component. To make your custom property visible in App Studio, you need to define the property in the component definition file (config.json) of your custom component. Make sure the property is defined correctly in the ‘properties’ array, and the component definition is updated accordingly.
Once you have done this, publish your custom component, and you should see the new property in App Studio when using your custom component.
This answer came from a Pega gen-AI assistant using the below references. As a Support Center moderator, I reviewed the answer and references for accuracy:
The added property is not visible in App Studio. I have tried logging out and in, and cleaning the cache, as well as triggering the Pega-Constellation update bij re-saving the ConstellationSvcURL DSS.
@MarijeSchillern I understand it is generally better to create a custom component. But can you please provide a solution for the extended properties not working as sometimes overriding a default component is the preferred solution.
@MarijeSchillern Hi, sorry for the delay. I had a session with some Pega engineers about related issues and we had a look at this as well. It seems that the publishing of the component fails, that is why we don’t see the added properties.
It has something to do with our (on premise) Pega installation as it works fine on other (als on premise) installations.
The Pega logs do not show anything, nor does the React SDK logging when publishing. If someone has any suggestion on where to look, you’re welcome. In the meantime I’ll try to find the problem by debugging the Pega REST interface used for component publishing. (Note that custom components publish just fine…)
Follow Up
The error we are getting originates in activity pxChooseBestRuleSetInner (Pega-RulesEngine:08-01-01). The java function called results in the following error message: No valid rulesets in application preferences.
This activity should set the ruleSet and version params. I can’t see why it runs into this, but when I manually override this activity and set the params manually, the deployment of the Override Component is successful.