This documentation is for WSO2 Enterprise Integrator version 6.5.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
||
Skip to end of metadata
Go to start of metadata

The is a sample extension that allow users to read external values from either a property file or from registry into a BPEL process instance. Accompanied PropertyReadExt.properties file is a sample properties file used to demonstrate the usage.  

How to run  

  1. Clean and build the following with maven https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/bps/3.2.0/modules/samples/product/bpel-property-reader/  
  2. Copy the created jar file to the <EI_HOME>/wso2/lib directory.
  3. Add the following configuration entry to bps.xml in the <EI_HOME>/wso2/business-process/conf directory.

    <tns:WSO2BPS xmlns:tns="http://wso2.org/bps/config">
    …
    <tns:ExtensionBundles>
       <tns:runtimes>
       <tns:runtime class="org.wso2.bps.samples.propertyreader.PropertyReaderExtensionBundle"/>
       </tns:runtimes>
    </tns:ExtensionBundles>
    ...
    </tns:WSO2BPS>

     

  4. Copy  PropertyReaderExt.properties  into the <EI_HOME>/wso2/business-process/conf directory. 
  5. Restart the server if the server is already running. Now you are ready to use the property-reader extension in your BPEL process.
  6. Get the property-reader BPEL sample from this location.  
  7. Extract the PropertyReader_1.0.0.zip and upload the sample.properties to the registry (either config or governance registry) or keep in the file system.
  8. Deploy the PropertyReader BPEL process .
  9. Invoke the process and compare the results with sample.properties configurations.

In the PropertyReader_1.0.0/PropertyReader.bpel config

  • Declare the Extension Activity as:

    <bpel:extensions>
         <bpel:extension namespace="http://wso2.org/bps/extensions/propertyReader" mustUnderstand="yes" />
    </bpel:extensions>


  • Assign the properties to variables:

    <bpel:extensionActivity>
        <propr:readProperties location="conf:sample.properties">
            <property name="property1">
                <to variable="test"></to>
            </property>
            <property name="property2">
                <to variable="test2"></to>
            </property>
        </propr:readProperties>
    </bpel:extensionActivity>

     

  • No labels