The new BPEL Process Manager from Oracle is finally out since the 30th of July !
This 10.1.3.4 version is a patchset which can be installed on a 10.1.3.1 (or more). That means you have to install the 10.1.3.1 version before, and then install the 10.1.3.4 patchset.
I regret this patchset wouldn't be a standalone installation... As usual, this is available only for OC4J applications servers (I know it should be available from September for IBM WebSphere).
Anyway, this new version is here, and I think Oracle BPEL is on a good way (good improvements, faster, usefull things).
The BPEL Console
This new version mainly focuses on the BPEL console by adding some gadgets as :
- improved statistics collection
- more visibility of the engine threading modele
- a XML validator to validation any requests before posting.
The BPEL Engine
- I find out and I think which is really good is the creation of a new asynchronous thread to feed the audit trail. In this case, if you start a new bpel process and if it crashes before the first dehydration point, you should be able to see the audit trail (how many times I tried some process which are impossible to debug since we do not have the audit trail .... !). I hope this point works.
- Embedded automatic recovery agent which can recover any messages or activities which would be in state failed (state unresolved or not handled by the dispatcher). This sounds very good because I get used to develop my own recovery scripts in order to recover this kind of unresolved messages ...
- JVM data collection as JVM thread dumps, JVM heap statistics
Misc
- Export of a process suitcase
- Deployement plan which is created in order to make easier the deployement on several environnements (developement, testing, production) which all have different hostnames and ports. It simply modify the URI of the import clause in the bpel descriptor file, XSD, WSDL ...
By the way, Jdeveloper 10.1.3.4 is also out ! (but it seems even more buggy than the 10.1.3.3, so take care to your bpel source code).
Talk you soon.
Tuesday, August 5, 2008
Wednesday, July 16, 2008
Custom XPath function in Oracle BPEL PM
Hi,
I'll present you today the way to do custom xpath function in Oracle BPEL Process Manager 10.1.3.x. This stuff is very usefull for basic things (as an isNumber() method, ID generator, ...) or more complex things (as XML operations, business stuff).
I did many projects with Oracle BPM 10, and I've got used to use lots of those functions.
Step 1 - Make a class which implements the IXPathFunction interface
The next class is a little tool which tests if a string is a number.
Class IsNumberFunction :
Step 2 - Register the xpath function to your BPEL domain
Edit the xpath-functions.xml file in the $BPEL_HOME/domains/bpelsoa/config directory.
Add these following lines into the bpel-xpath-functions tags.
Step 3 - Add your classfiles to the bpel classpath
Create a new directory in your domain home ($BPEL_HOME/domains/bpelsoa) called classes and add your classfiles into it or add your classfiles to your application directory (/product/your_app/classes). Don't forget to add the packages hierarchy.
Edit the shared library of your application server
-> add a tag code-source with your classpath as the others code-source tags.
Step 4 - Using your new custom xpath function in a BPEL process
A custom xpath function can be used as any xpath functions. It has to be in an expression field from an assign activity (copy, append, insert after/before, etc.).
Enjoy your new xpath.
That's all.
I'll present you today the way to do custom xpath function in Oracle BPEL Process Manager 10.1.3.x. This stuff is very usefull for basic things (as an isNumber() method, ID generator, ...) or more complex things (as XML operations, business stuff).
I did many projects with Oracle BPM 10, and I've got used to use lots of those functions.
Step 1 - Make a class which implements the IXPathFunction interface
The next class is a little tool which tests if a string is a number.
Class IsNumberFunction :
package com.bpelsoa.xpath;
import java.util.List;
import org.w3c.dom.Node;
import com.collaxa.cube.xml.dom.DOMUtil;
import com.oracle.bpel.xml.xpath.IXPathContext;
import com.oracle.bpel.xml.xpath.IXPathFunction;
import com.oracle.bpel.xml.xpath.XPathFunctionException;
/**
* This implements a small tool which tests if a String is a Number.
*
* @author Raphaël
*
*/
public class IsNumberFunction implements IXPathFunction {
/** Number of args for this XPathFunction. */
private static final int NB_ARGS = 1;
/** Index in the List of our argument. */
private static final int INDEX_ARG = 0;
/**
* Is called by the BPEL engine.
*
* @see com.oracle.bpel.xml.xpath.IXPathFunction#call(com.oracle.bpel.xml.xpath
* .IXPathContext, java.util.List)
*/
@SuppressWarnings("unchecked")
public Object call(IXPathContext context, List args)
throws XPathFunctionException {
// test if we have the right argument number
if (args.size() != NB_ARGS) {
throw new XPathFunctionException(
"This function requires one argument.");
}
// extract the String of the argument from the BPEL process
Object o = args.get(INDEX_ARG);
String str = getValue(o);
// call the business method
return isNumber(str);
}
/**
* Extract the value of our String.
*
* @param o object
* @return a string which contains our value
* @throws XPathFunctionException if error occurs
*/
private String getValue(Object o) throws XPathFunctionException {
if (o instanceof String) {
return ((String) o);
} else if (o instanceof Node) {
return DOMUtil.getTextValue((Node) o);
} else {
throw new XPathFunctionException("Unknown argument type.");
}
}
/**
* Test if a String is a Number.
*
* @param str
* the String to be tested
* @return a boolean
*/
private boolean isNumber(String str) {
for (int i = 0; i < str.length(); i++) {
if (!Character.isDigit(str.charAt(i))) {
return Boolean.FALSE;
}
}
return Boolean.TRUE;
}
}
Step 2 - Register the xpath function to your BPEL domain
Edit the xpath-functions.xml file in the $BPEL_HOME/domains/bpelsoa/config directory.
Add these following lines into the bpel-xpath-functions tags.
<function id="isNumber">
<classname>com.bpelsoa.xpath.IsNumberFunction</classname>
<comment><![CDATA[This implements a small tool which tests if a String is a Number. The signature of this function is bpelsoa:isNumber(String || Node).]]></comment>
<property id="namespace-uri">
<value>http://bpelsoa.blogspot.com</value>
<comment>Namespace URI for this function</comment>
</property>
<property id="namespace-prefix">
<value>bpelsoa</value>
<comment>Namespace prefix for this function</comment>
</property>
</function>
Step 3 - Add your classfiles to the bpel classpath
Create a new directory in your domain home ($BPEL_HOME/domains/bpelsoa) called classes and add your classfiles into it or add your classfiles to your application directory (/product/your_app/classes). Don't forget to add the packages hierarchy.
Edit the shared library of your application server
- OC4J : $ORACLE_HOME/j2ee/oc4j_soa/config/server.xml
-> add a tag code-source with your classpath as the others code-source tags.
- WebSphere 6.1 : In the administration console, go to shared library, select the oracleBPELServer scope, and edit the orabpel_sl lib
Step 4 - Using your new custom xpath function in a BPEL process
A custom xpath function can be used as any xpath functions. It has to be in an expression field from an assign activity (copy, append, insert after/before, etc.).
<assign name="xpathCall">
<copy>
<from expression="bpelsoa:isNumber('123')"/>
<to variable="myBoolean"/>
</copy>
</assign>
Enjoy your new xpath.
That's all.
Thursday, July 10, 2008
Apache ODE 1.2 with Oracle Database 10g
Hi there,
It can be very usefull to change the database for many reasons (your customer wants to have this brand, your customer has some commercial discounts, support, etc...).
I'll will show you how to use the RDMS Oracle Database 10g with Apache ODE 1.2 .war version.
You'll need the sysdba privileges in order to follow the next steps.
You can get the oracle.sql script in the directory apache-ode-war-1.2/sql.
Create an ODE tablespace
Connect to the sid :
Then execute the SQL statement :
Feel free to adapt this to your environement (the dbf path, the autoextend property and the initial size of the tbs).
Create an ODE schema
Execute the SQL statement :
Populate the ODE schema
Load the Apache ODE 1.2 schema :
Add this in the Host tag to the $CATALINA_HOME/conf/server.xml file :
Bind the ODE engine to the oracle datasource
Add the file $CATALINA_HOME/webapps/ode/WEB-INF/conf/ode-axis2.properties with this content :
Add the Oracle JDBC Driver to the tomcat lib directory
Add the file ojdbc14.jar (which you can find in the lib directory of your $ORACLE_HOME) to the $CATALINA_HOME/lib directory.
Ok we're done, that's all !
Just restart the tomcat and it should work.
It can be very usefull to change the database for many reasons (your customer wants to have this brand, your customer has some commercial discounts, support, etc...).
I'll will show you how to use the RDMS Oracle Database 10g with Apache ODE 1.2 .war version.
You'll need the sysdba privileges in order to follow the next steps.
You can get the oracle.sql script in the directory apache-ode-war-1.2/sql.
Create an ODE tablespace
Connect to the sid :
sqlplus sys/manager@xe as sysdba
Then execute the SQL statement :
CREATE TABLESPACE ODE DATAFILE
'/ENTREPRISE/PRODUCT/ORACLEXE/ORADATA/XE/ODE.DBF' SIZE 1000M AUTOEXTEND OFF
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT MANUAL
FLASHBACK ON;
Feel free to adapt this to your environement (the dbf path, the autoextend property and the initial size of the tbs).
Create an ODE schema
Execute the SQL statement :
CREATE USER ode
IDENTIFIED BY ode
DEFAULT TABLESPACE ode
TEMPORARY TABLESPACE temp
PROFILE DEFAULT
ACCOUNT UNLOCK;
-- Roles
GRANT RESOURCE TO ode;
GRANT CONNECT TO ode;
ALTER USER ode DEFAULT ROLE ALL;
-- System Privileges
GRANT UNLIMITED TABLESPACE TO ode;
GRANT CREATE VIEW TO ode;
-- tablespace Quota
ALTER USER ode QUOTA UNLIMITED ON ode;
Populate the ODE schema
Load the Apache ODE 1.2 schema :
sqlplus ode/ode@xe @oracle.sqlCreate the JDBC datasource
Add this in the Host tag to the $CATALINA_HOME/conf/server.xml file :
<Context path="/ode" docBase="ode" debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/oracle/ode"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="ODE"
password="ODE"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:XE"/>
</Context>
Bind the ODE engine to the oracle datasource
Add the file $CATALINA_HOME/webapps/ode/WEB-INF/conf/ode-axis2.properties with this content :
ode-axis2.db.mode=EXTERNAL
ode-axis2.db.ext.dataSource=java:comp/env/jdbc/oracle/ode
Add the Oracle JDBC Driver to the tomcat lib directory
Add the file ojdbc14.jar (which you can find in the lib directory of your $ORACLE_HOME) to the $CATALINA_HOME/lib directory.
Ok we're done, that's all !
Just restart the tomcat and it should work.
Tags :
apache ode,
bpel,
oracle 10g,
soa
Wednesday, July 9, 2008
Apache ODE 1.2 is released
Hi folks,
This is my first technical post, and what is better than to announce the Apache ODE 1.2 release ?
This new release sounds very good for several points :
Raphaël.
This is my first technical post, and what is better than to announce the Apache ODE 1.2 release ?
This new release sounds very good for several points :
- Improvements for stability and performance
- External variables: variables used in a process are not opaque to the outside world anymore. You can map them to a simple database table and manipulate them directly. This means assigning to a variable has the effect of inserting or updating a row in the database, while reading a variable, has the effect of selecting a row from the database (I'll do a post on this feature to test it)
- Advanced endpoint configuration support : WS-Security & WS-RM
- New SQL scripts packaged in the ditribution (Derby, MySQL, Oracle)
- Lots of bugs fixed !
Raphaël.
Tags :
apache ode,
bpel
Friday, June 27, 2008
Introduction
Hi,
This is a new blog which will be about all the SOA, BPM/BPEL, ESB concepts.
I'll try to explain different points as the best as I can in order to help you to fix all the potential issue which would occur.
Thanks a lot for reading this article.
Talk you soon.
Raphaël.
This is a new blog which will be about all the SOA, BPM/BPEL, ESB concepts.
I'll try to explain different points as the best as I can in order to help you to fix all the potential issue which would occur.
Thanks a lot for reading this article.
Talk you soon.
Raphaël.
Subscribe to:
Posts (Atom)
