Table of Contents


  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using Connectors
  9. System Services, Listeners and Connectors

2. Design

2. Design

Using the Expression Editor

Using the

Editor allows you to edit field definitions when you define a process or service connector.
You can open the
Editor from Process Designer in two contexts:
  • When you select Formula as the Source type for a field definition so you can get the field value from a formula.
  • When you define the URL, parameters, or HTTP headers for a service connector.
Editor allows you to:
  • See syntax highlighting for XML and XQuery.
  • View syntax validation feedback.
  • Select code completion options that appear as you type.
  • Insert common code fragments from a drop-down list.
  • Use keyboard shortcuts.
  • Choose fields from a list of available input, output, or temp fields defined for the process, the current step, and any upstream steps in the current process. When you choose a field, the appropriate value (for example, '$input.Customer') is inserted into the editor.
  • Choose a function from the list of available functions, grouped by category. The list includes some common XQuery functions and displays syntax help as a tool tip, when available.
  • Insert the sample XML representing the selected item (for a process object xml element or for a child of a process object).
  • Insert common code fragments from a drop-down list.

Opening the

Where available, click the
icon to open the
For example, in an Assignment step, you might add an input field with a Formula as the data source. You can select
from the
list, as shown in the following image:
After the
Editor opens, you can use the features described below. The field type and name appears in the window title, as shown in the following image (input.TestInput):
When opened from a service connector, you can choose a type (XML, XQuery, JSON, or Content) and see the fields available in the Connection Properties and Input Parameters, as shown in this image:

Editing Options

When using the
Editor, you can use the toolbar and/or the following keyboard shortcuts, which are available when the editor is active (the cursor is blinking):
Indent four spaces
Show list of available variables
Show list of available insertions (namespaces, functions, fields and common code fragments)
(You can also start typing in the editor to filter the list and select the function or variable you need.)
You can also expand the editor window to full screen using the toolbar icon. Click Esc to close the full screen editor and return to the canvas.

Building a Formula

To enter a formula that determines the value for the selected field, you can access these options from the toolbar:
  • Insert Field. Shows the list of available fields you can insert into the formula.
  • Insert Function. Shows the list of available functions.
  • XML Object. Shows a list of XML objects, if any, that you can add.
For example, in the following image, the
list shows the field names associated with the object:
to show a list of those available, sorted by category.
Use the
XML Objects
list to add an XML code snippet for the field when you are defining a process object. For example, you might create an XML snippet to represent a process object and then use Insert Field to add the input field as shown in this image:
To get more information about a function, hover over the function name in the list to display a description. For example:
Note the following tips when you work with the editor:
  • Press
    to display a list of available insertions (namespaces, functions, fields and common code fragments).
  • Press
    to display a list available functions, process fields and any locally declared XQuery variables.
  • If the expression is used in XML, be sure to add braces around it, for example:
  • Enter a few characters to filter your list.

Syntax Validation

As you build a formula, the syntax is validated. If an error is detected, a red X appears next to the line that contains the error. Hover over the error indicator to display a description of the error:
As you type, the syntax is validated and the
Editor displays a message if it encounters an error condition.
XQuery error messages are defined by the XQuery engine. You can learn more about XQuery validation and see a list of XQuery error conditions (in
Appendix F
) here: