Question
Morgan Stanley
IN
Last activity: 3 Nov 2017 23:08 EDT
What is the difference between $ANY and $CLASS
pxResults has $CLASS in as page list property type.
In some of the rules i have also seen $ANY
Why and How do we use $CLASS and $ANY.
I have looked at several posts to understand the difference but did not get the real difference between them
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hi,
I will try to break it but to answer in simple way $ANY looks like the answer.
$CLASS need to have some reference when you are using it in property that is used inside activity
When you select a property mode of Page, Page List, or Page Group. You can use such properties in activities to create embedded pages on the clipboard.
So either Identify a class for the value of the page property,
or enter one of the keywords described here.
Preferable select a concrete class.
Now
Suppose When you later configure an activity that uses this property, the activity cannot specify a different class for this property.
Note: The concrete class for the embedded page cannot differ from the class recorded here.
Now You can also enter an abstract class or one of two keywords($ANY or $CLASS)
-
$CLASS: if you use this
Benefits:
For more flexibility in activities that use this property, enter an abstract class or the keyword $CLASS
Two Things can happen here
Hi,
I will try to break it but to answer in simple way $ANY looks like the answer.
$CLASS need to have some reference when you are using it in property that is used inside activity
When you select a property mode of Page, Page List, or Page Group. You can use such properties in activities to create embedded pages on the clipboard.
So either Identify a class for the value of the page property,
or enter one of the keywords described here.
Preferable select a concrete class.
Now
Suppose When you later configure an activity that uses this property, the activity cannot specify a different class for this property.
Note: The concrete class for the embedded page cannot differ from the class recorded here.
Now You can also enter an abstract class or one of two keywords($ANY or $CLASS)
-
$CLASS: if you use this
Benefits:
For more flexibility in activities that use this property, enter an abstract class or the keyword $CLASS
Two Things can happen here
-
If you enter an abstract class, the activity at runtime must specify a concrete class derived from that abstract class
-
If you enter
$CLASS
, the activity must specify a concrete class (but it can be any concrete class). For example, the Code-Pega-List.pxResults property uses$CLASS
.
-
$ANY: If you use this
Benefits:
Enter
$ANY
to make the class of the page (orPage Group
orPage List
) assignable at runtime
So in $CLASS if it is used inside activity you must specify concrete class but if you use $ANY you can assign the class at runtime.
So from my understanding you can use $ANY for runtime.
Correct me if you find something else.
Also In the earlier versions, application used to have several activities that use $ANY in its Pages & Classes tab.
If the class is not determined/finalised at the time of writing an activity, developers used it as an easy way out.
Also Pega restricts the use of $Any/$Class/$NONE. So I haven't tried it myself .
Thank You
Pegasystems Inc.
IN
Hi,
$ in Pega are used to represent keywords which have some predefined meaning/purpose.
e.x.
Hi,
$ in Pega are used to represent keywords which have some predefined meaning/purpose.
e.x.
Keyword $NONE can be used to create a classless page in Page-New method.
$ANY to make the class of the page assignable at runtime.
There are other keywords similar to this.
Point to be noted: Do not use the keywords $ANY, $CLASS, or $None in the Class column; these keywords are deprecated.
Morgan Stanley
IN
Thanks shekhar.
Either its $CLASS or $ANY the class is assigned at runtime. I'm really confused at understanding the difference.
Below is help from property rule form:
You can also enter an abstract class, or one of two keywords:
Thanks shekhar.
Either its $CLASS or $ANY the class is assigned at runtime. I'm really confused at understanding the difference.
Below is help from property rule form:
You can also enter an abstract class, or one of two keywords:
- For more flexibility in activities that use this property, enter an abstract class or the keyword
$CLASS
. If you enter an abstract class, the activity at runtime must specify a concrete class derived from that abstract class. If you enter$CLASS
, the activity must specify a concrete class (but it can be any concrete class). For example, the Code-Pega-List.pxResults property uses$CLASS
. - Enter
$ANY
to make the class of the page (orPage Group
orPage List
) assignable at runtime.
Can you point to any use case where we use $ANY instead of $CLASS?
Thanks
Avinash
Accepted Solution
Pegasystems Inc.
IN
Hi,
I will try to break it but to answer in simple way $ANY looks like the answer.
$CLASS need to have some reference when you are using it in property that is used inside activity
When you select a property mode of Page, Page List, or Page Group. You can use such properties in activities to create embedded pages on the clipboard.
So either Identify a class for the value of the page property,
or enter one of the keywords described here.
Preferable select a concrete class.
Now
Suppose When you later configure an activity that uses this property, the activity cannot specify a different class for this property.
Note: The concrete class for the embedded page cannot differ from the class recorded here.
Now You can also enter an abstract class or one of two keywords($ANY or $CLASS)
-
$CLASS: if you use this
Benefits:
For more flexibility in activities that use this property, enter an abstract class or the keyword $CLASS
Two Things can happen here
Hi,
I will try to break it but to answer in simple way $ANY looks like the answer.
$CLASS need to have some reference when you are using it in property that is used inside activity
When you select a property mode of Page, Page List, or Page Group. You can use such properties in activities to create embedded pages on the clipboard.
So either Identify a class for the value of the page property,
or enter one of the keywords described here.
Preferable select a concrete class.
Now
Suppose When you later configure an activity that uses this property, the activity cannot specify a different class for this property.
Note: The concrete class for the embedded page cannot differ from the class recorded here.
Now You can also enter an abstract class or one of two keywords($ANY or $CLASS)
-
$CLASS: if you use this
Benefits:
For more flexibility in activities that use this property, enter an abstract class or the keyword $CLASS
Two Things can happen here
-
If you enter an abstract class, the activity at runtime must specify a concrete class derived from that abstract class
-
If you enter
$CLASS
, the activity must specify a concrete class (but it can be any concrete class). For example, the Code-Pega-List.pxResults property uses$CLASS
.
-
$ANY: If you use this
Benefits:
Enter
$ANY
to make the class of the page (orPage Group
orPage List
) assignable at runtime
So in $CLASS if it is used inside activity you must specify concrete class but if you use $ANY you can assign the class at runtime.
So from my understanding you can use $ANY for runtime.
Correct me if you find something else.
Also In the earlier versions, application used to have several activities that use $ANY in its Pages & Classes tab.
If the class is not determined/finalised at the time of writing an activity, developers used it as an easy way out.
Also Pega restricts the use of $Any/$Class/$NONE. So I haven't tried it myself .
Thank You
-
Mounika Aki Abhishek Vaidya Kennet Osvaldo Segovia Lopez Kamesh Kuppaiah