Chapter 05

Wire it up

The tables describe the letter. One activity builds it, and one button runs that activity at the right moment.

Pega 24 – 26

Words you will meet

  • Activity
  • GenerateDocumentContent
  • Button

Phase 5 · Step 12

The activity.

  1. Dev Studio → Create → Process → Activity.
  2. Name it LoadDocumentContent and save it to your work class.
  3. Add a parameter: DocumentID (String, In).
  4. Add a single step, shown below.
LoadDocumentContent: the only step
Step 1: Call GenerateDocumentContent  In:   DocumentID  -> Param.DocumentID  Out:  Document    -> .LetterHTML

Phase 5 · Step 13

Trigger it from a button.

In Constellation, form field values are not in the clipboard until the user submits. An activity run in pre-processing will always find blank properties. The clean solution is a button.

  1. In your Constellation view, add a Button component.
  2. Label: Generate Document.
  3. Action: Run Activity.
  4. Activity: LoadDocumentContent.
  5. Parameter: DocumentID = DOC0003.

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.

A hands-on guide by Sanjeev Kujur. Independent, and not affiliated with or endorsed by Pegasystems.

Tested against Pega Infinity v26 / Constellation v26 · Updated 5 Nov 2026