By now, you have already got a SOA Server up & Running, and also, you have now successfully connected your jDeveloper to BPEL Server.
In this article, you will see the steps for
a) Creating a new Business Event which will be raised in EBS to initiate BPEL Process
b) Creating a BPEL Process that listens to Business Events from an Oracle eBusiness Suite environment.
You will also find an overview of how event message is propagated from Oracle eBusiness Suite to BPEL Server.
a. Download PowerPoint 2003 viewer from this link
b. Install PowerPoint 2003 viewer
c. Save the PowerPoint slide from this website on your PC
d. Open the PowerPoint side using the PowerPoint 2003 viewer that you have installed.
First some questions
Do I always need to create a new Business Event in Oracle?
Not really, you can use any seeded Business Event in Oracle Apps. For example, in R12 there are approximately 1500 Business Events. In fact most likely, you will be using a seeded Business Events in implementations.
When the business event is raised with a Payload[call it message], how does BPEL Server read that event/payload?
The Oracle Apps Business events that are listened by BPEL server are placed in a special Queue, call it BPEL Queue. What this means is that, not every business event in Oracle Apps gets forked to this BPEL Queue. Only those Business Events that are registered via Oracle Apps Adapter are placed onto the BPEL Queue.
What exactly is a BPEL Queue?
It is nothing but an Oracle advanced Queue. Just like any other queue, a message is sent[written] to the queue by first Process, and the same message getsdequeued[read] by some other process. For persistence[to retain the message], Oracle's AQ uses tables. In this particular case, the message is stored in a table named WF_BPEL_QTAB, from where it gets transported to BPEL Server.
How do I know if a specific Business Event message will be transferred to BPEL Queue?
If a Business Event is integrated with BPEL Server, then such Business Event will have a subscription that moves the message from pl/sql deferred queue to BPEL Queue via agent named WF_BPEL_QAGENT. By default, this subscription will be a deferred subscription, which means that transfer to BPEL Queue will take 2-3 minutes.
But then what is pl/sql deferred queue?
This is the generic Advanced Queue used by Workflows Engine withing Oracle eBusiness Suite.
So effectively, first a business event gets raised and its message/payload is placed on pl/sql deferred queue. Next this message is copied to BPEL Queue.
Which column of table WF_BPEL_QTAB is used for capturing the message /payload of the event?
This table, has a column named USER_DATA. The data type of this column is WF_EVENT_T.
How will BPEL process parse this Message Payload from Business event?
The Oracle Apps Adapter generates a XML Schema Definition file called APPS_WF_EVENT_T.xsd. You may also download the xsd file from this link
This XML schema definition file matches to the structure of WF_EVENT_T which happens to contain the payload/message for the business event alongside other event information.
What will be the payload in this specific example?
<?xml version ="1.0" encoding ="ASCII"?>
<ap_bank_accounts>
<bank_branch_id>1000</bank_branch_id>
<bank_account_number>XXXX</bank_account_number>
<changed_by_user_id>0</changed_by_user_id>
</ap_bank_accounts>
What are the steps for creating Business Event in this example?
1. Login to Workflow Administrator Web Applications
2. Click on Business Event Menu
3. Create a business event xx.oracle.apps.soa.integration.demo
See the powerpoint presentation below
Click here to view the presentation for these steps
What are the steps for creating BPEL Process?
Steps are shown in the powerpoint presentation below, but are also summarised as
a. Create an Application in jDeveloper and create an empty BPEL Process
b. Create an Oracle Applications Adapter within the BPEL Process.
While doing this, you will be prompted to select the Database Connection for Oracle Apps/EBS.
Select the connection that you created in Part-2 of this series, i.e. R124DBConn
Next, you will be presented with list of all the pl/sql API's and also the Business Events.
Here, you will select Business event xx.oracle.apps.soa.integration.demo
Also, when creating this adapter, you need to select the schema definition into which WF_EVENT_T message will be absorbed.
c. As soon as you click on Finish button for Apps Adapter, a Create Partner Link Wizard will appear.
You need to create the default PartnerLink.
d. Create a receive activity in the BPEL Process. This is because the BPEL process must have a start activity. This start activity will be “receive” activity
e. In this receive activity, you need to do 4 things
1. Attach the partnerlink of Step c.
2. Operation must be DEQUEUE, as we wish to start this BPEL process when event message is dequeued.
3. Check the checkbox "Create Instance"
4. Create a default variable that absorbs the dequeued event message.
f. Rebuild the BPEL project
Click here to view the presentation for steps that shows steps for creating the BPEL Project
written by Chandra , May 27, 2008
written by Jayesh Raut , May 28, 2008
written by Anil Passi- , May 28, 2008
The main difference is, ESB is lightweight and BPEL isn't.
Reason being that in BPEL, each step of the BPEL process is stored in persistance layer called Database.
Technically this called dehydration, think of this like Oracle workflow storing its each activity in WF tables.
Advantage of dehydration is that if BPEL server crashes, you can restore the state of each process as they were just prior to the crash.
ESB however is like a channel through which messages can flow, transform and be sent to their end points.
There is no dehydration in ESB- hence it is lightweight. However, if your ESB server were to crash then you will loose the state of those messages "in process".
Thanks
Anil Passi
written by Sajid , May 29, 2008
Create-BPEL-Project-For-Business-Event.pps at the end it says about setting up the connection pool to Oracle apps, I could not find that information anywhere.
written by Sajid , May 29, 2008
Thanks
Sajid
written by Hasan , June 01, 2008
Thanks for writing a valuable article. well i am having following problem
I don't find the function to create "Create Business event" when i selected the responsibility of "Workflow" and then "Business Event in workflow administrator,
I am using apps 11.5.10.2 with vision cooperation.
I logged in with username/password --> "operations/welcome"
then selected the responsibility of "workflow Administrator Web Application", i can see the main function
"Business Events" when i selected the business event then there is no function to create business event.
Can u help me out
written by Hasan , June 02, 2008
Well i have another issue now when i deploying the process from jdeveloper , i am having following error
BUILD FAILED
D:JDeveloperjdevhomemyworkxxTestBusinessEventAppxx TestBusinessEventProcessuild.xml:79: A problem occured while connecting to server "hadi-hassan2" using port "8888": bpel_xxTestBusinessEventProcess_1.0.jar failed to deploy. Exception message is: ORABPEL-09903
Could not initialize activation agent.
An error occured while initializing an activation agent for process "xxTestBusinessEventProcess", revision "1.0".
Please ensure that the activation agents are configured correctly in the bpel deployment descriptor (bpel.xml).
oracle.tip.adapter.fw.agent.jca.JCAActivationAgent: java.lang.reflect.InvocationTargetException
at com.collaxa.cube.engine.core.BaseCubeProcess.startAllActivationAgents(BaseCubeProcess.java:370)
at com.collaxa.cube.engine.deployment.DeploymentManager.activateDefaultRevision(DeploymentManager.java:1577)
at com.collaxa.cube.engine.deployment.DeploymentManager.setDefaultRevision(DeploymentManager.java:1536)
at com.collaxa.cube.engine.deployment.DeploymentManager.deployProcess(DeploymentManager.java:886)
at com.collaxa.cube.engine.deployment.DeploymentManager.deploySuitcase(DeploymentManager.java:72
at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.deploySuitcase(BPELDomainManagerBean.java:445)
-----------------------------------------
Moreover i tried to deply the "bpel_xxTestBusinessEventProcess_1.0.jar" from the bpel control(runtime) . i get the same error of "Could not initialize activation agent."
Regards
Hasan
written by Hadi Hasan , June 03, 2008
Well i followed all the four articles and also i tested the "Connection Pools" and data source , both are verified successfully. Moreover i used the same connection details which i used in Jdeveloper The JNDI name is also correct.
Regards
Hasan
written by Anil Passi- , June 03, 2008
In this case we need to config some debugging parameters and the check domain.log file.
This should pinpoint the reason for the error.
I will cover debugging as next topic.
Cheers
Anil
written by Satya Kumar , June 03, 2008
As you described the difference between ESB and BPEL, that "BPEL process is stored in persistance layer called Database"
Could you please elaborate the persistance layer, because I want to make use of persistance layer in case of any service down, exception etc.
I would like to use the data in previous state to be re-used.
--Satya
written by Hadi Hasan , June 04, 2008
Ok Anil i am waiting for the debugging article in order to resolve the problem.
Regards
Hasan
written by Rinkesh , June 05, 2008
Thanks for such a nice article on Business Events.Links provided for pps files are not working can you please enable them.
thanks
Rinkesh
written by peter , June 17, 2008
written by Anil Passi- , June 17, 2008
In case you are on MS Office 2007, then you need to download 2003 Presentation viewer, as mentioned.
written by Ashok Gunasekaran , August 05, 2008
I find is very difficult to debug my BPEL Process which is triggered by Business Event. The Business Event places a record into WF_BPEL_QTAB.
But my BPEL Process is not getting invoke and the record still lies in the Queue itself.
I am not able to find, why it happends. Whats the life cycle of the data that gets into the WF_BPEL_QTAB? Where it goes? where it gets stored when Process is triggered?
Kindly Help.






Thanks for the nice series of articles on Business Events.
I have a question on Deferred queue, when an event is fired, does the message always go to Deferred Queue?
While creating a Subscription, I have given a phase value of 20 which means it is synchronous. But I noticed the message was still going to Deferred Queue then to the registered queue.
Any idea on this...would appreciate your input.
Thanks/Chandra