« Recursively replacing a string in all files in a directory [Linux] | Main | Obtaining the Execution Times of BPEL Processes over a period of time »

Dynamically updating bpel.xml properties within your BPEL Process

There are different properties that you could actually update in your process descriptor. They are a) The Configuration properties b) The preference properties c) The partnerlink properties. These properties are illustrated below.






  1. <BPELSuitcase>  
  2.   <BPELProcess id="UpdatePropertyProcess" src="UpdatePropertyProcess.bpel">  
  3.     <partnerLinkBindings>  
  4.       <partnerLinkBinding name="client">  
  5.         <property name="wsdlLocation">  
  6.           UpdatePropertyProcess.wsdl   
  7.         </property>  
  8.         <property name="partnerlinkProperty1">  
  9.           valueOfPartnerlinkProperty 1   
  10.         </property>  
  11.       </partnerLinkBinding>  
  12.     </partnerLinkBindings>  
  13.      <preferences>  
  14.        <property name="preferenceProperty1" encryption="plaintext">  
  15.          valueOfPreferenceProperty1   
  16.        </property>  
  17.      </preferences>  
  18.      <configurations>  
  19.       <property name="configProperty1" encryption="plaintext">  
  20.         valueOfConfigProperty1   
  21.       </property>  
  22.       </configurations>  
  23.    </BPELProcess>  
  24. </BPELSuitcase>  

To update these properties dynamically within the BPEL Process, you can use a Java embedding within the process, as shown below.






  1.   
  2. try {   
  3.   getLocator().lookupProcess ("UpdatePropertyProcess").   
  4.                  getDescriptor ().   
  5.                   getConfigurations().   
  6.                     setPropertyValue ("configProperty1",   
  7.                      "newValueOfConfigPropertyValue1");   
  8.   getLocator().lookupProcess ("UpdatePropertyProcess").   
  9.                   getDescriptor ().   
  10.                    getPreferences().   
  11.                     setPropertyValue ("preferenceProperty1",   
  12.                       "newValueOfPreferenceProperty1" );   
  13.   getLocator().lookupProcess ("UpdatePropertyProcess").   
  14.                   getDescriptor ().   
  15.                    getPartnerLinkBindings().   
  16.                      getPartnerLinkBinding ("client").   
  17.                        setPropertyValue ("partnerlinkProperty1",   
  18.                        "newValueOfPartnerlinkProperty 1");   
  19.  }   
  20.  catch(Throwable ex) {   
  21.  }   
  22.    

Click here to download the Sample BPEL Process project.

Comments (1)

Surya:

Hi Ram,

I have used the BPEL Process provided by you.But I could not update the Partner link properties dynamically.I can update the other two properties.

thanks.
Surya.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on April 15, 2008 2:42 PM.

The previous post in this blog was Recursively replacing a string in all files in a directory [Linux].

The next post in this blog is Obtaining the Execution Times of BPEL Processes over a period of time.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle