Question

How can I use "tools" in Function rule

Hi,

I simply want to reference to Data Page within Function rule. In my understanding, in Edit Validate I used to use tools.findPage as below and it worked.

String WorkGroup = ((tools.findPage("D_AppExtend").getProperty("ClassName")).getStringValue());

However when I try the same in Function rule, I can't save - system is complaining "tools cannot be resolved". How can I use tools in Function rule? Do I need to do some declaration at the beginning of the steps?

Thanks,

Correct Answer
November 18, 2018 - 9:41pm

You could try the following to get the tools initialized properly inside a rule utility function:

PublicAPI tools = ThreadContainer.get().getPublicAPI();

Hope this helps!

Comments

Keep up to date on this post and subscribe to comments

Pega
November 18, 2018 - 9:41pm

You could try the following to get the tools initialized properly inside a rule utility function:

PublicAPI tools = ThreadContainer.get().getPublicAPI();

Hope this helps!

November 18, 2018 - 9:47pm
Response to Chithra

Thanks it worked!