How to show Optional Actions whilst "performing" an assignment/task

When transitioning to modern Pega applications with Constellation, we often face a paradigm shift in how the UI is rendered. A very common challenge developers encounter is controlling the visibility of local actions: How do we show a local action only when a user is actively working on an assignment (Perform mode), and hide it when they are simply viewing the case (Review mode)?

But before you go down a rabbit hole of custom conditions, consider this: Pega’s Center-out™ architecture provides an elegant, out-of-the-box way to handle this context automatically.

Let’s explore why the old methods fail and discover the best approaches to deliver the right actions at the right time.


:warning: The Traditional Trap (Why UI-Kit when rules fail)

In Traditional UI, we relied heavily on Harnesses (Perform vs. Review) to dictate what a user could see. Constellation fundamentally changes this architecture. It doesn’t rely on these static harnesses.

If you attempt to configure a Case-wide local action and restrict it using pzHasLock or pxIsNotInternalAssignment, you will likely experience inconsistent behavior. Why? Because in Constellation, executing a case-wide action triggers a refresh of the action menu context. The UI often rebuilds the menu as if the case is in “Review mode” even if the assignment is still technically open, causing your carefully placed actions to vanish unexpectedly.

unexpectedly.


:white_check_mark: The Solution: Assignment-Level Actions

The most effective, out-of-the-box solution requires zero custom code or complex When rules. It simply requires aligning your design with Constellation’s native behavior.

If an action is only relevant when a user is actively working on a specific step, do not configure it as a Case-wide or Stage-wide optional action.

Configuration

Instead of setting the action globally, configure the Local Action directly on the Assignment shape within your Flow or Case Life Cycle in App Studio/Dev Studio.

  1. Select the process with the step/assignment where your action needs to be added
  2. Click Open process
  3. Double click to open assignment (or right-click and select view properties)
  4. Scroll down to “local actions”, expand the section
  5. Add your action to this list

The Result

The beauty of this out-of-the-box feature is that it works seamlessly. Pega Constellation natively understands the context of the assignment.

The local action will automatically populate in the “Actions” menu only when that specific assignment is actively opened by the assignee (Perform mode). The moment the case is viewed in a read-only state or by a different user without the assignment (Review mode), the platform hides the action for you. No custom visibility rules required!

You can even use promoted actions to show this as a button. However, given priority is given to case wide actions, you’d need to remove the others to ensure this is promoted just for your assignment.

User Experience considerations

Personally, I am not a fan of this UX, appearing/disappearing buttons could lead to some confusion. I would always attempt to drill down into why there is a need to dynamically show this action and see if there are better ways to achieve this.

Enjoyed this article?

See suggested articles from our Constellation 101 series and view all our Knowledge Shares from our User Experience Expert Circle.

2 Likes