cancel
Showing results for 
Search instead for 
Did you mean: 

E-Sourcing : How to access Interface methodes?

former_member208675
Active Contributor
0 Kudos

Hi,

I am trying to make script to write retrived contents of My Master Agrement Page to Exel file.

I able to access classes and objects but not able to access interfaces.

Please post your views.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There are Java API's available to retrieve all the fields from a master agreement which in turn can be used to create an excel file as per you requirement.

Regarding your question on interfaces i am not very sure about what you are asking.

Every interface as an underlying implementation, which can be used in a script. Details about acessing the methods within an interface can be found in the javadocs.

If you are stuck with anything in particular, do post it here.

Regards,

Immanuel

former_member208675
Active Contributor
0 Kudos

Hi Immanuel,

I tried methods from u201CIntegration Bean APIu201D. But I didnu2019t get expected output.

I know how to access interface methods in Java but in E-Sourcing I stuck with accessing interface methods.

Could you please suggest me any Java APIs you mentioned.

Regards,

Vinay

Former Member
0 Kudos

Hi vinay,

I guess you are trying to retrieve Details from a contract(master agreement) and display it on the screen for test purposes.

I suggest you do this for testing the retrieval of data from a document.

Firstly create a toolbar script for that particular document. In your case set the class as master agreement while creating the toolbar script. You can Test all your data retrieval scripting within this script.

You can start with a very simple script that displays the name of the document on the screen.

/doc is of type ContractIBeanIfc, therefore all the methods within the interface ContractIBeanIfc can be accessed through this object./

//Retrieves the Document name

docName=doc.getDisplayName();//getDisplayName is a method within the interface ContractIBeanIfc

//Prints the document name on the screen.

throw doc.createApplicationException(null,docName);

Once you have navigated to the particular document, run this script from the toolbar.

Regarding your Question on Exception handling.

You can use try catch blocks to catch Exceptions and print Custom messages.

example

try{

//Block of code

}

catch(e)

{

throw doc.createApplicationException(null,"Some Exception Occurred :"+e.getMessage());

}

*FOr test purposes this method should be ok, but the best practice would be to store the Exception message as a localised resource and pass the resource ID as a parameter to the method createApplicationException().

Hope this helps.

Regards,

Immanuel

Answers (0)