Previous Topic: Bind Operations to Stored ProceduresNext Topic: Import Operation Bindings


Bind Operations to Scripts

You can bind operations to scripts to specify actions that you want to occur, before, after, or instead of, standard account CRUD operations, such as Add, Modify and Delete. Other types of operations are available, depending on the type of operation binding you select. You can bind an operation to a specific function in a global script, or bind an operation to an individual script. You can bind operations to scripts for any endpoint types which permit them (such as JNDI and JDBC).

Follow these steps:

  1. Create a Connector Xpress JDBC or JNDI project.
  2. Map the user account class, and any other class as required.
  3. Click the Operations Bindings node.

    The Operation Bindings Editor appears.

  4. In the Object Classes Filtering list, select an object class.

    You have specified the object class you want to create the script binding for.

  5. Click Create.

    The Create Operation Binding dialog appears.

  6. Select a class in the Available object classes list and add it to the Added object classes list.

    You have specified the object classes you want to apply the script binding to.

  7. Under Type, select Script.
  8. In the Available Operations list, select an operation.

    You have specified the type of operation that you want to bind the script to.

  9. In the Timing list, select a timing.

    You have specified when the script binding is executed.

  10. Click OK.

    A node is added to the mapping tree which displays the type of operation, the timing you selected and the name of class you want the script binding to apply to.

  11. Click the node that displays the information about the script binding you created.

    The Script Editor dialog appears.

  12. To bind a function in a global script to an operation, do the following:
    1. Select Execute a function in a global script.
    2. Select a global script from the Global Script list.

      Selecting a global script specifies the script where the function you want to bind to the operation is located.

    3. In the Function name field, type the name of the function.

      You have specified the function you want to bind to the operation.

  13. To bind an operation to an individual script, do the following:
    1. Select Execute an individual script.
    2. Click Edit Script.

      The Edit Script dialog appears.

    3. Load or paste the script into the Edit Script dialog as required.
    4. Click OK.
  14. Edit any other details of the script binding as required.

    You have specified the parameters for a script binding style operation binding.

  15. Save the project.