
Choosing between XPath and Java in your BPEL process
When composing customized code in your BPEL process, you can use either the XPath or Java™ programming languages.
This decision may already be made for you, simply by virtue of
what you are planning on doing with your finished BPEL process. Because
the use of Java expressions
is a part of the BPEL extensions, you must use XPath in your process
if you plan on doing any of the following, as none of these scenarios
support the extensions:
- When you are designing the process to be used or edited in another set of tools.
- When you are planning on executing the process in a runtime environment other than IBM® Process Server.
If you can use either one, and are unsure of which one is best, then consider the following. Typically, a decision like this can be based on two things: the nature of the needed code, and your familiarity with the programming languages in question. Where XPath is well-suited for simple data-driven expressions, Java is better for modelling more complicated code. However, if you are not very familiar with Java and want to extend the limits of the XPath language, you can use the visual snippet editor to graphically create and manipulate snippets of Java code.