Best practice: Choosing between Xpath and Java in your business process

When composing customized code in your business process, you can use either the XPATH or Java programming languages. Here are some guidelines for choosing which one to use.

This decision may already be made for you, simply by virtue of what you are planning on doing with your finished business 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:

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 ideal for very simple data-driven expressions, Java is better for modelling more complicated code. If however you aren't all that familiar with Java, and find yourself wanting to push the limits of the XPATH language, keep in mind that you can easily use the visual snippet editor to graphically create and manipulate snippets of Java code.

Related concepts
Working with BPEL extensions

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.