Chapter 12
Use it in Pega
This is the payoff. The button is on the server. Now someone builds a screen, picks it from a list, types some text, and a real user presses it.
Pega 24 – 26
Words you will meet
- App Studio
- View
The idea
You built a part. They build the screen.
Here is the quiet superpower of everything you have done. The button's code is fixed, but its text, its message and whether it shows are settings, and you decided which settings exist back in config.json. A person who builds Pega screens, who may never write a line of code, can now place your button anywhere and configure it in a form.
Play
From published to working.
Six steps, in order. At step four you have to pick your component from the list, the way a designer would.
Step 1 of 6
It is on the server
After publishing, your component is a rule saved in a ruleset version. Anyone building screens in an application that includes that version can now use it.
Ruleset AcmeComponents · 01-01-01
Acme_UI_CelebrateButton
Field · Text · version 1.0.0
When it goes quiet
If it does not appear.
Three things, in order of how often they are the cause:
- Wrong ruleset version. You published to one the application does not include.
- Wrong kind. The type and subtype in
config.jsondecide where Pega offers a component. A Field is offered for fields, not for whole layouts. - Publishing did not finish. Check the last run for an error and see the troubleshooting chapter.
Afterwards
Changing it later.
Want a different default message? A designer changes a setting. Want a new setting, or different behaviour? You change the code and config.json, run the checks, raise the version number and publish again. Because a production version cannot be deleted, move forward with a new version rather than trying to take one back.
That is the whole loop. One more chapter on what to do when it goes wrong, and a one-page summary to keep.
Your turn
Questions and comments
Stuck on something, or have a thought? Write it here. To talk about one part, use the Comment button under that section's heading.