Table of Contents

Search

  1. Preface
  2. Part 1: Using Process Developer
  3. Part 2: Creating and Modifying Processes
  4. Part 3: Functions, Events, Errors, and Correlation
  5. Part 4: Testing and Deployment
  6. Part 5: Process Central and Process Server (On-Premises)

Process Developer

Process Developer

Step 1: Create a Function Context

Step 1: Create a Function Context

Your first task is to create a function context that is a new class that implements the
IAeFunctionContext
interface.
This class exposes one public method:
getFunction(String)
. It returns an object of a type that implements the IAeFunction interface. The method uses the String argument to indicate the local name of the function and then select that object.You can implement multiple custom functions via one function context class.
getFunction()
throws an AeUnresolvableException if it is unable to locate the desired function by name.
Annotations
You add the
@AeFunctionContext
annotation to annotate the class at class level.
Add the
@AeFunctionUnit
annotation at the method level, for each function unit that you want to display in the Expression Builder function list.
The following example shows the function context:
@AeFunctionContext(name="myContext", namespace="myns") public class CustomContext implements IAeFunctionContext { @AeFunctionUnit( prefix = "ld", display = "MyLDAP", hoverText = "My LDAP Functions", functions = { @AeFunction( syntax = "${prefix}:getOrgUnit(${caret})", display = "getOrgUnit(id)", hoverText = "Returns OU details"), @AeFunction( syntax = "${prefix}:getSiblings(${caret})", display = "getSiblings(id)", hoverText = "Returns siblings nodes"), } ) public IAeFunction getFunction(String aFunctionName) throws AeUnresolvableException { } }
where:
  • @AeFunctionContext name
    is the display name of the function context in the Process Console Catalog
  • @AeFunctionUnit
    represents a group of functions
    • prefix
      is used for all functions in the unit
    • display
      is the unit name in the Expression Builder function list
    • hoverText
      is the unit's hover help
    • functions
      is the list of functions
  • @AeFunction
    represents the function
    • syntax
      is the syntax of the function added to the Expression text box when the function is double-clicked. Note that the syntax includes the
      ${prefix}
      and the
      ${caret}
      . The cursor appears in the column set by the caret token.
    • display
      is the function name in the Expression Builder function list
    • hoverText
      is the function's hover help

0 COMMENTS

We’d like to hear from you!