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:

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.

Posted by Surya on July 26, 2008 at 03:46 AM PDT #

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

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

Thanks in advance

Posted by guest on August 22, 2011 at 06:19 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Principal Product Manager

Search

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