Plugging in Algorithms

Algorithms provide a powerful and flexible way of extending applications that use the Oracle Utilities Software Development Kit.

Algorithm spots in the application identify different areas that can be extended or customized by implementers. Each algorithm spot defines a set of inputs (typically via set- methods) and output (typically by get- methods).

During implementation, implementers can either re-use existing algorithm types or create new plug-in algorithm. To add a new plug-in algorithm, an implementer will follow these steps:

  • Identify the plug-in spot.
  • Create an algorithm component.
  • Specify appropriate annotations for algorithm component.
  • Code the desired logic into the invoke() method.
  • Code methods to implement the algorithm spot interface.
  • Create a JUnit test.
  • Generate artifacts.
  • Run JUnit tests.
  • Deploy to runtime.
  • Create a java class to perform a special plug-in action. This typically would be a modified version of an existing plug-in class. Refer to the algorithm spot definition for the various parameters that are available. In writing it, look out for possible soft parameters that will add flexibility to the plug-in.
  • Add an Algorithm Type to correspond to the new plug-in behavior. This includes naming the java class that was created in the previous step. In addition, the soft parameters that are expected by the algorithm are also defined here.
  • Create Algorithm specifying the specific algorithm parameter values where applicable. If the algorithm type is flexible enough, it may end up being reused in multiple algorithms, each having a different set of soft parameter values.
  • Add the algorithm to the appropriate control table's algorithms. With this step, the plug-in is available to the application.
  • Test in runtime.