Table of Contents

Search

  1. Preface
  2. Welcome to Informatica Process Developer
  3. Using Guide Developer for the First Time
  4. Getting Started with Informatica Process Developer
  5. About Interfaces Service References and Local WSDL
  6. Planning Your BPEL Process
  7. Participants
  8. Implementing a BPMN Task or Event in BPEL
  9. Implementing a BPMN Gateway or Control Flow
  10. Using Variables
  11. Attachments
  12. Using Links
  13. Data Manipulation
  14. Compensation
  15. Correlation
  16. What is Correlation
  17. What is a Correlation Set
  18. Creating Message Properties and Property Aliases
  19. Adding a Correlation Set
  20. Deleting a Correlation Set
  21. Adding Correlations to an Activity
  22. Rules for Declaring and Using Correlation Sets
  23. Correlation Sets and Engine-Managed Correlation
  24. Event Handling
  25. Fault Handling
  26. Simulating and Debugging
  27. Deploying Your Processes
  28. BPEL Unit Testing
  29. Creating POJO and XQuery Custom Functions
  30. Custom Service Interactions
  31. Process Exception Management
  32. Creating Reports for Process Server and Central
  33. Business Event Processing
  34. Process Central Forms and Configuration
  35. Building a Process with a System Service
  36. Human Tasks
  37. BPEL Faults and Reports

Designer

Designer

Writing XQuery Functions

Writing XQuery Functions

Process Developer integrates the XQuery Development Tools (XQDT) project. Using it, you can create XQuery custom functions in your orchestration project that are automatically included in the functions list of the Expression Builder.
XQDT includes an XQuery editor with syntax highlighting, validation, content assistance, and execution support. You can easily create and test XQuery functions in the editor before using them within the Process Developer Expression Builder. Also, you can make changes to a function and save it. The updates are automatically included in your BPEL file.
Each function must be part of a library module in order for it to be included in the Expression Builder. You can create a module of functions in one XQuery file and then use the functions defined in that module in any other XQuery by using the
import module
directive.
XQDT supports XQuery 1.0 and many XQuery 3.0 constructs.
After you double-click in the functions section of the expression builder to add an XQuery function, the XQuery file is added as an import. You should pay attention to what XQuery files are referred to as imports in the BPEL process and make sure that there are no duplicates between that list and what they explicitly add as imports in the XQuery files that use the import module.
If you have an existing project (prior to version 9.0), right-mouse click on the project in the Project Explorer, and select
Add XQuery Nature
.
To get started creating an XQuery function:
  1. Right-mouse click on the
    xquery
    folder (or another folder) in your orchestration project, and select
    New > XQuery Module
    .
  2. Name the file with a
    .xq
    extension, such as
    myNewFunctionModule.xq
    .
  3. Select one of the following:
    • Main module. Contains a query body to be evaluated
    • Library module. Contains a module declaration but no query body. A module declaration provides a URI that identifies the module for imports. Enter a prefix and namespace for the module declaration.
  4. Select
    Finish
    , and the XQuery editor opens. Use content assist (Ctrl + spacebar) to begin a new function.
The following example shows the module declaration for a library module. This declaration is required for an XQuery function to appear in the Functions list:
(: The version declaration in line one is optional. Version 1.0 does not allow any use of version 3.0 constructs. :)
xquery version "1.0" encoding "utf-8"; module namespace xqf= "TechSupportLevel1"; declare function xqf:pingModemResult ((: $param as type, ... :)) as item() { insert_an_expression_here };
Once you save your XQuery file, the function is automatically available in the Expression Builder, as shown.
As you use a function, the corresponding XQuery module is automatically added to the process's Imports node.
Tip
: In the Outline view, select the function under Imports to view its properties. If you run B-unit tests, you can add the XQuery modules as a resource and specify the Type URI as shown.

0 COMMENTS

We’d like to hear from you!