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

Testing XQuery Functions in the XQuery Editor

Testing XQuery Functions in the XQuery Editor

You can write a test script for your functions and execute the script in the XQuery Editor. Process Developer provides a default interpreter for script execution.
For example, create a new
.xq
file, and write a simple test script where you hard-code a function argument as in the
Kitty
argument below:
xquery version "1.0" encoding "utf-8"; import module namespace xyz ="myFunctions" at "hello.xq"; xyz:sayHello('Kitty')
To run this script, right-mouse click in the editor and select
Run As > XQuery
.
Passing an External Value to a Test Script
If the test script has external variables defined, values for those variables can be passed as arguments from the Run As launch configuration. The following is a simple script that takes in an external variable, followed by a description of how to create the script argument:
xquery version "1.0" encoding "utf-8"; import module namespace xyz ="myFunctions" at "hello.xq"; declare variable $ip as xs:string external; xyz:sayHello($ip)
Create a Run As Configuration:
  1. Right-mouse click in the editor and select
    Run As > Run Configurations
    .
  2. Select New, and add your project name and test script name on the first page.
  3. On the Arguments page, add a Script Argument, such as
    ip="Kitty"
    .
  4. Run your named configuration.
Customizing the Interpreter Behavior
Process Developer includes a default Saxon interpreter. You can change the arguments to this interpreter by selecting
Preferences > XQuery > Interpreters
.
You can configure the default Process Developer interpreter by double-clicking it. Interpreter arguments can be changed based on the development needs. Documentation for the arguments can be found at
http://www.saxonica.com/documentation/using-xquery/commandline.xml
.
Do not change the first argument, which is the class name,
org.activebpel.rt.bpel.ext.expr.impl.xquery.AeQuery
.

0 COMMENTS

We’d like to hear from you!