cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pradnya
Level 3

resolve String in Custom Bean's Install method

Hi,

I have created a custom bean for a custom product action. It has got one property called "fileName".

In ISMP GUI this property is set to a file name say XYZ.txt which is present at D:\tempDir\UserA\XYZ.txt

I have created a PATH variable "EXTFILES" which points to "D:\tempDir\UserA\".

So now in ISMP GUI ,property "fileName" contains value $A(EXTFILES)\XYZ.txt

In custom bean's install() method I tried to resolve the string as follows

String abc = resolveString(fileName);

This should give me the resolved path "D:\tempDir\UserA\XYZ.txt"
but what I get is value "$A(EXTFILES)\XYZ.txt" as it is.

While the same resolveString method works properly in "build()" mehtod of custom bean.

Do I need to add anything (resource / service) etc inside install() method.

Please let me know if anybody has got the answer for this ASAP


Thanks in advance
Pradnya
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

Path variables ($A expressions) are the one string resolver that aren't resolved at run time, only at build time (since there's no reason a source directory would be available on an end-user system). Can you add a related bean property that uses a $D or other resolver to represent a directory on the target system?
0 Kudos
pradnya
Level 3

Thanks Robert,

u are right. Path vars can't be resolved at run time.
So I defined the variable using "Property Manager" and used $V() resolver.
and it worked.


Pradnya
0 Kudos