Predefined XPath extension functions
In addition to standard XPath functions described in the XPath
1.0 specification (http://www.w3.org/TR/xpath
), you can use the
following predefined extension functions in your XPath expressions
and conditions. If these predefined extension functions do not meet
your organization's needs, you can create and define custom extension
functions. For more information, see BPEL processes: Creating custom XPath extension functions.
XPath extension functions defined by BPEL
The BPEL specification defines the following XPath extension functions,
which are also supported in IBM Workflow
Server.
The namespace for these functions is: http://schemas.xmlsoap.org/ws/2004/03/business-process/
- bpws:getVariableData(variableName)
- Returns the BPEL variable with the indicated name.
- bpws:getVariableData(variableName , partName or XPath expression )
- If the variable indicated by variableName specifies a WSDL message, this function returns the indicated part of this BPEL variable. Otherwise, it evaluates the XPath expression on the BPEL variable variableName.
- bpws:getVariableData(variableNam , partName, XPath )
- Returns the evaluation result of the XPath expression applied to part partName of the WSDL message stored in the BPEL variable variableName.
- bpws:getVariableProperty(variableName , propertyName )
- This function is used to extract the property value propertyName from BPEL variable variableName. Note that the property value must be a qualified name.
- bpws:getLinkStatus(linkName )
- This function is only available in join conditions of arbitrary activities. For linkName, you may only use names of incoming links for the activity associated with the join condition.
XPath extension functions for Business Objects
For easier work with Business Objects, the following functions
are available. The namespace for these functions is: http://www.ibm.com/xmlns/prod/websphere/wbi/BusinessObject/6.0.0
- bo:create( typeNamespace , typeName )
- Returns an empty instance of the XSD complex type indicated by typeNamespace and typeName. You get these values by opening the appropriate data type with the Business Object Editor. Review these values in the properties view.
- bo:equals( variable1 , variable2 )
- Returns true if variable1 and variable2 are equal, otherwise false. If the type of variable1 is a simple type, the equals() function of the corresponding Java™ type is used. If both variables are represented by Business Objects, that is they are either interface type or refer to a complex type or element, the extension function delegates the evaluation to isEqual() operation of the system SCA service BOEqual. In all other cases, false will be returned.
Miscellaneous XPath extension functions
Furthermore, there are some extension functions to provide access
to several objects within a BPEL process. The namespace for these
functions is: http://www.ibm.com/xmlns/prod/websphere/business-process/6.0.0
- wpc:getCustomProperty (propertyName)
- Returns the value of the custom property propertyName defined on the process level.
- wpc:getCustomProperty( propertyName , activityName )
- Returns the value of the custom property propertyName defined on the activity activityName. If parameter activityName is null, the custom property defined on the process level is returned. activityName is the name of an activity, not the display name. As the name of an activity is optional in BPEL, you need to specify it if you want to access its custom properties. BPEL lets you use the same name on several activities. Nevertheless, if you try to access the custom properties of such an activity, you will get an exception as the name is ambiguous. Therefore, avoid using the same name for different activities.
- wpc:getServiceRefForProcessTemplate( processTemplateName , portTypeNamespace , portTypeName )
- Returns a service reference to the port type portTypeNamespace, portTypeName of the process specified by processTemplateName. If multiple versions of a process template are available, you get the service reference to the current valid version.
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15