Define Java API Package
After defining the Java API Class worksheet, we use the same example Get Customer to define the Java API Package. Each AlchemyJ workbook can only support one ##JavaApiPackage worksheet.
- Go to “##JavaApiPackage”, key in the values as shown below for the Basic Settings. These settings define the package name as alchemydemo.customer and the generated jar file would be called CustomerService.jar.
Property | Value |
---|---|
Package name | alchemydemo.customer |
Jar name | CustomerService |
- Next, we will need to define the Class included in this package in the Classes section which is the one we have set up earlier.
Class Definition Sheets |
---|
##JavaApiClass |
All the configurations for this function have been completed.
Since the function needs to access the DB, please ensure the Data Source has been configured correctly. Now, all formulas and settings have been defined. We will preview the API in AlchemyJ Studio. Go to the AlchemyJ toolbar, click Run Function Point and select Get Customer to test the Get Customer function point in AlchemyJ Studio.
- The result can be found in B4:F4. The model works as expected.