Expression Builder

The Expression Builder dialog box helps you develop an expression by displaying field names, attachments, workflow groups, XML data fields, system fields, and partner links for you to select. In addition, if functions are appropriate in the expression, you can choose the appropriate function and this dialog box displays the function name and syntax, as well as providing access to the online Help.

To access the Expression Builder dialog box, click Expression Builder in any field where an expression is permitted.

Expression Builder dialog

To build an expression

The name of the item for which you are building the expression displays in the title bar of the window. Build the expression in the expression area by inserting the names of existing fields and operators, and by typing directly in the expression area.

To use the names of data fields, attachments, workflow groups, XML data fields, and other items either defined in this workflow or inherited from a parent workflow

  1. Select the appropriate category (Data Fields, Attachments, and so on) from the list of options at the top of the dialog box.
  2. Select an item from the list on the left.
  3. Click Insert to insert the item into the expression area at the bottom.
  4. Click the appropriate buttons to insert operators, parentheses, and the AND and OR operators in the expression.
  5. To type literals into the expression area, enter values in the appropriate format: a string must be enclosed in quotes; array values must be separated by commas (,) and surrounded by braces { }.

    See Expression arrays for additional information about entering array.

    NOTE The Clear button deletes the contents of the expression area.

To use Partner Links in the expression

If you are invoking web services in a workflow, you might want to modify the header of the invoking message at runtime to either invoke a different web service than the one defined in the partner link, or to pass a username and password to a web service that requires authentication.

  1. Select Partner Links from the drop-down list.
  2. Select the appropriate partner link.
  3. Click Insert to insert the header information into the expression.
  4. Edit the header template to specify either an alternate WSDL URL, an alternate processing endpoint, or a logon and password for authentication.

    Note that you must modify the expression to make it a valid string. That means that you must add double-quotes at the beginning and end of the string, and before any existing double-quotes.

    For example workflows demonstrating how to modify the partner link header, see examples 5 and 7 in Web Services examples.

To use functions in the expression

  1. Select Functions from the drop-down list.
  2. Select the appropriate category.
  3. Select the appropriate function from the list in the right column.
  4. Click Insert to insert the function into the expression.
  5. Edit each function parameter to specify the appropriate values, such as the name of a data field.

    For online Help for the selected function, click Details or see Functions for a list of functions you can use.

To define an expression for an attachment

To define an expression for a workflow group

TIP When you browse for a document, folder, file name, or a user or group name, the selected item is inserted into the expression area in the format required by Process Engine (PE).

You can also assign a user to a workflow group using one of the following:

In the following example entry on the Assignment tab, the userstring data field holds the participant name.

Field name    Expression 
WfGroupA[1] userstring

Use the following syntax on the Assignment tab (After Completion) to assign the numeric ID of the participant at the current step to an element in a workflow group that will process a subsequent step.
 

Field name    Expression 
WfGroupA[1] "@"+numbertostring(F_BoundUser)

NOTE Since the @ symbol has a special meaning in specifying a participant name in a workflow, you should observe the following rule for using the @ symbol in user names: