Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

Contact Us

SOA
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new Click here to raise Support Ticket. Get reply within 48 hours.

Search Courses

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

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.

If you aren't able to view presentations in this article, then do the following
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





Anil Passi

Comments   

0 #1 Chandra 2008-05-26 12:05
Anil,

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
Quote
0 #2 Anil Passi 2008-05-26 18:28
Hi Chandra,

A very good question this one, I noticed the same behavior as cited by you.

The Subscription that gets created by the Apps Adapter moves the Business event from One Advanced Queue to Another.
This happens via rule function WF_RULE.DEFAULT _RULE, that routes the message from deferred queue to WF_BPEL_QAGENT.

Now coming back to your question, it takes approx 3minutes to move the message to BPEL Queue, despite setting the phase of subscription less than 99...
Reason - WF_RULE.DEFAULT _RULE makes call to wf_event.send, and it is this api that sends your message to BPEL Queue.
wf_event .send delivers the message asynchronously to the TO_AGENT[in this case BPEL Agent Listener] by AQ propagation.
Pl ease note that event is being propagated to the BPEL queue asynchronously [not synchronously], and this is where your timelapse occurs.

Thanks ,
Anil Passi
Quote
0 #3 Anil Passi 2008-05-26 18:44
Further to my answer above, please find the documentation of wf_event.send

/*
** send - send event message to agent
**
** The event's FROM_AGENT specifies an output agent/queue upon which
** the message should be placed. The event's TO_AGENT_LIST specifies
** the message recipients for propagation.
**
** The message will be asynchronously delivered to the
** TO_AGENT by AQ propagation. If the FROM_AGENT is not specified,
** the system will automatically enqueue the message to an output agent
** that matches the recipient's queue type.
*/
/*#
* Sends an event message from one agent to another. If the event message
* contains both a From Agent and a To Agent, the message is placed on
* the outbound queue of the From Agent and then asynchronously delivered
* to the To Agent by AQ propagation, or whichever type of propagation is
* implemented for the agents' protocol. If the event message contains a
* To Agent but no specified From Agent, the message is sent from the
* default outbound agent that matches the queue type of the To Agent. If
* the event message contains a From Agent but no specified To Agent, the
* event message is placed on the From Agent's queue without a specified
* recipient.
* @param p_event Event Message to Send
* @rep:scope public
* @rep:lifecycle active
* @rep:displaynam e Send Event
* @rep:compatibil ity S
* @rep:ihelp FND/@evtapis#a_ evsend See the related online help
*/
PROCEDURE send(p_event in out nocopy wf_event_t);
Quote
0 #4 Chandra 2008-05-27 09:45
Thanks Anil for the explanation.
Quote
0 #5 Jayesh Raut 2008-05-28 16:49
Whats the difference between ESB process and a BPEL process?
Quote
0 #6 Anil Passi- 2008-05-28 17:02
Good question, considering there is quite some overlap between the functionalities in BPEL and ESB

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.
Techn ically this called dehydration, think of this like Oracle workflow storing its each activity in WF tables.

Advant age 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".

Than ks
Anil Passi
Quote
0 #7 Sajid 2008-05-29 12:02
I was following your presentation on
Create-BPEL-Pr oject-For-Busin ess-Event.pps at the end it says about setting up the connection pool to Oracle apps, I could not find that information anywhere.
Quote
0 #8 Anil Passi 2008-05-29 12:05
Hi Sajid

Sorry, I was busy, I will post the connection pool presentation tonight.

I think I will complete this series with 2-3 more articles.

Chee rs,
Anil Passi
Quote
0 #9 Sajid 2008-05-29 15:06
I am using out of the box business event oracle.apps.ar. hz.PartySite.cr eate and I have created and configured the adapter in Jdev. but I am still unable to kick off my bpel process when I fire up my business event. Do I have to create a business event agent in Ebiz

Thanks
Sa jid
Quote
0 #10 Anil Passi 2008-05-29 18:46
Hi Sajid

If this isn't for production sdevelopment, then i suggest you wait a couple of days for me to complete this series

In the meantime try this
1. Ensure that JNDI Name for Apps Adapter in SOA Server(Runtime) has been created properly
2. Check the debug log file to see the messages from apps adapter.

Thank s,
Anil Passi
Quote
0 #11 Hasan 2008-06-01 02:49
Hi Anil Passi
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/passwo rd --> "operations/wel come"
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
Quote
0 #12 Anil Passi 2008-06-01 13:37
Hi Hasan

In case you are on development system then run the below commands in sqlplus
update wf_resources set text = '*' where name = 'WF_ADMIN_ROLE' ;
commit;

Now log into "Workflow Administrator Web Application" and you should now see the option to add business events.

Thanks ,
Anil Passi
Quote
0 #13 Hasan 2008-06-02 08:18
Hi Anil thnaks for the reply
Well i have another issue now when i deploying the process from jdeveloper , i am having following error

BUILD FAILED
D:\JDeve loper\jdevhome\ mywork\xxTestBu sinessEventApp\ xxTestBusinessE ventProcessuil d.xml:79: A problem occured while connecting to server "hadi-hassan2" using port "8888": bpel_xxTestBusi nessEventProces s_1.0.jar failed to deploy. Exception message is: ORABPEL-09903
C ould not initialize activation agent.
An error occured while initializing an activation agent for process "xxTestBusiness EventProcess", revision "1.0".
Please ensure that the activation agents are configured correctly in the bpel deployment descriptor (bpel.xml).
ora cle.tip.adapter .fw.agent.jca.J CAActivationAge nt: java.lang.refle ct.InvocationTa rgetException
a t com.collaxa.cub e.engine.core.B aseCubeProcess. startAllActivat ionAgents(BaseC ubeProcess.java :370)
at com.collaxa.cub e.engine.deploy ment.Deployment Manager.activat eDefaultRevisio n(DeploymentMan ager.java:1577)
at com.collaxa.cub e.engine.deploy ment.Deployment Manager.setDefa ultRevision(Dep loymentManager. java:1536)
at com.collaxa.cub e.engine.deploy ment.Deployment Manager.deployP rocess(Deployme ntManager.java: 886)
at com.collaxa.cub e.engine.deploy ment.Deployment Manager.deployS uitcase(Deploym entManager.java :728)
at com.collaxa.cub e.ejb.impl.BPEL DomainManagerBe an.deploySuitca se(BPELDomainMa nagerBean.java: 445)
---------- --------------- --------------- -



Moreover i tried to deply the "bpel_xxTestBusi nessEventProces s_1.0.jar" from the bpel control(runtime ) . i get the same error of "Could not initialize activation agent."

Regard s
Hasan
Quote
0 #14 Anil Passi 2008-06-02 16:32
Hi Hasan

This error can be caused by many reasons, but the main one being that your BPEL's database components that you selected at design time for example WF BPEL Queue name etc can not be authenticated by your BPEL run time server. Hence it is very important for you to ensure that your runtime can connect to the database. Also ensure that JNDI name is correct.

Can you please confirm that you have followed all the steps of powerpoint presentation in Article Number 4 in this series?

Thanks ,
Anil Passi
Quote
0 #15 Hadi Hasan 2008-06-03 02:41
Hi Anil
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.

Regar ds
Hasan
Quote
0 #16 Anil Passi- 2008-06-03 03:17
Hi Hasan

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
Quote
0 #17 Satya Kumar 2008-06-03 11:31
Hi Anil,

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.

--Sat ya
Quote
0 #18 Hadi Hasan 2008-06-04 01:52
Hi Anil
Ok Anil i am waiting for the debugging article in order to resolve the problem.
Regard s
Hasan
Quote
0 #19 Rinkesh 2008-06-05 10:24
Hi Anil,

Thanks for such a nice article on Business Events.Links provided for pps files are not working can you please enable them.

thanks
R inkesh
Quote
0 #20 peter 2008-06-17 18:08
I am not able to download the ppt in the article. do you have a copy you can send to me. thanks
Quote
0 #21 Anil Passi- 2008-06-17 18:14
Please right click and save it.
In case you are on MS Office 2007, then you need to download 2003 Presentation viewer, as mentioned.
Quote
0 #22 Ashok Gunasekaran 2008-08-05 09:25
Hi,

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?

Kin dly Help.
Quote
0 #23 Maggi 2010-07-21 09:22
Hi Anil,

We are currently using EBS R12.1.1. i have deployed a webservice and when i create a Business Event i couldn see any record in WF_BPEL_QTAB table. When does the
record gets saved in this table. Even after running the BPEL Process, i couldn see any record refelecting in above mentioned table. Can you please tell me how these
Oracle Business Event & Subscription impact on BPEL Process.

Your articles are awesome its helping many of the People. Hats Off to you boss!!
Quote
0 #24 vaibhav 2010-12-30 02:51
Hi,

i cant found WF_BPEL_QTAB table in my database.

How can i create this table or is it created by any patch .

Please let me know the exact details. I want it to configure for my instance.

than ks,
Vaibhav G.
Quote
0 #25 vaibhav 2010-12-30 02:51
Hi,

i cant found WF_BPEL_QTAB table in my database.

How can i create this table or is it created by any patch .

Please let me know the exact details. I want it to configure for my instance.

than ks,
Vaibhav G.
Quote
0 #26 Praveen Vaddanam 2011-04-28 03:11
WF_BPEL_QTAB is customized qtable created by application developer.
We need to run certain AQ scripts to create q tables
Quote
0 #27 KirtiM 2012-02-07 05:03
Hi,
I have to implement the following scenario:
Read message from AQ and insert it into database. BUt if for some fault/error message is not inserted into database. How to retain the message i.e. how do i read the same message from AQ. Can we enqueue the AQ after the fault occurence or something similar to this?
Quote
0 #28 Chandramouli 2012-10-10 09:33
Hi Anil,

Can you please suggest me how to integrate Business event in BPEL in SOA

Database :MS Sql Server.

Thanks ,
Chnadramouli
Quote
0 #29 Chandramouli 2012-10-12 05:38
Hi Anil i am wating for Your Response Can u please help me!
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Aug 2021  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
        1
  2  3  4  5  6  7  8
  9101112131415
16171819202122
23242526272829
3031     

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner