Wednesday Oct 08, 2008

3 New Date/Time Comparison Extension Funtions for Netbeans BPEL 2.0 Editor

Checkout 3 new BPEL Extension functions for date/time comparisons. These functions are implemented as extension functions as BPEL 2.0 (which uses XPath 1.0) standard function list does not include these. The syntax and definition for these is derived from XPath 2.0 spec (http://www.w3.org/TR/xquery-operators/). These new functions being -

sxxf:dateTime-less-than  (Less-than comparison on xs:dateTime values)
sxxf:date-less-than      (Less-than comparison on xs:date values)
sxxf:time-less-than      (Less-than comparison on xs:time values)

Where the namespace prefix sxxf stands for "http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions" which need to be defined in the process definition.

Note that these functions can either take literal value (corresponding to  xs:dateTime, xs:date or xs:time representation) or BPEL Variable of appropriate time.

A test case to showcase example usage of these function is checked in driver tests. Check out BPEL Project and Composite Application from https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/driver-tests/bpelse/xpathfunctions/DateTimeComparison/.

Copying from the test case-

sxxf:dateTime-less-than($NewWSDLOperationIn.dateTime1, $NewWSDLOperationIn.dateTime2)
sxxf:date-less-than($NewWSDLOperationIn.date1, $NewWSDLOperationIn.date2)
sxxf:time-less-than($NewWSDLOperationIn.time1, $NewWSDLOperationIn.time2)

sxxf:dateTime-less-than('2008-09-29T17:15:43.68-08:00', '2008-09-29T17:15:43.67-08:00')
sxxf:date-less-than('2008-09-28', '2008-09-29')
sxxf:time-less-than('17:15:43.68-08:00', '17:15:43.67-08:00')

Monday Sep 29, 2008

Two New BPEL Extension funtions - getBPId() and getGUID()

BPEL Service Engine, part of Open ESB Project recently added two new Extension functions to return the Process Instance Id and a New GUID respectively. These functions are available in BPEL Mapper Pallet in Netbean's BPEL Editor.  So, what might be good use of these functions. Of top of my head, I can think of the following:
- For creating unique Correlation Keys: Often times state-ful interactions are required between interacting partners exchange asynchronous messages. BPEL describes correlation mechanism to make such interaction possible. These correlation tokens are embedded in the messages that are passed around in such interactions. Any of these newly added getGUID() or getBPID() extension functions can easily be used to create such correlation tokens.
- For Auditing and Debugging purposes: getBPID() that returns the process instance id can be used for these purposes.

Following is the usage of these funtions, as shown in the example below:

      <assign name="Assign1">
         <copy>
            <from>concat('BPID = [', sxxf:getBPId(), '] GUID = [', sxxf:getGUID(), ']')</from>
            <to variable="NewWSDLOperationOut" part="part1"/>
         </copy>
      </assign>

where the namespace prefix sxxf stands for xmlns:sxxf="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions" which need to be imported into your BPEL Definition file. Of course, Netbean's BPEL Editor comes with powerful mapper (screenshot below), that makes usage of these funtions like a breeze.

Two New BPEL Extension Funtions

Monday Jul 07, 2008

How to Enable Java Debugger for Glassfish Cluster Profile

Often times things work fine for Single Instance App Server, but when the same application is put on cluster mode, the results are not as expected. For glassfish, the steps I use for enabling the debugger for cluster mode is slightly from non-cluster mode. Also, there is one extra manual step involved to make the debugger work.

First for Clustered Glassfish, you can easily enable the debugger using the Admin Web GUI. Here are the steps involved. (for the purposes of illustration cluster name and instance name  is assumed to be cluster1 and instance-ONE)

  1. Log on to Admin GUI (http://<server>:4848/index.jsf). 
  2. Navigate to Configurations -> cluster1-config -> JVM Settings
  3. On the General Tab, Enable the Debug Check Box and for the Debug Options Text Box remove the port number. Leave it blank (Figure 1).
  4. Shutdown node agent (asadmin stop-node-agent)
  5. Go to domain.xml for the cluster instance (\\openesb\\glassfish\\nodeagents\\cluster1-nodeagent\\instance-ONE\\config) and enable the debug-enabled flag to true for the cluster1-config (Figure 2).
  6. Start the node agent (asadmin start-node-agent) and look for the debug port in the server log (Figure 3). The server log will print the port to use.

Debug Configuration for Clustured Glassfish

Figure 1 Figure 2

Server Log

Figure 3
About

Malkit works in software development at Oracle, Inc. working in Oracle Business Process Manager, part of Oracle Fusion Middleware. Malkit came to Oracle through Sun Microsystems acquisition, living and working in Los Angeles, California.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today