Monday May 29, 2006
Today's Page Hits: 128
Monday May 29, 2006

The WS-BPEL XPath Expression Editor is a NetBeans plug-in editor for building XPath expressions which are used in various WS-BPEL elements. The WS-BPEL XPath Expression Editor allows the user to build XPath expressions in a WYSWYG way. It works on XML Schema (XSD) trees to generator XPath expressions.
|
Acronyms |
Explanation |
|
WS-BPEL |
Web Service-Business Process Execution Language |
|
XPath |
XML Path Language |
WS-BPEL 2.0 Language Background
The WS-BPEL
2.0 language supports XPath 1.0 for defining expressions in various WS-BPEL
constructs. WS-BPEL uses several types of expressions. The kinds of expressions
used are as follows (relevant usage contexts are listed in parentheses):
WS-BPEL
2.0 Language Supported Elements
The following WS-BPEL 2.0 language elements are supported by the WS-BPEL XPath Expression Editor:
XPath 1.0 Support
The WS-BPEL XPath Expression Editor supports the XPath 1.0 specification. (See Xpath specification for more information of how operators are evaluated)

Usage Scenarios
The following details some use-case scenarios in which the WS-BPEL XPath Expression Editor can help:
1. Creating a variable to
variable assignment expression
The user can create variable to variable
assignments which will generate a <copy> with XPath expressions under the
selected assign activity.
e.g.,
<copy>
<from
variable="sayHello_Input"/>
<to
variable="sayHello_Output"/>
</copy>

2. Create a part to part assignment expression
The user can create part to part
assignments which will generate a <copy> with XPath expressions under
selected assign activity.
e.g.,
<copy>
<from
variable="sayHello_Input" part="result"/>
<to variable="sayHello_Output"
part="body"/>
</copy>

3. Create an XSD element-to-element assignment expression
The user can create an XSD element
to XSD element assignment which will generate a <copy> with XPath
expressions under the selected assign activity.
e.g.,
<copy>
<from>$sayHello_Input.result/long</from>
<to>$sayHello_Input.result/long</to>
</copy>

4. Create an XSD attribute-to-attribute assignment expression
The user can create an XSD attribute
to XSD attribute assignment which will generate a <copy> with XPath
expressions under the selected assign activity.
e.g.,
<copy>
<from>$sayHello_Input.result/shiporder/@orderid</from>
<to>$sayHello_Output.body/shiporder/@orderid</to>
</copy>

5. Create an expression using an XPath operator
The user can use any XPath 1.0
supported operator in the XPath expression editor.
e.g.,
<copy>
<from>($sayHello_Input.result/int
+ $sayHello_Input.result/long) </from>
<to>$sayHello_Output.body/double</to>
</copy>

6. Create an expression using any XPath core function
The user can use any XPath 1.0
supported core function in the XPath expression editor.
e.g.,
<copy>
<from>concat($sayHello_Input.result/shiporder/shipto/name,
$sayHello_Input.result/shiporder/shipto/address)</from>
<to>$sayHello_Output.body/shiporder/shipto/name</to>
</copy>

7. Create an expression using literal
The user can define expressions
using string literals, number literals and duration literals.
e.g.,
<copy>
<from>'Menlo
Park'</from>
<to>$sayHello_Output.body/shiporder[1]/shipto/city</to>
</copy>
<copy>
<from>1234</from>
<to>$sayHello_Output.body/shiporder[1]/@orderid</to>
</copy>
<copy>
<from>'P2006Y5M10DT4H9M7S'</from>
<to>$sayHello_Output.body/dateTime</to>
</copy>

8. Create an XPath predicate
The user can define XPath predicate
expressions.
e.g.,
$sayHello_Input.result/shiporder[5]



9. Use a predicate in assignment
The user can use a predicate in
assignment.
e.g.,
<copy>
<from>$sayHello_Input.result/shiporder[5]</from>
<to>$sayHello_Output.body/shiporder</to>
</copy>

10. Create a Boolean expression
The user can create a Boolean
expression used in various WS-BPEL elements which require Boolean conditional
expressions. (for e.g., <while>)
e.g.,
<condition> $sayHello_Input.result/shiporder/shipto/country
= 'US' </condition>

11. Create a Duration expression
The user can create a Duration
expression used in various WS-BPEL elements which require Duration expressions.
(e.g., <wait>)
e.g.,
<for>'P2006Y1M30DT3M13S'</for>

12. Create a Deadline expression
The user can create a Deadline
expression used in various WS-BPEL elements which require Deadline expressions.
(e.g., <wait> )
e.g.,
<until>$sayHello_Input.result/dateTime</until>

User Interface Interactions
The WS-BPEL XPath Expression Editor
is launched based on the current selected WS-BPEL element in WS-BPEL editor. If
there is currently a selected WS-BPEL element which requires the WS-BPEL XPath
Expression Editor, then the editor is shown in the NetBeans IDE in the bottom
pane.

Disclaimer: The contents of this Weblog represent my personal opinion which may differ from the official views of my employer, Sun Microsystems, Inc. or any past employers.