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

Java Method Invocation Data Collectors - invoke object or getter chain not working on parameter

Kenneth.Hines
Voyager

Hello,

 

I have this method.

 

function requestQuote(policyPeriod : PolicyPeriod, nextStep : String) {
requestQuote(policyPeriod, nextStep, ValidationLevel.TC_QUOTABLE, RatingStyle.TC_DEFAULT)
}

I am trying to call a method on the policyPeriod parameter for data and it is not working for me.

 

in code it would look like this -> policyPeriod.Submission.DisplayName which would return a string.

 

Submission looks like this. It is a method that returns an object.

public entity.Submission getSubmission() {
return ((com.guidewire.pc.domain.policy.period.PolicyPeriodPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pc.domain.policy.period.PolicyPeriodPublicMethods")).getSubmission();
}

 I have tried invoke object, use getter chain with getSubmission, getSubmission(), Submission, and Submission() combinations.  I get an out put similar to this.

[CANNOT EVALUATE: Could not find specified method = [Submission()], CANNOT EVALUATE: Could not find specified method = [Submission()]]

 

Here is my last attempt.  Any help would be appreciated.  Thanks....

KennethHines_0-1625146875723.png

 

11 REPLIES 11

Mario.Morelli
Architect

Hi Kenneth

 

What is the MIDC Setup like, What class and method are you using in the configuration? Can you share that?

 

The easiest way to test this, is to use the Live Preview functionality, enter the class and method name, then use the Live preview Second tab option called Method Invocations. 

 

With this you can check the actual data being populated live , and configure the collection as it needs to be.

 

Can you validate that you can see the data you are trying to extract using live preview?



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A

Thanks Mario.  Here is the MIDC.  The first data to collect policyPeriod which is the parameter.toString() is returning something back.  I will try the Live Preview tomorrow to see if that helps.  Thanks.

 

KennethHines_1-1625536381854.png

 

 

Hello Mario,

 

I did Live Preview on Transaction Discovery (see below).  I can see the method in the class, but do see no Live preview Second tab option called Method Invocations to see what is in the parameter.  Should I be doing Live Preview somewhere else?

 

 

KennethHines_0-1625598939798.png

 

Hi Kenneth

My apologies.you should not use the default live preview option.

Navigate to the Transaction Detection rules. Click the + sign, like you are going to add a new rule. However you will not save the rule. It's only to find the data you are after.

Choose the POJO option, specify the method and class you had and click on live preview on the required node.

Once it starts you need to click on the second tab on the right and choose from the drop down - method invocations.

This should return live traffic on the class/method being triggered. Normally gives uou 1-2 invocations.

You can then view the data for it, to see if you can find the value you are looking for

Let me know if you get stuck.

Ciao


Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A

Thanks Mario,

 

I am still not seeing a second tab with Method Invocations in this screen either.

 

KennethHines_0-1625600335196.png

 

Hello Mario.  I spoke to soon.  I found it and will let you know if it helps.  Thanks....

Hi Kenneth.

Click on the second tab, it's called tools.

This will give you a drop down, to either search for classes/methods. Or another option called method invocations.

Choose method invocations, wait a couple seconds. You will see live invocations of that class/method and the actual data within.

Check if you can see/find the value you are after


Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A

Thanks Mario, 

 

I found it.  I am not sure why the first parameter show up as Param 1, but the PolicyPeriod is the first parameter in the method and the one I am trying to access.  It appears the issue is that the parameter is not the actual object, but a delegate.  With what you are seeing below, is there anyway to get to the properties/methods of PolicyPeriod?  Thanks again for your help.

 

KennethHines_0-1625606539809.png

KennethHines_1-1625606586925.png

 

Hi Kenneth

Most definitely, just need to understand how the code works and how AppD represents it. Looks like one class calling another class.

Switch the drop down back to class method where you can search for classes, then search for either entity.PolicyPeriod or PolicyPeriod. I believe you should find what you require here.

Check which methods this class has available. And do live previews on this class and method.

From your initial post you can look at entity.Submission class as well, which methods it has available.

I hope I am making sense:)


Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A
On-Demand Webinar
Discover new Splunk integrations and AI innovations for Cisco AppDynamics.


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here