Question
Turkiye Finans Kat?l?m Bankas?
TR
Last activity: 10 Mar 2017 9:31 EST
Can I pass class name to Activity as parameter ? . then I want to open the class that I was passed as parameter for using own property.
Can I pass class name to Activity as parameter ? . then I want to open the class that I was passed as parameter for using own property.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems
US
I'm not quite clear on this question. What does "for using own property" mean ? Do you really want to open the class record, or an instance of the class ? For instance, are you opening a work object ? Or some work data ?
But in general, yes, you can pass a class name in a parameter. For instance, if the parameter name is UseThisClass, then various method steps in your activity can refer to it with "param.UseThisClass". /Eric
Turkiye Finans Kat?l?m Bankas?
TR
Hi Eric.
I need to dynamically access a Property of a unknown (at design-time) class within an Activity ?
Pegasystems Inc.
GB
As far as I know there is not special type of parameter that allows you to pass a 'class' to an activity.
You could (of course) pass in a class name encoded as a 'String' Param.
Do you need to dynamically access a Property of a unknown (at design-time) class within an Activity ?
You *might* be able to do this (although I'm not sure why you would want to - and I have not tried this) by doing sometihng like the following:
1. Create a PAGE (in another Activity) of type of the Class you want to pass.
2. Pass this into your Activity as the 'primary page'.
3. Your 'context' in this second Activity will be of the right class that you want.
I believe the system may prevent you (at design time) from performing any Property-Set methods if it cannot de-reference a property name in the it's current (design-time) class though....
you *might be able to use a Java Step to get round this though - where you can dynamically look for a Property.
Turkiye Finans Kat?l?m Bankas?
TR
Thank you John.
My sample is like this.
I need a CustomerNo that comes from different class . Class name might be like this AA-BB.CustomerNo OR XXX-YYY-ZZZ.PersonId ....etc.
CustomerNo and PersonId are Property
at design time I want to read value from CustomerNo or PersonId ..etc.
Qbe Insurance
PH
You can pass the class as parameter.
I've done this in one of my activities. I declared a page to a certain class then just did a Page-Change-Class step before the Property-Set step. Just make sure that you can access the property from the original class of the page.
Turkiye Finans Kat?l?m Bankas?
TR
I am not sure access the property from original class.
My sample is like this.
I need a CustomerNo that comes from different class . Class name might be like this AA-BB.CustomerNo OR XXX-YYY-ZZZ.PersonId ....etc.
CustomerNo and PersonId are Property
at design time I want to read value from CustomerNo or PersonId ..etc.
Qbe Insurance
PH
Are you saying your classes are different even from an organization point of view? If so, then declare a page with a class that is common for both in the Class hierarchy. @baseclass or Work-Cover whichever is more appropriate.
Make sure CustomerNo and/or PersonId is accessible to your step page.
Turkiye Finans Kat?l?m Bankas?
TR
No my classes are not different from an organization name.
suppose that my organization name is TFKB.
at design time I need a access a property value that comes from like TFKB-XXX-YYY.customer or TFKB-AAA-BBB.Person OR TFKB-ABC-DEF.EmploeeNumber ....etc.
Qbe Insurance
PH
If so, then declare a page (Page1) with TKFB class. Make sure the properties you need are accessible to TKFB.
1. Page-Change-Class - use your class name parameter and Page1 as step page
2. Property-Set - use Page1 as step page
Blue Rose Technologies GmbH
DE
Can you please provide brief description on where these properties (that you would like to refer) reside during run time in Clipboard?
Please don't be confused with design time and run time context.