Hello
This post will take you through a demonstration on how to setup and use properties in a Composite
Often you'll have scenarios where you'll need to change/setup certain values at runtime. For ex, adminEmailAddress. During dev, usually the developer would use his mailId but when deployed in production, the admin has to be assigned. How is this addressed?
Using Properties
1. Define properties in Composite.xml against the BPEL process in which you want to use this properties
<component name="EventProcessor" version="1.1">
<implementation.bpel src="EventProcessor.bpel"/>
<property name="bpel.preference.adminEmailAddress" type="xs:string" many="false">admin@xyz.com</property>
...
</component>
Note that bolded bpel.preference should not be changed.
2. Use this property in BPEL
For ex, in the Mail activity, the to address needs to use this value
ora:getPreference('adminEmailAddress')
3. Set this property value in EM
Go to EM --> Weblogic Domain --> rt click on soa_domain--> System MBean Browser
oracle.soa.config --> Server : <Managed Server> --> SCAComposite --> SCAComposite.SCAComponent --> Click on your Process
On the right side, click on Properties
You'll see the property adminEmailAddress, where you can replace whatever value you want.
Thanks for reading the post.
This post will take you through a demonstration on how to setup and use properties in a Composite
Often you'll have scenarios where you'll need to change/setup certain values at runtime. For ex, adminEmailAddress. During dev, usually the developer would use his mailId but when deployed in production, the admin has to be assigned. How is this addressed?
Using Properties
1. Define properties in Composite.xml against the BPEL process in which you want to use this properties
<component name="EventProcessor" version="1.1">
<implementation.bpel src="EventProcessor.bpel"/>
<property name="bpel.preference.adminEmailAddress" type="xs:string" many="false">admin@xyz.com</property>
...
</component>
Note that bolded bpel.preference should not be changed.
2. Use this property in BPEL
For ex, in the Mail activity, the to address needs to use this value
ora:getPreference('adminEmailAddress')
3. Set this property value in EM
Go to EM --> Weblogic Domain --> rt click on soa_domain--> System MBean Browser
oracle.soa.config --> Server : <Managed Server> --> SCAComposite --> SCAComposite.SCAComponent --> Click on your Process
On the right side, click on Properties
You'll see the property adminEmailAddress, where you can replace whatever value you want.
Thanks for reading the post.