X

Dynamically updating bpel.xml properties within your BPEL Process

Ramkumar Menon
Director, Product Strategy

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.

Join the discussion

Comments ( 2 )
  • Surya Saturday, July 26, 2008
    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.
  • guest Tuesday, August 23, 2011

    I want to know why the below property is used in bpel.xml file.

    <property name="Invocation Mode">local</property>

    Thanks in advance


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha