Integrating Oracle Sensor Edge Server (SES) with Oracle BPEL Process Manager (BPEL)

Purpose

This tutorial shows how to integrate Sensor Edge Server with Oracle BPEL Process Manager (BPEL).

Time to Complete

Approximately 60 minutes.

Topics

This tutorial covers the following topics:

 Overview
 Prerequisites
 Configuring Animation Devices from Oracle Sensor Edge Server console
 Defining BPEL Logic
 Configuring Event Flow Dispatcher of SES
 Testing the Integration demo
 Summary
 Related information

Viewing Screenshots

 Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so, depending on your Internet connection, may result in a slow response time.)

Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it.

Overview

The Oracle Sensor Edge Server is a middle-tier component that integrates sensors and other types of command or response indication equipment with applications. Sensors are hardware or software endpoints that make observations of certain changes of state in the environment. The Sensor Edge Server uses these sensors to integrate sensor data and applications.

The Real-Time Enterprise becomes a reality when RFID technology is used to automate business processes such as reconciling shipments received against the Advanced Shipment Notification. Using Oracle BPEL Process Manager, the business process can be modeled such that when the RFID Reader reads the RFID tags for pallets and cases, a reconciliation process is initiated. Different business rules may be applied for reconciliation based on the value of products received. The Oracle BPEL Process Manager provides tools for design, test, debug, and deployment of the business process. The business process can be easily modified and business rules changed with evolution of business needs. The ability to model, test, and optimize business processes provides an opportunity for every business to get high Return on Investment (ROI) on their RFID investments.

  1. You use a remote driver to send events to Oracle Sensor Edge Server (SES).
  2. When events are sent to SES, it will dispatch these events to a remote Oracle BPEL Process Manager server through the EventFlow engine.
  3. When you predefine a rule in Oracle BPEL Process Manager, the rule will check if the incoming data meets some criteria. If the criteria is met, BPEL PM will call another Web Service, provided by SES to send instructions.
  4. SES receives these instructions and forwards these instructions to the animation device.

 

Back to Topic List

Prerequisites

Before starting this tutorial, you should complete the following tasks:

1. Have access to or have installed Oracle JDeveloper 10g. You can download Oracle JDeveloper 10g from here.
2.

Have access to or have installed Oracle Application Server 10g 10.1.3. You can download Oracle Application Server 10g 10.1.3 from here.

3. Have access to or have installed Oracle Sensor Edge Server. You can download Oracle Sensor Edge Server from here.
4. Have access to Oracle BPEL Process Manager. You can download Oracle BPEL Process Manager from here.
5. Applied the patch for SES. The steps to apply the patch are available in the "Applying the Patch to Sensor Edge Server" OBE.
6. Download GateDemo.zip from here and BPEL project EdgeClient.jpr from here.

Back to Topic List

 

Configuring Animation Devices from Oracle Sensor Edge Server console

 

1.

Verify that your OC4J server is running. (You can verify this by using either the Application Server Control or by using opmnctl command).

opmnctl status

If OC4J Server is not running, start the OC4J Server using the following command. Switch to the command prompt, change directory to < edgeserver_home>ORACLE_HOME\opmn\bin and issue the command:

opmnctl startall

 

2.

Open your browser, and enter the following URL:

http://< host name>.< domain>:< port>/edge

For example, http://localhost:8888/edge.

Log in as oc4jadmin with the OC4J administrator password that you specified during installation. Click Login.


3.

This is a new installation, and hence there are no dispatcher or devices configured. To configure the remote device, click Default in the left navigation section.

 

4.

Click Add new device.

 

5.

In the Search and Select: Add new device window, select Remote Driver. Click Select.

 

6.

Click the RemoteDriver1 link.

 

7.

Click Save Changes.

 

8.

When you make any change to an Oracle Sensor Edge Server instance, the SES console displays a message notifying you to restart the Oracle Sensor Edge Server instance by using OracleAS Enterprise Manager. Click the Enterprise Manager link in the message.

 

9.

The Login page for OracleAS Enterprise Manager appears. Enter the OC4J username and password. Click Login.

 

10.

Click the home link on the Cluster Topology page.

 

11.

Click Applications.

 

12.

Select edge, and click Restart.

 

13.

Click Yes on the Confirmation page.

 

14.

The Oracle Sensor Edge Server instance has been restarted successfully.

 

15.

The file, GateDemo.zip is necessary for running this animation demo. Unzip GateDemo.zip to $ORACLE_HOME\j2ee\home\applications\edge\edge\sample. Navigate to $ORACLE_HOME\j2ee\home\applications\edge\edge\sample\GateDemo. Click animation.bat.

 

16.

You should now see this command window.

 

17.

From the Java Swing window, you can see that the animation device is waiting for events now.

 

18.

Restart the RemoteDriver1 device by entering the following URL in a new browser window:

http://<hostname>.<domain>:<port>/edge

Log in as oc4jadmin with the OC4J administrator password that you specified during installation. Click Login.

 

19.

Click RemoteDriver1.

 

20.

Click Start device.

 

21.

You can now see that the AnimationController is waiting for remote events or user actions.

 

Back to Topic List

 

 

Defining BPEL Logic

Using JDeveloper BPEL Designer, you can build, deploy, and test your BPEL process. You define the BPEL logic using JDeveloper BPEL Designer. The logic is that, if the tag ID of the incoming event is a certain ID, then send an event with type 213 and subtype 2 to the RemoteDriver device. Otherwise, send an event with subtype 3 to RemoteDriver1device. After creating the process, you need to deploy the process to BPEL Process Manager so that SES can call it.

1.

Start the BPEL Designer from the Windows Start menu by clicking Start > Programs > Oracle - Oracle_Home > BPEL Process Manager 10.1.2 > JDeveloper BPEL Designer.

 

2.

Right-click Applications in the Navigator window. Select New Application Workspace.

 

3.

In the Create Application Workspace window, enter the following details:

Application Name: EdgeClientCallback
Directory Name: Use the default directory location

Click OK.

 

4.

From the File menu, select Open.

 

5.

Navigate to the E:\Workspace1\EdgeClientCallback directory where you have the sample BPEL process. Select EdgeClientCallback.jpr. Click Open.

 

6.

Now, compile the process and generate the deployment jar file. Right-click the project file and select make.

 

7.

Review the compile result in the log window.

 

8. Before deploying this process to the BPEL PM server, you need to start the BPEL PM server.
Select Start > Programs > Oracle-OraBPELPM > Oracle BPEL Process Manager 10.1.2 > Start BPEL PM Server.

 

9.

After BPEL PM Server is started, you can test the connection from BPEL designer.
Click View and select Connection Navigator.


10.

Select BPEL Process Manager Server, and double-click LocalBPELServer. In the popup window, select the Test Connection tab, and then click the " Test Connection" button.

 

11.

The Status section of the popup window should display Success. Click OK.

 

12.

Now, since the BPEL Server is active, we can deploy the process from JDeveloper directly.
Click the Application tab. Right-click the project name (EdgeClientCallback), select Deploy > LocalBPELServer > Deploy to Default Domain.

 

13.

In the Password prompt, enter the password. The default password is bpel. Click OK.

 

14.

You can review the deployment result in the log window.

 

15.

After the process is deployed, you can go to the BPEL console to look for the WSDL URL of the process that you created. Open a new browser window, and enter the BPEL console URL as follows:

http://localhost:9700/BPELConsole

 

16.

From the dashboard, locate the newly created process called EdgeClientCallback. Click this process.

 

17.

Select the WSDL tab. You find the WSDL URL and the endpoint URL. These two URLs will be used by SES dispatcher.

 

 

 

Back to Topic List

Configuring Event Flow Dispatcher of SES

The Event Flow Dispatcher is automatically configured. It does not need any parameter. It will load the eflow.xml file during startup. The eflow.xml file is located under $SES_HOME/j2ee/home/applications/edge/edge/config.

1.

The XML is defined as follows:

<eflow>
<components>
<component name="callBpel" class="oracle.edge.tools.eflow.impl.BpelState" />
<component name="matchEvent" class="oracle.edge.tools.eflow.impl.MatchEventState" />
<component name="sendEvent" class="oracle.edge.tools.eflow.impl.SendEventState" />
<component name="callWs" class="oracle.edge.tools.eflow.impl.WsState" />
</components>

<entry>
<onEvent state='A.check'/>
</entry>
. . . . . . . .
. . . . . . . .

 

Back to Topic List

Testing the Integration demo

To test the demo, perform the following steps:

1.

In the animation device window, click Good User. The green light lights up.

 

2.

If you click Bad User, the red light lights up.

 

3.

Open a browser window, and log in to the BPEL console to see the run-time instance.

 

4.

In the bottom right corner, you will find recent completed instance. Click the top one. It will show detailed information about this instance.

 

Back to Topic List

 

Summary

In this lesson, you have learned how to:

 Integrate Sensor Edge Server with Oracle BPEL Process Manager (BPEL)

Back to Topic List

Related Information

To learn more about Sensor Edge Server Enterprise Edition, refer to additional OBEs on the OTN Web site

 To ask a question about this OBE tutorial, post a query on the OBE Discussion Forum

Back to Topic List

 Place the cursor over this icon to hide all screenshots.

 

 

 

Left Curve
Popular Downloads
Right Curve
Untitled Document