You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mi...@apache.org on 2009/09/14 11:07:51 UTC

svn commit: r814530 - /ode/trunk/extensions/e4x/README

Author: milinda
Date: Mon Sep 14 09:07:51 2009
New Revision: 814530

URL: http://svn.apache.org/viewvc?rev=814530&view=rev
Log:
Fixed formatting issue in e4x README file.

Modified:
    ode/trunk/extensions/e4x/README

Modified: ode/trunk/extensions/e4x/README
URL: http://svn.apache.org/viewvc/ode/trunk/extensions/e4x/README?rev=814530&r1=814529&r2=814530&view=diff
==============================================================================
--- ode/trunk/extensions/e4x/README (original)
+++ ode/trunk/extensions/e4x/README Mon Sep 14 09:07:51 2009
@@ -1 +1,58 @@
-=================================
  Apache ODE - JS/E4X Extension
=================================

This extension provides support for JavaScript/E4X expressions in BPEL
extension activities and/or BPEL extensible assign operations.

How to install
==============
    1.) Copy ode-extensions-e4x-*.jar and lib/* in ODE's class path and
    register the extension bundle by adding the following line to
    ODE's configuration file. See README.extensions for details.
    
    For ODE/Axis2: ode-axis2.properties
    ode-axis2.extension.bundles.runtime = org.apache.ode.extension.e4x.JSExtensionBundle
    
    For ODE/JBI: ode-jbi.properties
    ode-jbi.extension.bundles.runtime = org.apache.ode.extension.e4x.JSExtensionBundle
    
    2.) Start/restart ODE.

How to use
============
    1.) Declare the extension namespace in BPEL by adding the following snippet
    before the first activity.
    
    <bpel:extensions>
        <bpel:extension namespace="http://ode.apache.org/extens
 ions/js" 
                mustUnderstand="yes"/>
    </bpel:extensions>
    
    2a.) Use JS/E4X in <assign> activities:
    
    <assign name="e4x-assign">
        <extensionAssignOperation>
            <js:snippet>
                myVar.TestPart += ' World';
            </js:snippet>
        </extensionAssignOperation>
    </assign>
    
    2b.) Use JS/E4X in <extensionActivity> activities:
    
    <extensionActivity name="calculateDiscount">
        <js:snippet>
            if (goldRatio > 1.0 || silverRatio > 1.0) {
                throwFault('urn:myprocess', 'IllegalArgumentFault',   
                        'discount ratios must be <= 1.0');
            }
            if (customer.type == 'gold') {
                po.items.item.price *= goldRatio;
            } else if (customer.type = 'silver') {
                po.items.item.price *= silverRatio;
            } else if (customer.type = 'besteffort') {
                po.shippingMode = 'snailmail'
            }
      
   </js:snippet>
    </extensionActivity>
\ No newline at end of file
+=================================
+  Apache ODE - JS/E4X Extension
+=================================
+
+This extension provides support for JavaScript/E4X expressions in BPEL
+extension activities and/or BPEL extensible assign operations.
+
+How to install
+==============
+    1.) Copy ode-extensions-e4x-*.jar and lib/* in ODE's class path and
+    register the extension bundle by adding the following line to
+    ODE's configuration file. See README.extensions for details.
+    
+    For ODE/Axis2: ode-axis2.properties
+    ode-axis2.extension.bundles.runtime = org.apache.ode.extension.e4x.JSExtensionBundle
+    
+    For ODE/JBI: ode-jbi.properties
+    ode-jbi.extension.bundles.runtime = org.apache.ode.extension.e4x.JSExtensionBundle
+    
+    2.) Start/restart ODE.
+
+How to use
+============
+    1.) Declare the extension namespace in BPEL by adding the following snippet
+    before the first activity.
+    
+    <bpel:extensions>
+        <bpel:extension namespace="http://ode.apache.org/extensions/js" 
+                mustUnderstand="yes"/>
+    </bpel:extensions>
+    
+    2a.) Use JS/E4X in <assign> activities:
+    
+    <assign name="e4x-assign">
+        <extensionAssignOperation>
+            <js:snippet>
+                myVar.TestPart += ' World';
+            </js:snippet>
+        </extensionAssignOperation>
+    </assign>
+    
+    2b.) Use JS/E4X in <extensionActivity> activities:
+    
+    <extensionActivity name="calculateDiscount">
+        <js:snippet>
+            if (goldRatio > 1.0 || silverRatio > 1.0) {
+                throwFault('urn:myprocess', 'IllegalArgumentFault',   
+                        'discount ratios must be <= 1.0');
+            }
+            if (customer.type == 'gold') {
+                po.items.item.price *= goldRatio;
+            } else if (customer.type = 'silver') {
+                po.items.item.price *= silverRatio;
+            } else if (customer.type = 'besteffort') {
+                po.shippingMode = 'snailmail'
+            }
+        </js:snippet>
+    </extensionActivity>