Difference between Page Definition Approaches

Hi All,

What is the difference between defining a page (i.e. pyWorkPage) in “Pages and Classes” section using these two approaches?

TIA

@MaleeshaW $ANY implies the class can be dynamic as and when in runtime you pic, but even if u don’t explicitly say that it will behave in that way only, as a best practice don’t use hardcoded pyworkpages in application as pyworkpage context can change with different parent or child classes and activity or dt reuse can be hinder or context issues may arise.

added one such example attachment where pega uses $class is when they use pxresults page list property we then explicitly define them in pages and classes to override that.

Hope this helps in better understanding.

@Soham_Chanda1107 Thanks for the clarification.

Instead of hardcoding pyWorkPage, can this approach be used to define any other step page using either $ANY or $CLASS?

For example,

@MaleeshaW no make parameterized page (param type = page) instead and pass pyworkpage on that, you dont need to have page type property as well , less code and play only with params.

@MaleeshaW

It’s not a good practice to define $ANY in the recent versions of Pega. Also, it’s not a good practice to define pyWorkPage in Pages and Classes because it impacts extendability for future applications.

  • You cannot use the keywords $ANY or $CLASS in the Class column.
  • Do not use the keywords $ANY, $CLASS, or $None in the Class column; these keywords are deprecated.

Please find the below link for more details

Pegasystems Documentation?