This topic applies only to the IBM Business Automation Workflow Advanced
configuration.

Declaring a query property for a variable

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
A query property determines which parts of a global variable are accessible in the runtime environment with the query() API function.

About this task

You can define query properties on your global variables. Query properties can be included in runtime queries using the query API function. The query property may be either a built-in XML schema simple type, or a user-defined simple type based on a built-in XML schema type using restrictions. Complex types, list, and union types (neither built-in nor user-defined) are not supported for query properties.

There are two kinds of query properties:
  1. A local query property is created from a query and can be used for getting and filtering data from a single process.
  2. A global query property that is created from a property is used when you would like to filter data from multiple processes. There are two conditions that must be met in order to define a global query property:
    • you must have an interface typed variable,
    • a correlation property must be defined for the underlying WSDL message.
    Since a correlation property can be shared between multiple processes, you must define a query property from a property in the corresponding interface typed variable for each process.
Note: Custom properties are different than query properties. Where query properties are declared on variables, custom properties are configured for a BPEL process and all of its basic activities, as well as for inline human task activities, and Java™ snippets. For more information on this, see Using custom properties for human tasks.
To declare a query property in the process editor, proceed as follows:

Procedure

  1. Select an existing variable in the tray and click the Query Properties tab in the Properties view.
  2. Click Add.
  3. In the Add a Query Property define the query property.
    Option Description
    Data type variable You can only define a local query property. Enter a name for this query property in the Name field, and, if populated, select the data type from the hierarchical list. The Name field must not contain spaces or special characters. Click OK.
    Interface type variable Define the query property, either:
    • create a global query property by selecting From property. Click Browse to select an appropriate property from the Select a Property window. Click OK.
    • create a local query property by selecting From query. Provide a name for the query property and, if populated, select the data type that the query property will use. The Name field must not contain spaces or special characters.
    Click OK.

Results

The declared query properties are displayed in the table on the Query Properties tab of the Properties view. The columns of the table are:
Table 1. The query properties tab on the properties view.
Column heading Description Notes
Query Property The name of the query property. Taken from the correlation property for global query properties.
Type The data type that the query returns, must be of a simple type. Taken from the correlation property for global query properties.
Part The part of the WSDL message to which the query refers.
  • Disabled for global query properties.
  • Disabled for business object data type variables. In this case the query works directly on the business object and there is no message defined.
  • Disabled for simple type data variables.
Query The expression that defines the query, this entry can be modified by clicking
Edit the XPath expression icon
on the right side of the field, this opens an XPath editor using which you can define the query.
  • Disabled for global query properties.
  • Disabled for simple type data variables.
For information on how to access this query property in the runtime environment, see Querying business-process and task-related objects External link opens a new window or tab or Queries on BPEL process and task data if you have IBM® Workflow Server installed.

For more information on using query tables see Query tables in Business Process Choreographer if you have IBM Workflow Server installed.