Configuring bps.xml
Users can change the default BPEL-specific configurations by editing the bps.xml file using the information given below.
File Details
- File Name: bps.xml
- Location:
$PRODUCT_HOME\repository\conf
- Purpose: To configure important aspects of the business process server such as data sources, the threads, BPEL extensions, process cleanup scheduling etc. Using this file, you can change the default configurations according to your specific business requirements.
XML Elements
Given below are the main XML elements of bps.xml.
<tns:WSO2BPS> <tns:DataBaseConfig> <tns:DataSource> <tns:JNDI> <tns:ProcessDehydration> <tns:MaxAge> <tns:TransactionFactory> <tns:EventListeners> <tns:listener> <tns:MexInterceptors> <tns:interceptor> <tns:ExtensionBundles> <tns:runtimes> <tns:runtime> <tns:filters> <tns:filter> <tns:OpenJPAConfig> <tns:property> <tns:MexTimeOut> <tns:ExternalServiceTimeOut> <tns:MultithreadedHttpConnectionManagerConfig> <tns:maxConnectionsPerHost> <tns:maxTotalConnections> <tns:Schedules> <tns:Schedule> <tns:cleanup> <tns:filter> <tns:SyncWithRegistry> <tns:InMemoryInstanceTimeToLive> <tns:ODESchedulerThreadPoolSize> <tns:UseDistributedLock> <tns:NodeId> <tns:ODESchedulerConfiguration> <tns:BpelUI>
<tns:WSO2BPS>
XML Syntax | <tns:WSO2BPS> |
Description | The root element of bps.xml which does not have attributes defined. Each of its child elements and their configurations are described below. |
Mandatory/Optional | Mandatory |
<tns:DataBaseConfig>
XML Syntax | <tns:DataBaseConfig> |
Description | Using the DataBaseConfig element you can configure the data sources used by the business process server for storing process/instance data. Check each of its sub elements for details of each configuration. |
Mandatory/Optional |
<tns:DataSource>
XML Syntax | <tns:DataSource name=""> <tns:JNDI contextFactory="" providerURL=""/> </tns:DataSource> |
Description | Database Configuration for WSO2 BPS BPEL Engine's Persistence Storage |
Mandatory/Optional | Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'name' attribute of <tns:DataSource> element | Should have the data source name defined for the business process server. This name is typically specified in <BPS_HOME>/repository/conf/datasources.properties file. | string | none | none | mandatory | N/A |
'contextFactory' attribute is of the <tns:JNDI> sub element | Defines the JNDI context factory of the Data Source. | string | none | none | mandatory | N/A |
'providerURL' attribute is of the <tns:JNDI> sub element | Defines the JNDI provider url. | string | none | none | mandatory | N/A |
Sample Implementations
<tns:DataSource name="bpsds"> <tns:JNDI contextFactory="com.sun.jndi.rmi.registry.RegistryContextFactory" providerURL="rmi://localhost:2199"/> </tns:DataSource>
<tns:ProcessDehydration>
XML Syntax | <tns:ProcessDehydration maxCount="" value=""> <tns:MaxAge value="0"/> |
Description | One technique to reduce memory utilization of BPS engine is process hydration and dehydration. |
Mandatory/Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'maxCount' attribute of the <tns:ProcessDehydration> element | set the maximum deployed process count can exist in memory at a particular time | int | none | none | mandatory | |
'value' attribute of the <tns:ProcessDehydration> element | enable or disable dehydration of processes. | boolean | none |
| mandatory | |
'value' attribute of the <tns:MaxAge> element | set the maximum age of a process before it is dehydrated. should be declared in milliseconds. | int | none | none | mandatory |
Sample Implementations
<tns:ProcessDehydration maxCount="100" value="true"> <tns:MaxAgevalue="300000"/> </tns:ProcessDehydration>
<tns:TransactionFactory>
XML Syntax | <tns:TransactionFactory class=""/> |
Description | specify an external or custom transaction factory class to take care of transactions |
Mandatory/Optional | optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
class | name of the class | string | none | none | mandatory |
Sample Implementations
<tns:TransactionFactory class="class name"/>
<tns:EventListeners>
XML Syntax | <tns:EventListeners> |
Description | BPS lets you register your own event listeners to analyse all produced events and do whatever you want to do with them. To create a listener, you just need to implement the org.apache.ode.bpel.iapi.BpelEventListener interface. |
Mandatory/Optional | Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'class' attribute of the <tns:listener> element | name of the custom event listener class | string | none | none | mandatory |
Sample Implementations
<tns:EventListeners> <tns:listenerclass="org.wso2.bps.samples.eventlistener.CustomEventListener"/> </tns:EventListeners>
<tns:MexInterceptors>
XML Syntax | <tns:MexInterceptors> <tns:interceptor class=""/> |
Description | Message Exchange Interceptors can be used to pull out data as well as to manipulate them by enabling interception of parntner/server invocations. MEX interceptors can be used in four different situations.
|
Mandatory/Optional | Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'class' attribute of the <tns:interceptor> element | name of the class.You need to implement MessageExchangeInterceptor interface to implement a custom message exchange interceptor | string | none | none | mandatory |
Sample Implementations
<tns:MexInterceptors> <tns:interceptor class="class name"/> </tns:MexInterceptors>
<tns:ExtensionBundles>
XML Syntax | <tns:ExtensionBundles> |
Description | <specify the purpose of this element> For configuration details and samples, refer to each of its sub elements. |
Mandatory/Optional | optional |
<tns:runtimes>
XML Syntax | <tns:runtimes> <tns:runtime class=""/> </tns:runtimes> |
Description | |
Mandatory/Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'class' attribute of the <tns:runtime> element |
Sample Implementations
<tns:runtimes> <tns:runtime class="org.wso2.bps.SampleExtensionRuntime"/> </tns:runtimes>
<tns:filters>
XML Syntax | <tns:filters> <tns:filter class=""/> </tns:filters> |
Description | |
Mandatory/Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'class' attribute of the <tns:runtime> element |
Sample Implementations
<tns:filters> <tns:filter class="org.wso2.bps.SampleCorrelationFilter"/> </tns:filters>
<tns:OpenJPAConfig>
XML Syntax | <tns:OpenJPAConfig> <tns:property name="" value=""/> |
Description | |
Mandatory/Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'name' attribute of the <tns:property> element | ||||||
'value' attribute of the <tns:property> element |
|
Sample Implementations
<tns:MexTimeOut>
XML Syntax | <tns:MexTimeOut value=""/> |
Description | Message exchange timeout |
Mandatory/Optional | optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
value | Message exchange timeout value in milliseconds | int | 120000 | none | mandatory |
Sample Implementations
<tns:MexTimeOut value="120000"/>
<tns:ExternalServiceTimeOut>
XML Syntax | <tns:ExternalServiceTimeOut value=""/> |
Description | External Service invocation timeout |
Mandatory/Optional | mandatory |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
value | External Service invocation timeout value | int | 60000 | none | mandatory |
Sample Implementations
<tns:ExternalServiceTimeOut value="60000"/>
<tns:MultithreadedHttpConnectionManagerConfig>
XML Syntax | <tns:MultithreadedHttpConnectionManagerConfig> |
Description | |
Mandatory/Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'value' attribute of the <tns:maxConnectionsPerHost> element | ||||||
'value' attribute of the <tns:maxTotalConnections> element |
Sample Implementations
<tns:Schedules>
XML Syntax | <tns:Schedules> |
Description | Process instance cleanup feature in WSO2 Business Process Server allows to configure periodic process instance cleanup tasks based on various process instance properties to remove process instance data from WSO2 BPS persistence storage. Refer - http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html to declare cron expression formats. |
Mandatory/Optional |
List of Attributes
Attribute Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | Notes |
---|---|---|---|---|---|---|
'when' attribute of the <tns:Schedule> element |
Sample Implementations
1. Following sample configuration schedules a cleanup task at 5:11 PM every day to clean completed process instances.
<tns:Schedules> <tns:Schedule when="0 11 17 * * ?"> <tns:cleanup> <tns:filter><![CDATA[status=completed]]></tns:filter> </tns:cleanup> </tns:Schedule> </tns:Schedules>
<tns:SyncWithRegistry>
XML Syntax | <tns:SyncWithRegistry> |
Description | By default all the BPEL packages are read from the file system. If you need to Synchronize the file system BPEL repository, set the <tns:SyncWithRegistry> element to true. This checks the timestamp of the BPEL packages in the file system against the BPEL packages in the registry. If they do not match then the BPEL package in the registry is copied to the file system. |
Mandatory/Optional |
Sample Implementations
<tns:InMemoryInstanceTimeToLive>
XML Syntax | <tns:InMemoryInstanceTimeToLive> |
Description | The property 'InMemoryInstanceTimeToLive' can be used to limit the time-to-live of in-memory instances. This setting is useful to avoid memory leaks related to in-memory processes that may get 'stuck' during execution and never terminate (time should be specified in milliseconds). |
Mandatory/Optional |
Sample Implementations
<tns:InMemoryInstanceTimeToLive>600000</tns:InMemoryInstanceTimeToLive>
<tns:ODESchedulerThreadPoolSize>
XML Syntax | <tns:ODESchedulerThreadPoolSize>0</tns:ODESchedulerThreadPoolSize> |
Description | Configure this property to control the number of threads in the ode scheduler thread pool. This value should always be smaller than the maximum number of db connections configured for the bps persistance store data source. If you are using both human tasks and bpel with b4p extension activity configure this values to be less than half of maxActive database connections number. ThreadPoolSize < maxActive Connections => Only using BPEL processes ThreadPoolSize < (maxActive Connections) / 2 => Using both BPEL processes and Human Tasks Always try to provide as much database connections as possible to BPS. |
Mandatory/Optional | Mandatory |
Sample Implementations
<tns:ODESchedulerThreadPoolSize>50</tns:ODESchedulerThreadPoolSize>
<tns:UseDistributedLock>
XML Syntax | <tns:UseDistributedLock>true</tns:UseDistributedLock> |
Description | This property is used to enable hazelcast based synchronization mechanism to prevent instance state from being concurrently modified from multiple bps nodes. |
Mandatory/Optional | Mandatory if clustering is enabled |
Sample Implementations
<tns:UseDistributedLock>true</tns:UseDistributedLock>
<tns:NodeId>
XML Syntax | <tns:NodeId></tns:NodeId> |
Description | You can assign a unique id to identify each node in the cluster using this property. |
Mandatory/Optional | Optional |
Child elements of <tns:ODESchedulerConfiguration>
<tns:ODESchedulerQueueLength>
XML Syntax | <tns:ODESchedulerQueueLength>1000</tns:ODESchedulerQueueLength> |
Description | Maximum number of jobs that can have in the near future todo queue. |
Mandatory/Optional | Optional |
<tns:ODESchedulerImmediateInterval>
XML Syntax | <tns:ODESchedulerImmediateInterval>30000</tns:ODESchedulerImmediateInterval> |
Description | Jobs scheduled with a time that is between now and until immediate interval specified here in milliseconds, will be assigned to the current node in the cluster and placed directly on the todo queue. |
Mandatory/Optional | Optional |
<tns:ODESchedulerNearFutureInterval>
XML Syntax | <tns:ODESchedulerNearFutureInterval>600000</tns:ODESchedulerNearFutureInterval> |
Description | Jobs scheduled with a time that is after immediate interval from now and up until near future interval specified here in milliseconds will be assigned to the current node, but will not be placed on the todo queue. The promoter will pick them up later. |
Mandatory/Optional | Optional |
<tns:ODESchedulerStaleInterval>
XML Syntax | <tns:ODESchedulerStaleInterval>10000</tns:ODESchedulerStaleInterval> |
Description | Stale nodes will be checked in this time interval specified in milliseconds. |
Mandatory/Optional | Optional |
<tns:ODESchedulerTransactionsPerSecond>
XML Syntax | <tns:ODESchedulerTransactionsPerSecond>100</tns:ODESchedulerTransactionsPerSecond> |
Description | Specify the estimated sustained transactions per second capacity of the system. This number is used to determine how many jobs to load from the database at once. e.g. 100 means the system can process 100 jobs per seconds, on average |
Mandatory/Optional | Optional |
<tns:ODESchedulerWarningDelay>
XML Syntax | <tns:ODESchedulerWarningDelay>300000</tns:ODESchedulerWarningDelay> |
Description | Duration used to log a warning if a job scheduled at a particular date time and it is queued to execute after a delay that is more than specified here in milliseconds. |
Mandatory/Optional | Optional |
<tns:ODESchedulerImmediateTransactionRetryLimit>
XML Syntax | <tns:ODESchedulerImmediateTransactionRetryLimit>3</tns:ODESchedulerImmediateTransactionRetryLimit> |
Description | Number of immediate retries, if a transaction failed. |
Mandatory/Optional | Optional |
<tns:ODESchedulerImmediateTransactionRetryInterval>
XML Syntax | <tns:ODESchedulerImmediateTransactionRetryInterval>1000</tns:ODESchedulerImmediateTransactionRetryInterval> |
Description | Interval between immediate retries if a transaction failed. |
Mandatory/Optional | Optional |
Child elements of <tns:BpelUI>
<tns:InstanceViewVariableLength>
XML Syntax | <tns:InstanceViewVariableLength>1000</tns:InstanceViewVariableLength> |
Description | Set the maximum size for a variable in a instance view in kilobytes. Higher sizes may slowdown the instance view rendering in the user interface. Default size is 1000KB. Please note that this only limits the displayed content size of the variable, not the actual size. |
Mandatory/Optional | Optional |
<tns:BpelInstanceDeletionLimit>
XML Syntax | <tns:BpelInstanceDeletionLimit>1000</tns:BpelInstanceDeletionLimit> |
Description | This property specify the maximum number of BPEL process instances that can be deleted in a single delete instance request in a bulk delete. Increase this with caution. It may result in various timeout exceptions. |
Mandatory/Optional | Optional |
<tns:TransactionManagerTimeout>
XML Syntax | <tns:TransactionManagerTimeout></tns:TransactionManagerTimeout> |
Description | Timeout for the BPEL Transaction Manager in seconds. Default is 10 minutes. |
Mandatory/Optional | Optional |