Skip to main content
Windward

Running the Java Custom Callbacks Example

engine-wiki-logo.pngOverview

These files can be used to create a WindwardCustomCallbacks.jar file containing your own custom callbacks, to be used with the Windward Java engine, Version 13 or newer.

The CustomFunctionExample.ipr is a project file for IntelliJ, a Java IDE.

Important notes

  1. Compile using Java version 1.7 or earlier.
  2. Do not change the version of the JAR created using this code.
  3. To use, replace the assembly of the same (WindwardCustomFunctions.jar) name where you installed the Java engine.
  4. This provides you a means to limit access to the datasource. However, like any security measure, it has weaknesses and we strongly recommend you use the tightest possible limitation in the access allowed in the datasource via the credentials used in addition to this functionality.

Requirements

Instructions

Creating Custom Functions

  1. Open Catapult. (Found under Start -> All Programs -> Windward Studios -> Windward Reports Java Engine -> Java Engine Help Launcher)
  2. In Catapult, click the Java button.
    Java Catapult Main Menu.PNG
  3. Under Java Demos, click the Specialized button.

        Java Catapult Specialized.PNG

  1. Use the scroll bar to scroll to the right and click the Custom Callbacks button.

        Java Catapult Custom Callbacks.PNG

In the file WindwardCustomCallbacks.java, you can replace the code called in the Callbacks listed. Currently the only callback used is “ApproveSelect” which is called whenever the engine makes a call to your datasource. You can approve a select by just returning the select passed in, modify the select and return it or deny it by throwing a datasourceexception.

  1. Click Build, Rebuild Project.

Installing WindwardCustomCallbacks.jar for use with the Java Engine

  1. In Catapult click click the Custom Callbacks button to open the WindwardCallbacks folder.  By default, this is located in C:\Users\<username>\Documents\Windward Java Engine Samples\Java\Specialized\
  2. Navigate to out, artifacts, WindwardCallBacks.
    Java custom callbacks source folder.PNG
  3. Copy the file WindwardCustomCallbacks.jar
  4. Navigate to the install directory of the Java Engine
  5. Open the jars folder
  6. Delete the current WindwardCustomFunctions.jar file
  7. Paste your new file in its place