How to control visibility of case wide flow actions based on harness type? (cosmos 24.2.2)

Hello,

I’m working on a cosmos 24.2.2 app and I’m trying to hide a specific case wide local action based on whether the user is in the perform harness. I’m having some trouble finding an appropriate condition, as the standard when rules I’m familiar with are not working as expected. The actions menu does not seem to be able to distinguish between which harness type I have the work object open in.

I have tried the following when conditions:

  • !pyWorkActionsIsPerform
  • !pzIsPerform
  • pzIsReview
  • !pzIsPerformState
  • !pyIsHarnessTypePerform

If I use these to make a certain section read only then they work as expected, but they do not work when applied to the case wide local action. A colleague was able to use !pyWorkActionsIsPerform to hide a case wide local action, but their app is on 24.1.3. Perhaps there’s been some sort of architecture change between the versions?

Does anyone have any guidance on how I can go about accomplishing this without using any of the conditions I’ve tried above? Thanks for your time.

This looks like a 24.2.2 Theme Cosmos platform issue, not a bad When rule. In Theme Cosmos, case actions run through different Ajax containers, and case-wide actions can open differently when the case is opened in review mode, perform mode, or preview mode, so harness-based checks on the Actions menu are not reliable in that setup. Pega also fixed local action visibility-condition handling in 24.2.3, including a case where the visibility condition on a case-wide action was being evaluated incorrectly. The clear solution is to upgrade to 24.2.3 or later, then keep the Show When on the case-wide action with your perform check such as !pyWorkActionsIsPerform. On 24.2.2, trying more harness-type When rules is unlikely to give you a consistent result.