Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Business process deployment capability is provided by the following feature in the WSO2 feature repository:

...

If process management capability is not included in your product by default, you can add it by installing the above feature using the instructions given in section, Feature Management. Follow the instructions below to deploy a business process.

...

4. The "Deployed Processes" page opens with the newly-added process listed. For example,


  • Package Name:   The name of the package containing at least the deployment descriptor and one or more process definitions (BPEL), WSDL and XSDs.
  • Process ID:
  • Version: If a package with an existing name is uploaded, the processes in the package will be versioned. All old processes in the package will be retired and new version deployed. Since there is only package-level versioning available, the new package should include all the processes defined in the old package, even though you may only need to update a single process in that package.
  • Status: Status of the process. Can be either "Active" or "Retired".
  • Deployed Date: Date and time of the package deployment.
  • Manage: A newly-created process has status as "Active", which can be retired by clicking on the "Retire" link. Once a process is retired, a new instance of it cannot be created.

5. Click the "Process ID" to access its information dashboard. For example,

Image Added

It typically contains the following sections:

Process Details
Anchor
process
process

Image Added

Instance Summary
Anchor
summary
summary

When a process is triggered by a user through the TryIt tool for example, an instance of that process is created in the BPS. Each process can have numerous instances. They are summarized graphically with statuses in summary as follows:

Image Added

For more information on process instances, refer to section Process Instances.

Quality of Service Configuration
Anchor
QoS
QoS

Image Added

For instructions on configuring QoS, refer to:

WSDL Details
Anchor
wsdl
wsdl

Image Added

<To be added>

TryIt

The "Try this service" link directs you to a new window where the operations available the BPEL service is displayed. Using this window, you can check whether the service provides the desired output. The URL for invoking the TryIt tool can also be appended by concatenating the endpoint URL of your service with the following string: 

  • ?tryit : Ajax client for simple, generic interactions with the service.    

The TryIt link will be enabled in your service dashboard only if "org.wso2.carbon.tryit" feature of the WSO2 feature repository is installed in your Carbon instance. For instructions on triggering the TryIt tool, refer to Testing WSDLs .

WSDL 1.1 and WSDL 2.0

Click on the links to the WSDL 1.1 and the WSDL 2.0 to open the page with XML configuration. The URLs for the WSDL files of the service can also be appended by concatenating the endpoint URL of the service with the following strings:

  • ?wsdl2 : WSDL 2.0 description of the service
  • ?wsdl : WSDL 1.1 description of the service

The WSDLs describe the operations the service exposes, the structure of the XML that is sent and received by each operation, and how to communicate with the service to retrieve the XML content. By default, six different types of endpoints are deployed. Each of these endpoint types are represented by the WSDL 2.0 <endpoint> elements of the service, and by the <binding> elements which these endpoints refer to. The default six types of endpoints are as follows:

  • SOAP 1.2 over HTTP
  • SOAP 1.1 over HTTP
  • Plain old XML/REST over HTTP
  • SOAP 1.2 over HTTPS
  • SOAP 1.1 over HTTPS
  • Plain old XML/REST over HTTPS

Process Definition
Anchor
def
def

BPEL code for the process. For example,

Image Added

Process Visualization 
Anchor
visual
visual

Graphical workflow of the process. For example,

Image Added

6. Once the process is deployed in the BPS, it will be exposed as a BPEL service. Click "Services -> List" menu under the "Main" menu.

67. The "Deployed Services" window opens with the newly-deployed service listed. For example,

...

From here, the BPEL service can be managed just like any other Web service. For instructions, refer to section Service Management .

Info
titleNote

Instead of using the management console, you can deploy a BPEL process manually by copying the zipped file to the $CARBON_HOME/repository/deployment/server/bpel directory. For instructions on preparing the process zip file, refer to section Preparing for Process Deployment .

Deployment Best Practices

The default distribution of WSO2 BPS comes with an embedded H2 database as the BPEL engine's persistence storage along with other settings suitable for development environment. However, it is recommended that some of these configurations be changed when moving to production. Configuration setting may change depending on the number of requests BPS is going to handle per second, your auditing and monitoring requirements, performance requirements and nature of your processes.

Given below are the key points to note:

1. Configure an external database server such as MySQL as the persistence storage instead of embedded H2 database. Althogh slight performance gains can be experienced when using simple BPEL processes with H2 database, it cannot handle multiple concurrent requests and complex processes with the same efficiency.

2. Configure 'multi-threaded Http connection manager' connection pool settings to suit your BPEL processes.Typically, the HTTP connection manager should be configured to be in sync with the concurrent HTTP connections in the BPS server.

There are two configurations in Http connection manager. One is 'max total connections' and other is 'max total connection per host'. These settings depend on the number of concurrent requests BPS needs to handle, and the number of external service calls per process instance. For example,

Code Block
languagehtml/xml
<tns:WSO2BPSxmlns:tns="http://wso2.org/bps/config">
    ...
    <tns:MultithreadedHttpConnectionManagerConfig><tns:maxConnectionsPerHostvalue="20"/><tns:maxTotalConnectionsvalue="200"/></tns:MultithreadedHttpConnectionManagerConfig>
    ...
</tns:WSO2BPS>

3. Configure BPEL process persistence. If a process is implemented in the request-response interaction model, use in-memory processes instead of persistence processes. This decision mainly depends on the specific business use-case.

4. Configure even-filtering at process and scope level. By reducing the number of events generated, a lot of database resources can be saved.

5. Use process-to-process communication. This reduces the overhead introduced by additional network calls, when calling one BPEL process from another deployed in the same BPS instance.

6. Configure even-filtering at process and scope level. A lot of database resources can be saved by reducing the number of events generated.

7. Configure process instance cleanup. A large number of process instance data will be accumulated in the BPEL engine's persistence storage if processes are persisted. Process instance cleanup is used to reduce performance overhead introduced by database size. The process instance cleanup feature can be configured with periodic cleanup tasks based on various process instance properties, to remove data from WSO2 BPS persistence storage.

The 'Schedules' section in bps.xml can be used to configure instance cleanup. The 'Schedules' section can contain multiple 'Schedule' elements with multiple 'cleanup' elements. In each 'Schedule' element, the attribute 'when' states the time that the instance cleanup task gets executed. Time is configured using cron expressions. Inside the cleanup element, filter elements can be used with various instance properties, which help select the instance to be deleted.

For example, the following code schedule is configured to initiate a cleanup task at 5:11 PM every day to clean completed process instances.

Code Block
languagehtml/xml
<tns:Schedules>
    <tns:Schedule when="0 11 17 * * ?">
           <tns:cleanup>
                <tns:filter><![CDATA[status=completed]]></tns:filter>
           </tns:cleanup>
    </tns:Schedule>
</tns:Schedules>

 

...

Excerpt
hiddentrue

Instructions to add a BPEL process in WSO2 BPS and manage it as a service.