Sie sind auf Seite 1von 6

7/1/2016

HowToCreateandUseCustomBusinessEventsinOracleEBusinessSuiteEddieAwad'sBlog

Home(http://awads.net/wp)
OracleStuff(http://awads.net/wp/oraclestuff/)
OraNA(http://awads.net/wp/orana/)
Presentations(http://awads.net/wp/prezos/)
Aboutme(http://awads.net/wp/about/)
Contactme(http://awads.net/wp/contact/)

(http://www.addthis.com/bookmark.php)
(http://awads.net/wp/feed/)
(http://awads.net/wp)EddieAwad'sBlog(http://awads.net/wp)

News,views,tips
andtricksonOracle
andotherfunstuff

HowTo
CreateandUseCustomBusinessEventsinOracleEBusinessSuite
(http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoraclee
businesssuite/)
OracleWorkflow,acomponentofOracleEBusinessSuite,letsyousetupsubscriptionstobusinesseventswhichcanlaunchworkflowsorenablemessagestobepropagatedfromone
systemtoanotherwhenbusinesseventsoccur.
TheOracleWorkflowBusinessEventSystemisanapplicationservicethatleveragestheOracleAdvancedQueuing(AQ)infrastructuretocommunicatebusinesseventsbetween
systems.
PredefinedeventsareprovidedwithsomeOracleEBusinessSuiteproducts.Forexample,theCreatePersonEvent(oracle.apps.ar.hz.Person.create)isthenameofaseededbusiness
eventintheReceivablesapplication.TheeventistriggeredwhenapersonpartyrecordiscreatedwithintheTradingCommunityArchitecture(TCA).
Notalleventsareseeded.However,Oraclegivesyoutheoptiontocreateacustomevent.Anexamplewouldbeaneventthatistriggeredwhenaninvoiceismatchedtoapurchaseorder.
Inthisarticle,Iwillshowyouhowtocreateanduseacustombusinessevent.Iwillgothroughthefollowingsteps:
1.Createacustombusinessevent
2.Createasubscriptiontotheevent
3.RaisetheeventfromPL/SQL
4.ConsumetheeventinPL/SQL
Note:ItestedthesestepsinOracleEBS12.1.2andDB11.2.0.1.
1.Createacustombusinesseventcalledxxu.oracle.apps.ap.inv.match:LogintoOracleApplicationsasSYSADMIN(orauserwiththeWorkflowadminrole).ClickontheWorkflow
AdministratorWebApplicationsresponsibility.ClickonBusinessEvents.ClickonCreateEvent.Supplytheeventname,displayname,ownernameandtag.
2.Createasubscriptiontothisevent:

SupplythePL/SQLRuleFunction.Thisisthefunction
thatwillbeexecutedWhentheeventisraised.
HereisthesourcecodeforthePL/SQLRuleFunction
xxu_bes.inv_po_matching.FortestingpurposesIinsert
theeventdataintoatemptable:
CREATETABLExx_temp(msgVARCHAR2(4000))
CREATEORREPLACEPACKAGExxu_bes
AS
FUNCTIONinv_po_matching(
p_subscription_guidINRAW,
p_eventINOUTwf_event_t
)
RETURNVARCHAR2
ENDxxu_bes

CREATEORREPLACEPACKAGEBODYxxu_bes
AS
FUNCTIONinv_po_matching(
p_subscription_guidINRAW,
p_eventINOUTwf_event_t
)
RETURNVARCHAR2
IS
l_plistwf_parameter_list_t:=p_event.getpa
BEGIN
IFp_event.geteventname()='xxu.oracle.apps.
THEN
INSERTINTOxx_temp(msg)
VALUES(
'Timestamp:'
||fnd_date.date_to_canonical(SYSDATE)
||'|Event:'

http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/

1/6

7/1/2016

HowToCreateandUseCustomBusinessEventsinOracleEBusinessSuiteEddieAwad'sBlog

||p_event.geteventname()
||'|EventKey:'
||p_event.geteventkey()
||'|SEND_DATE:'
||wf_event.getvalueforparame
'SEND_DATE',
l_plist
)
||'|PO_NUMBER:'
||wf_event.getvalueforparam
'PO_NUMBER',
l_plist
)
||'|event_data:'
||p_event.geteventdata()
)
ENDIF
RETURN'SUCCESS'
EXCEPTION
WHENOTHERS
THEN
wf_core.context(
'xxu_bes',
'inv_po_matching',
p_event.geteventname(),
p_subscription_guid
)
wf_event.seterrorinfo(p_event,'ERROR')
RETURN'ERROR'
ENDinv_po_matching
ENDxxu_bes

3.Feedsampledataintotheeventandthenraiseit:

DECLARE
l_parameter_listwf_parameter_list_t
l_event_dataCLOB
BEGIN
l_parameter_list:=
wf_parameter_list_t(
wf_parameter_t('SEND_DATE',fnd_date.date_to_c
wf_parameter_t('PO_NUMBER','10100'),
)
l_event_data:='
<matched>
<send_date>2011/05/2802:34:14</send_dat
<po_number>1234</po_number>
</matched>
'
wf_event.raise(
p_event_name=>'xxu.oracle.apps.ap.inv.matc
p_event_key=>SYS_GUID(),
p_event_data=>l_event_data,
p_parameters=>l_parameter_list
)
COMMIT
END
/

Aftertheeventisraised,queryxx_temp.Youwillseetheeventdatainthetable.
Sourcesandresources:
OracleWorkflowDevelopersGuide(pdf)(http://download.oracle.com/docs/cd/B53825_06/current/acrobat/121wfdg.pdf)
OracleWorkflowAPIReference(pdf)(http://download.oracle.com/docs/cd/B53825_06/current/acrobat/121wfapi.pdf)
OracleEBusinessSuiteIntegratedSOAGatewayDevelopersGuide(zipped)(http://download.oracle.com/docs/cd/B53825_06/current/acrobat/121isgdg.zip)

http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/

2/6

7/1/2016

HowToCreateandUseCustomBusinessEventsinOracleEBusinessSuiteEddieAwad'sBlog

Sharethis:

Twitter(http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/?share=twitter&nb=1)
Facebook(http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/?share=facebook&nb=1)
LinkedIn(http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/?share=linkedin&nb=1)
Google(http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/?share=googleplus1&nb=1)

More(#)

Relatedarticles:
OracleEBusinessSuiteVulnerability:UsersPasswordsDecrypted(http://awads.net/wp/2006/12/12/oracleebusinesssuitevulnerabilityuserspasswordsdecrypted/)
TheEasyWaytoMaskSensitiveDatainClonedOracleEBusinessSuiteEnvironments(http://awads.net/wp/2012/05/30/theeasywaytomasksensitivedatainclonedoracle
ebusinesssuiteenvironments/)

BestPracticesforOracleEBusinessSuitePerformanceTuning(http://awads.net/wp/2011/06/20/bestpracticesfororacleebusinesssuiteperformancetuning/)

FiledinOracle(http://awads.net/wp/category/oracle/)on21Jul11|Tags:EBS(http://awads.net/wp/tag/ebs/),howto(http://awads.net/wp/tag/howto/)

FiveFeaturesYouOughttoKnowAbouttheOracleScheduler(http://awads.net/wp/2011/07/06/fivefeaturesyououghttoknowabouttheoraclescheduler/)
HandyOracleSchedulerTroubleshootingTip(http://awads.net/wp/2011/08/29/handyoracleschedulertroubleshootingtip/)
Commentsareclosed.

RecentArticles
OracleDatabase12c:InteractiveQuickReference(http://awads.net/wp/2015/06/13/oracledatabase12cinteractivequick
reference2/)

OracletoUnveilDatabaseCloudService2.0atOpenWorld(http://awads.net/wp/2014/09/21/oracletounveildatabasecloudservice20atopenworld/)
HowBIGisOracleOpenWorld?(http://awads.net/wp/2014/08/23/howbigisoracleopenworld/)
DatabaseasaStorage(DBaaS)vs.ThickDatabase(http://awads.net/wp/2014/08/18/databaseasastoragedbaasvsthickdatabase/)
AvoidUTL_FILE_DIRSecurityWeaknessUseOracleDirectoriesInstead(http://awads.net/wp/2014/08/04/avoidutl_file_dirsecurityweaknessuseoracledirectoriesinstead/)

http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/

3/6

7/1/2016

HowToCreateandUseCustomBusinessEventsinOracleEBusinessSuiteEddieAwad'sBlog

Tags

aggregator

10g(http://awads.net/wp/tag/10g/)11g(http://awads.net/wp/tag/11g/)acquisition(http://awads.net/wp/tag/acquisition/)

(http://awads.net/wp/tag/aggregator/)apex(http://awads.net/wp/tag/apex/)blog(http://awads.net/wp/tag/blog/)book
(http://awads.net/wp/tag/book/) concepts(http://awads.net/wp/tag/concepts/) database (http://awads.net/wp/tag/database/)dbms_scheduler
(http://awads.net/wp/tag/dbms_scheduler/)Documentation(http://awads.net/wp/tag/documentation/)EBS(http://awads.net/wp/tag/ebs/)extension
(http://awads.net/wp/tag/extension/) feed (http://awads.net/wp/tag/feed/)

(http://awads.net/wp/tag/funny/)

Firefox(http://awads.net/wp/tag/firefox/)function(http://awads.net/wp/tag/function/)funny

Google(http://awads.net/wp/tag/google/)gotcha(http://awads.net/wp/tag/gotcha/)join(http://awads.net/wp/tag/join/)microsoft

oow(http://awads.net/wp/tag/oow/)oraclecommunity
(http://awads.net/wp/tag/oraclecommunity/)password(http://awads.net/wp/tag/password/)performance(http://awads.net/wp/tag/performance/)pl/sql
(http://awads.net/wp/tag/microsoft/) MySQL (http://awads.net/wp/tag/mysql/) odtug (http://awads.net/wp/tag/odtug/)

(http://awads.net/wp/tag/plsql/)plugin(http://awads.net/wp/tag/plugin/)programming(http://awads.net/wp/tag/programming/)reference
(http://awads.net/wp/tag/reference/)

search(http://awads.net/wp/tag/search/)Security(http://awads.net/wp/tag/security/)software

sql(http://awads.net/wp/tag/sql/)sqldeveloper(http://awads.net/wp/tag/sqldeveloper/)sqlplus

(http://awads.net/wp/tag/software/)

(http://awads.net/wp/tag/sqlplus/) tool(http://awads.net/wp/tag/tool/)twitter(http://awads.net/wp/tag/twitter/)undocumented (http://awads.net/wp/tag/undocumented/)

video

(http://awads.net/wp/tag/video/)wiki(http://awads.net/wp/tag/wiki/)WordPress(http://awads.net/wp/tag/wordpress/)xe(http://awads.net/wp/tag/xe/)xml(http://awads.net/wp/tag/xml/)

http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/

4/6

7/1/2016

HowToCreateandUseCustomBusinessEventsinOracleEBusinessSuiteEddieAwad'sBlog

Tweetsby@eddieawad
EddieAwad
@eddieawad
StrategiesforMigrating#OracleDatabasesto
#AWS[PDF]s.awads.net/21lxx5F
15Jun

EddieAwad
@eddieawad

Features,optionsandcapabilitiesof#Amazon
RDSfor#Oracle[video]s.awads.net/21IM0cx

07May

EddieAwad
@eddieawad

From#SQLtoMicroservices:Integrating#AWS
LambdawithRelationalDatabases
s.awads.net/1VO4gkO

07May

EddieAwadRetweeted
StevenFeuerstein
@sfonplsql

Andifyouputasmuchlogicaspossibleinyour
DBandexposeviaacleanAPI,buildinganew
UIisSOMUCHEASIER!
twitter.com/spolsky/status
05Feb

EddieAwad
@eddieawad

Encryptioninthe#Oracle#Database,whatyou
needtoknowyoutu.be/s_swBezkNW8
YouTube@YouTube

Embed

24Jan
ViewonTwitter

Topics
Topics SelectCategory

Archives

http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/

5/6

7/1/2016

HowToCreateandUseCustomBusinessEventsinOracleEBusinessSuiteEddieAwad'sBlog

Archives SelectMonth

AboutThisBlog
SubscribebyEmail(http://www.feedburner.com/fb/a/emailverifySubmit?feedId=84512)
(http://OraNA.info/)

Theviewsexpressedonthisblogareminealoneanddonotnecessarilyreflecttheviewsofmyemployer.

Feeds
(http://awads.net/wp/feed/)RSSPosts
(http://awads.net/wp/feed/)
(http://awads.net/wp/comments/feed/)

RSSComments
(http://awads.net/wp/comments/feed/)

EddieAwad'sBlog(http://awads.net/wp)/Design:SmashingWordpressThemes(http://ericulous.com/2008/09/09/wp
themegooglechrome)

http://awads.net/wp/2011/07/21/howtocreateandusecustombusinesseventsinoracleebusinesssuite/

6/6

Das könnte Ihnen auch gefallen