A Plug-In Script's API

Like program-based plug-ins, plug-in scripts:

  • Run on the application server
  • Have their API (input / output interface) defined by the plug-in spot (i.e., plug-in scripts don't get to declare their own API)
  • Can only be invoked by the "plug-in spot driver"

For plug-ins configured to use a script engine version, the best way to understand the script's API is to use the View Script Schema hyperlink to view its parameters data area schema.

The Plug-In Data Area

Notice the two groups: soft and hard. If you are familiar with plug-in spots, you'll recognize these as the classic soft and hard parameters:

  • The soft parameters are the values of the parameters defined on the algorithm. Notice they are not named - if you want to reference them in your plug-in script, you must do it by position.
  • The hard parameters are controlled by the plug-in spot (i.e., the algorithm entity). Notice that this plug-in spot has a single input parameter called " businessObject/id". Also notice the use= attribute - this shows that this parameter is input-only (i.e., you can't change it in the plug-in script).
Note: XPath. You can click on an element name to see the XPath used to reference the element in your script.

Plug-ins configured to use the Groovy engine version do not use an XML interface for the API and instead are processed in the same way as Java algorithms. The framework supplies a dynamically generated superclass that implements the plug-in spot for Groovy objects. Use the View Script Superclass hyperlink to view this superclass and the methods to set and get the hard parameters.

Note: For plug-in scripts using the Groovy engine version, soft parameters do not appear in the plug-in spot API as defined by the superclass. Plug-ins using only Groovy code define their soft parameters using annotations, in a similar way to Java algorithms, and fetch those values using methods defined in the algorithm code.