component processor flow complete

Upload: manoranjan-gupta

Post on 01-Jun-2018

237 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Component Processor Flow Complete

    1/26

    PeopleSoft Component

    Processor FlowBy: Manoranjan Kumar

    Gupta

    1PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    2/26

    PS Component Processor Flow 2

  • 8/9/2019 Component Processor Flow Complete

    3/26

    3PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    4/26

    PeopleCode Execution in Pages with Multiple Scroll Areas

    4PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    5/26

  • 8/9/2019 Component Processor Flow Complete

    6/26

    FieldChange Event

    • 5se F!el#Chan$e PeopleCo#e to recalculate pa$e &el# "alues% chan$e theappearance o( pa$e controls% or per(orm other process!n$ that results(rom a &el# chan$e other than #ata "al!#at!on* To "al!#ate the contents o(the &el#% use the F!el#+#!t e"ent*

    •  The F!el#Chan$e e"ent appl!es to the &el# an# row that just chan$e#*• F!el#Chan$e PeopleCo#e !s o(ten pa!re# w!th 0own!t PeopleCo#e* n these

    0own!t6F!el#Chan$e pa!rs% the 0own!t PeopleCo#e chec7s "alues !n thecomponent an# !n!t!al!8es the state or "alue o( pa$e controls accor#!n$ly*F!el#Chan$e PeopleCo#e then rechec7s the "alues !n the component#ur!n$ pa$e e,ecut!on an# resets the state or "alue o( pa$e controls*

    •  To ta7e a s!mple e,ample% suppose you ha"e a #er!"e#6wor7 &el# calle#P095CT% the "alue o( wh!ch !s always the pro#uct o( pa$e &el# an#pa$e &el# B* -hen the component !s !n!t!al!8e#% you woul# use 0own!tPeopleCo#e to !n!t!al!8e P095CT e;ual to < B when the component

    starts up or when a new row !s !nserte#* =ou coul# then attachF!el#Chan$e PeopleCo#e pro$rams to 'oth an# B wh!ch also setP095CT e;ual to < B* -hene"er a user chan$es the "alue o( e!ther or B% P095CT !s recalculate#*

    • F!el#Chan$e PeopleCo#e can 'e assoc!ate# w!th recor# &el#s an#component recor# &el#s*

    0et

    urn>PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    7/26

    FieldDefault Event

    •  The F!el#e(ault PeopleCo#e e"ent ena'les you to pro$rammat!cally set &el#s to#e(ault "alues when they are !n!t!ally #!splaye#* Th!s e"ent !s !n!t!ate# on all pa$e&el#s as part o( many #!)erent processes/ howe"er% !t tr!$$ers PeopleCo#e pro$ramsonly when the (ollow!n$ con#!t!ons are all True:

    •  The pa$e &el# !s st!ll 'lan7 a(ter apply!n$ any #e(ault "alue spec!&e# !n the recor# &el#propert!es*

    •  Th!s !s True !( there !s no #e(ault spec!&e#% !( a null "alue !s spec!&e#% or !( a ? !sspec!&e# (or a numer!c &el#*

    •  The &el# has a F!el#e(ault PeopleCo#e pro$ram*• n pract!ce% F!el#e(ault PeopleCo#e normally sets &el#s 'y #e(ault when new #ata !s

    'e!n$ a##e# to the component/ that !s% !n ## mo#e an# when a new row !s !nserte#!nto a scroll area*

    • ( a &el# "alue !s chan$e#% whether throu$h PeopleCo#e or 'y a user% the sChan$e#property (or the row !s set to True* The e,cept!on to th!s !s when a chan$e !s #one !nthe F!el#e(ault or F!el#Formula e"ents* ( a "alue !s set !n F!el#e(ault or F!el#Formula%the row !s not mar7e# as chan$e#*

    t sa"e t!me% all newly !nserte# an# chan$e# rows are wr!tten to the #ata'ase* llnewly !nserte# 'ut not chan$e# rows are not wr!tten to the #ata'ase*•  =ou must attach F!el#e(ault PeopleCo#e to the &el# where the #e(ault "alue !s 'e!n$

    populate#*• Note. n error or warn!n$ !ssue# (rom F!el#e(ault PeopleCo#e causes a runt!me error*• F!el#e(ault PeopleCo#e can 'e assoc!ate# w!th recor# &el#s an# component recor#

    &el#s*

    0et

    urn@PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    8/26

    FieldEdit Event

    • 5se F!el#+#!t PeopleCo#e to "al!#ate the contents o( a &el#%supplement!n$ stan#ar# system e#!ts* ( the #ata #oes notpass the "al!#at!on% the PeopleCo#e pro$ram shoul# #!splaya messa$e us!n$ the +rror statement% wh!ch re#!splays thepa$e% #!splay!n$ an error messa$e an# turn!n$ the &el# re#*

     To perm!t the &el# e#!t 'ut alert the user to a poss!'lepro'lem% use a -arn!n$ statement !nstea# o( an +rrorstatement* -arn!n$ statement #!splays a warn!n$ #!alo$'o, w!th 9K an# +,pla!n 'uttons* t perm!ts &el# contents to'e chan$e# an# cont!nues process!n$ as usual a(ter the usercl!c7s 9K*

    • ( the "al!#at!on must chec7 (or cons!stency across pa$e

    &el#s% then use Sa"e+#!t PeopleCo#e !nstea# o( F!el#+#!t*•  The F!el#+#!t e"ent appl!es to the &el# an# row that just

    chan$e#*• F!el#+#!t PeopleCo#e can 'e assoc!ate# w!th recor# &el#s

    an# component recor# &el#s*0et

    urnAPS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    9/26

    FieldFormula Event

    •  The F!el#Formula e"ent !s not currently use#* Because F!el#FormulaPeopleCo#e !n!t!ates !n many #!)erent conte,ts an# tr!$$ersPeopleCo#e on e"ery &el# on e"ery row !n the component 'u)er% !t canser!ously #e$ra#e appl!cat!on per(ormance* 5se 0own!t an#F!el#Chan$e e"ents rather than F!el#Formula*

    • ( a &el# "alue !s chan$e#% whether throu$h PeopleCo#e or 'y a user%the sChan$e# property (or the row !s usually set to True* owe"er% !( a"alue !s set !n F!el#e(ault or F!el#Formula% the row !s not mar7e# aschan$e#*

    • t sa"e t!me% all newly !nserte# an# chan$e# rows are wr!tten to the#ata'ase* ll newly !nserte# 'ut not chan$e# rows are not wr!tten tothe #ata'ase*

    • Note. n PeopleSo(t Pure nternet rch!tecture% !( a user chan$es a &el#'ut that &el# has noth!n$ to cause a tr!p to the ser"er% then #e(ault

    process!n$ an# F!el#Formula PeopleCo#e #o not run* They only runwhen another e"ent causes a tr!p to the ser"er*• s a matter o( con"ent!on% F!el#Formula !s now o(ten use# !n F5CDBE

    (unct!on l!'rary recor# #e&n!t!ons to store share# (unct!ons* owe"er%you can store share# (unct!ons !n any PeopleCo#e e"ent*

    • F!el#Formula PeopleCo#e !s only assoc!ate# w!th recor# &el#s*0et

    urnHPS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    10/26

    temSelected Event

    •  The temSelecte# e"ent !s !n!t!ate# whene"er a userselects a menu !tem (rom a popup menu* n popupmenus% temSelecte# PeopleCo#e e,ecutes !n theconte,t o( the pa$e &el# (rom where the popup menu !s

    attache#% wh!ch means that you can (reely re(erence an#chan$e pa$e &el#s% just as you coul# (rom a 'utton*

    • ote* Th!s e"ent% an# all !ts assoc!ate# PeopleCo#e% #oesnot !n!t!ate !( run (rom a component !nter(ace*

    • temSelecte# PeopleCo#e !s only assoc!ate# w!th popup

    menu !tems*

    0et

    urn1?PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    11/26

    Post!uild Event

    •  The PostBu!l# e"ent !s !n!t!ate# a(terall the other component 'u!l# e"entsha"e 'een !n!t!ate#* Th!s e"ent !so(ten use# to h!#e or unh!#e pa$es* t!s also use# to set component"ar!a'les*

    • PostBu!l# PeopleCo#e !s onlyassoc!ate# w!th components*

    0et

    urn11PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    12/26

    Pre!uild Event

    •  The PreBu!l# e"ent !s !n!t!ate# 'e(ore the rest o( thecomponent 'u!l# e"ents* Th!s e"ent !s o(ten use# to h!#e orunh!#e pa$es* t !s also use# to set component "ar!a'les*

    • Note. ( a PreBu!l# PeopleCo#e pro$ram !ssues an error orwarn!n$% the user !s returne# to the search pa$e* ( the

    search recor# has no 7eys% a 'lan7 component pa$eappears*• lso use the PreBu!l# e"ent to "al!#ate #ata entere# !n a

    search pa$e a(ter a prompt l!st !s #!splaye#* For e,ample%a(ter a user selects 7ey "alues on a search% the PreBu!l#PeopleCo#e pro$ram runs% catches the error con#!t!on% an#!ssues an error messa$e* The user rece!"es an#ac7nowle#$es the error messa$e* The component !scancele# 'ecause o( the error% an# the user !s returne# tothe search pa$e* PreBu!l# PeopleCo#e !s only assoc!ate#w!th components*

    0et

    urn12PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    13/26

    PrePopup Event

    •  The PrePopup e"ent !s !n!t!ate# just 'e(ore the #!splay o(a popup menu*

    •  =ou can use PrePopup PeopleCo#e to control theappearance o( the popup menu*

    • ote* Th!s e"ent% an# all !ts assoc!ate# PeopleCo#e% #oesnot !n!t!ate !( run (rom a component !nter(ace*

    • PrePopup PeopleCo#e can 'e assoc!ate# w!th recor#&el#s an# component recor# &el#s*

    0et

    urn13PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    14/26

    "owDelete Event

    •  The 0owelete e"ent !s !n!t!ate# whene"er a user attempts to #elete a row o(#ata (rom a pa$e scroll area* 5se 0owelete PeopleCo#e to pre"ent the #elet!ono( a row us!n$ an +rror or -arn!n$ statement or to per(orm any otherprocess!n$ cont!n$ent on row #elet!on* For e,ample% you coul# ha"e a pa$e &el#calle# Total on scroll area le"el 8ero whose "alue !s the sum o( all the +,tens!onpa$e &el#s on scroll area le"el one* ( the user #elete# a row on scroll area le"elone% you coul# use 0owelete PeopleCo#e to recalculate the "alue o( the Total&el#*

    •  The 0owelete e"ent tr!$$ers PeopleCo#e on any &el# on the row o( #ata that !s'e!n$ Ia$$e# as #elete#*

    • Note. 0owelete #oes not tr!$$er pro$rams on #er!"e#6wor7 recor#s*• 0owelete PeopleCo#e can 'e assoc!ate# w!th recor# &el#s an# component

    recor#s*• elet!n$ ll 0ows (rom a Scroll rea• -hen the last row o( a scroll area !s #elete#% a new% #ummy row !s

    automat!cally a##e#* s part o( the 0ownsert e"ent% 0own!t PeopleCo#e !s runon th!s #ummy row* ( a &el# !s chan$e# 'y 0own!t e"en !( !t.s le(t 'lan7% therow !s no lon$er new% an# there(ore !s not reuse# 'y any o( the ScrollSelect(unct!ons or the Select metho#* n th!s case% you may want to mo"e your!n!t!al!8at!on co#e (rom the 0own!t e"ent to F!el#e(ault*

    0et

    urn14PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    15/26

    "ownit Event#

    •  The 0own!t e"ent !s !n!t!ate# the &rst t!me that the Component Processor encounters arow o( #ata* 5se !t to set the !n!t!al state o( component controls #ur!n$ component 'u!l#process!n$ an# row !nsert process!n$* The 0own!t e"ent also occurs a(ter a Select orSelectll 0owset metho#% or a ScrollSelect or relate# (unct!on% !s e,ecute#*

    • Note. Generally% !( none o( the &el#s !n the new row are chan$e# a(ter the row !s !nserte#e!ther 'y a user press!n$ ltJ@ or pro$rammat!cally when the pa$e !s sa"e#% the newrow !s not !nserte# !nto the #ata'ase* owe"er% !( the Chan$e9nn!t rowset class property!s set to False% you can set "alues (or &el#s a new row !n 0ownsert or 0own!tPeopleCo#e% an# the row w!ll not 'e sa"e#*

    • 0own!t !s not &el#spec!&c* t tr!$$ers PeopleCo#e on all &el#s an# on all rows !n thecomponent 'u)er*

    • o not use +rror or -arn!n$ statements !n 0own!t PeopleCo#e* They cause a runt!meerror*

    • 0own!t PeopleCo#e !s o(ten pa!re# w!th F!el#Chan$e PeopleCo#e* n these0own!t6F!el#Chan$e pa!rs% the 0own!t PeopleCo#e chec7s "alues !n the component an#!n!t!al!8es the state or "alue o( pa$e controls accor#!n$ly* F!el#Chan$e PeopleCo#e thenrechec7s the "alues !n the component #ur!n$ pa$e e,ecut!on an# resets the state or"alue o( pa$e controls*

    • For a s!mple e,ample% suppose you ha"e a #er!"e#6wor7 &el# calle# P095CT% the "alueo( wh!ch !s always the pro#uct o( pa$e &el# an# pa$e &el# B* -hen the component !s!n!t!al!8e#% use 0own!t PeopleCo#e to !n!t!al!8e P095CT e;ual to < B when thecomponent starts up or when a new row !s !nserte#* =ou coul# then attach F!el#Chan$ePeopleCo#e pro$rams to 'oth an# B% wh!ch also sets P095CT e;ual to < B*-hene"er a user chan$es the "alue o( e!ther or B% P095CT !s recalculate#*

    • 0own!t PeopleCo#e can 'e assoc!ate# w!th recor# &el#s an# component recor#s*0et

    urn

    Cont!nue

    1PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    16/26

    #"ownit Event

    • 0own!t +,cept!ons• n certa!n rare c!rcumstances% the Component Processor #oes not run 0own!t

    PeopleCo#e (or some recor# &el#s* The Component Processor runs 0own!tPeopleCo#e when !t loa#s the recor# (rom the #ata'ase* owe"er% !n somecases% the recor# can 'e !n!t!al!8e# ent!rely (rom the 7eys (or the component*-hen th!s happens% 0own!t PeopleCo#e !s not run*

    • For 0own!t to not run% the (ollow!n$ must all 'e True:•

     The recor# !s at le"el 8ero*• +"ery recor# &el# that !s present !n the #ata 'u)ers !s also present !n the 7eys

    (or the component*•  The Component Processor #eterm!nes !( the &el# !s re;u!re# 'y the component*

    n pract!ce% th!s usually means that the &el# !s assoc!ate# w!th a pa$e &el#%poss!'ly h!##en% (or some pa$e o( the component* t coul# also mean that the&el# !s re(erence# 'y some PeopleCo#e pro$ram that !s attache# to an e"ent onsome other &el# o( the component*

    •+"ery recor# &el# that !s present !n the #ata 'u)ers !s #!splayonly*

    • 0own!t not runn!n$ !s not cons!#ere# to 'e an error* The purpose o( 0own!tPeopleCo#e !s to complete !n!t!al!8at!on o( #ata on the row a(ter !t has 'een rea#(rom the #ata'ase* Because the #ata !n th!s spec!al c!rcumstance !s com!n$(rom the 7eyl!st% !t was alrea#y !n!t!al!8e# correctly 'y whate"er process!n$pro#uce# the 7eyl!st* More $eneral !n!t!al!8at!on o( the component shoul# 'e#one !n PostBu!l# PeopleCo#e% not 0own!t*

    0et

    urn

    Cont!nue

    1>PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    17/26

    "ownsert Event

    • -hen a user a##s a row o( #ata% the Component Processor $enerates a0ownsert e"ent* =ou shoul# use 0ownsert PeopleCo#e (or process!n$spec!&c to the !nsert!on o( new rows* o not put PeopleCo#e !n 0ownsertthat alrea#y e,!sts !n 0own!t% 'ecause a 0own!t e"ent always !n!t!ates a(terthe 0ownsert e"ent% wh!ch w!ll cause your co#e to 'e run tw!ce*

    • Note. Generally% !( none o( the &el#s !n the new row are chan$e# a(ter therow has 'een !nserte# e!ther 'y a user press!n$ ltJ@ or

    pro$rammat!cally% when the pa$e !s sa"e#% the new row !s not !nserte#!nto the #ata'ase* owe"er% !( the Chan$e9nn!t rowset class property !sset to False% you can set "alues (or &el#s a new row !n 0ownsert or 0own!tPeopleCo#e% an# the row wont 'e sa"e#*

    •  The 0ownsert e"ent tr!$$ers PeopleCo#e on any &el# on the !nserte# row o(#ata*

    • o not use a warn!n$ or error !n 0ownsert*•  =ou can pre"ent a user (rom !nsert!n$ rows !nto a scroll area 'y select!n$

    the o 0ow nsert chec7 'o, !n the scroll 'ar.s pa$e &el# propert!es% asshown !n the (ollow!n$ !llustrat!on* owe"er% you cannot pre"ent row!nsert!on con#!t!onally*

    • Note. 0ownsert #oes not tr!$$er PeopleCo#e on #er!"e#6wor7 &el#s*• 0ownsert PeopleCo#e can 'e assoc!ate# w!th recor# &el#s an# component

    recor#s*0et

    urn1@PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    18/26

    "owSelect Event

    •  The 0owSelect e"ent !s !n!t!ate# at the 'e$!nn!n$ o( the component 'u!l# process!n any o( the up#ate act!on mo#es 5p#ate% 5p#ate6!splay ll% Correct!on*0owSelect PeopleCo#e !s use# to &lter out rows o( #ata as they are 'e!n$ rea#!nto the component 'u)er* Th!s e"ent also occurs a(ter a ScrollSelect or relate#(unct!on !s e,ecute#*

    • !scar#0ow (unct!on !n 0owSelect PeopleCo#e causes the Component Processorto s7!p the current row o( #ata an# cont!nue to process other rows* StopFetch!n$statement causes the Component Processor to accept the current row o( #ata%

    an# then stop rea#!n$ a##!t!onal rows* ( 'oth statements are e,ecute#% thepro$ram s7!ps the current row o( #ata% an# then stops rea#!n$ a##!t!onal rows*

    • PeopleSo(t appl!cat!ons rarely use 0owSelect% 'ecause !ts !nec!ent to &lter outrows o( #ata a(ter they"e alrea#y 'een selecte#* nstea#% screen out rows o( #ataus!n$ search recor# "!ews an# e)ect!"e#ate# ta'les% wh!ch &lter out the rows'e(ore theyre selecte#* =ou coul# also use a ScrollSelect or relate# (unct!on topro$rammat!cally select rows o( #ata !nto the component 'u)er*

    • n pre"!ous "ers!ons o( PeopleTools% the -arn!n$ an# +rror statements were use#

    !nstea# o( !scar#0ow an# StopFetch!n$* -arn!n$ an# +rror statements st!ll wor7as 'e(ore !n 0owSelect% 'ut the!r use !s #!scoura$e#*• Note. n 0owSelect PeopleCo#e% you can re(er to recor# &el#s only on the recor#

    that !s currently 'e!n$ processe#* Th!s e"ent% an# all !ts assoc!ate# PeopleCo#e%#oes not !n!t!ate !( run (rom a component !nter(ace*

    • 0owSelect PeopleCo#e can 'e assoc!ate# w!th recor# &el#s an# componentrecor#s*

    0et

    urn1APS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    19/26

    SaveEdit Event

    •  The Sa"e+#!t e"ent !s !n!t!ate# whene"er a user attempts to sa"e thecomponent* =ou can use Sa"e+#!t PeopleCo#e to "al!#ate thecons!stency o( #ata !n component &el#s* -hene"er a "al!#at!on!n"ol"es more than one component &el#% you shoul# use Sa"e+#!tPeopleCo#e* ( a "al!#at!on !n"ol"es only one pa$e &el#% use F!el#+#!tPeopleCo#e*

    • Sa"e+#!t !s not &el#spec!&c* t tr!$$ers assoc!ate# PeopleCo#e one"ery row o( #ata !n the component 'u)ers e,cept rows Ia$$e# as#elete#*

    • n +rror statement !n Sa"e+#!t PeopleCo#e #!splays a messa$e an#re#!splays the component w!thout sa"!n$ #ata* -arn!n$ statementena'les the user to cl!c7 9K an# sa"e the #ata% or to cl!c7 Cancel an#return to the component w!thout sa"!n$*

    • 5se the SetCursorPos (unct!on to set the cursor pos!t!on to a spec!&c

    pa$e &el# (ollow!n$ a warn!n$ or error !n Sa"e+#!t% to show the userthe &el# or at least one o( the &el#s that !s caus!n$ the pro'lem*Ma7e sure to call SetCursorPos 'e(ore the error or warn!n$% 'ecausethese may term!nate the PeopleCo#e pro$ram*

    • Sa"e+#!t PeopleCo#e can 'e assoc!ate# w!th recor# &el#s an#components*

    0et

    urn1HPS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    20/26

    SavePostChange Event

    • (ter the Component Processor up#ates the #ata'ase% !t !n!t!ates theSa"ePostChan$e e"ent* =ou can use Sa"ePostChan$e PeopleCo#e to up#ateta'les not !n your component us!n$ the SLD+,ec 'u!lt!n (unct!on*

    • n error or warn!n$ !n Sa"ePostChan$e PeopleCo#e causes a runt!me error*"o!# errors an# warn!n$s !n th!s e"ent*

    •  The system !ssues a SLD Comm!t statement a(ter Sa"ePostChan$e PeopleCo#ecompletes success(ully*

    ( you are e,ecut!n$ -or7Iow PeopleCo#e% 7eep !n m!n# that !( the -or7IowPeopleCo#e (a!ls% Sa"ePostChan$e PeopleCo#e !s not e,ecute#* ( yourcomponent has 'oth -or7Iow an# Sa"ePostChan$e PeopleCo#e% cons!#ermo"!n$ the Sa"ePostChan$e PeopleCo#e to Sa"ePreChan$e or -or7Iow*

    • ( you are #o!n$ messa$!n$% your Pu'l!sh PeopleCo#e shoul# $o !nto th!s e"ent*• Sa"ePostChan$e #oes not e,ecute !( there !s an error #ur!n$ the sa"e* For

    e,ample% !( there !s a #ata conI!ct error 'ecause another user up#ate# thesame #ata at the same t!me% Sa"ePostChan$e #oes not e,ecute*

    mportant$ e"er !ssue a SLD Comm!t or 0oll'ac7 statement manually (romw!th!n a SLD+,ec (unct!on* Det the Component Processor !ssue these SLDcomman#s*

    • Sa"ePostChan$e PeopleCo#e can 'e assoc!ate# w!th recor# &el#s% components%an# component recor#s*

    0et

    urn2?PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    21/26

    SavePreChange Event

    •  The Sa"ePreChan$e e"ent !s !n!t!ate# a(ter Sa"e+#!tcompletes w!thout errors* Sa"ePreChan$ePeopleCo#e pro"!#es one &nal opportun!ty toman!pulate #ata 'e(ore the system up#ates the#ata'ase/ (or !nstance% you coul# use

    Sa"ePreChan$e PeopleCo#e to set se;uent!al h!$hle"el 7eys* ( Sa"ePreChan$e runs success(ully% a-or7Iow e"ent !s $enerate#% an# then theComponent Processor !ssues appropr!ate nsert%5p#ate% or elete SLD statements*

    Sa"ePreChan$e PeopleCo#e !s not &el#spec!&c: !ttr!$$ers PeopleCo#e on all &el#s an# on all rows o(#ata !n the component 'u)er*

    • Sa"ePreChan$e PeopleCo#e can 'e assoc!ate# w!threcor# &el#s% components% an# component recor#s*

    0et

    urn21PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    22/26

    Searchnit Event#.

    •  The Searchn!t e"ent !s $enerate# just 'e(ore a search% a##% or #ataentry #!alo$'o, !s #!splaye#* Searchn!t tr!$$ers assoc!ate# PeopleCo#e !n the search 7ey&el#s o( the search recor#* Th!s ena'les you to control process!n$ 'e(ore a userenters "alues (or search 7eys !n the #!alo$ 'o,* n some cases% you may want toset the "alue o( the search #!alo$ &el#s pro$rammat!cally* For e,ample% the(ollow!n$ pro$ram !n Searchn!t PeopleCo#e on the component search 7eyrecor# &el# +MPD sets the search 7ey pa$e &el# to the user.s employee %ma7es the pa$e &el# una"a!la'le (or entry% an# ena'les the user to mo#!(y the

    user.s own #ata !n the component:• +MPD N+mployee#/ Gray +MPD/ llow+mpl#Ch$True/•  =ou can act!"ate system #e(aults an# system e#!ts !n the search pa$e 'y call!n$

    SetSeache(ault an# SetSearch+#!t !n Searchn!t PeopleCo#e* =ou can alsocontrol the 'eha"!or o( the search pa$e% e!ther (orc!n$ !t to appear e"en !( allthe re;u!re# 7eys ha"e 'een pro"!#e#% or 'y s7!pp!n$ !t !( poss!'le% w!th theSetSeach!alo$Beha"!or (unct!on* =ou can also (orce search process!n$ toalways occur 'y select!n$ the Force Search Process!n$ chec7 'o, !n the

    component propert!es !n PeopleSo(t ppl!cat!on es!$ner*• Note. Th!s e"ent% an# all !ts assoc!ate# PeopleCo#e% #oes not !n!t!ate !( run (rom

    a component !nter(ace*• Searchn!t PeopleCo#e can 'e assoc!ate# w!th recor# &el#s on search recor#s

    an# prompt ta'le recor#s an# on component search recor#s an# componentprompt ta'le recor#s*

    0et

    urn

    Cont!nue

    22PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    23/26

    #.Searchnit Event

    • Searchn!t w!th Prompt !alo$s• Be$!nn!n$ w!th PeopleTools A*? you can put PeopleCo#e on the Searchn!t an#

    SearchSa"e e"ents on the search 7eys o( prompt ta'le recor#s* Searchn!t an#SearchSa"e e"ents w!ll only e,ecute !( the llow Search +"ents (or Prompt!alo$s chec7'o, was selecte# (or the search 7ey.s recor# &el# propert!es !nppl!cat!on es!$ner* By #e(ault llow Search +"ents (or Prompt !alo$s !s o)*

    • Note. Search process!n$ w!th prompt #!alo$s can a)ect per(ormance* 9racle

    recommen#s that you l!m!t the use o( PeopleCo#e w!th prompt #!alo$s*

    • Searchn!t PeopleCo#e Funct!on 0estr!ct!ons•  =ou cannot use the (ollow!n$ (unct!ons !n Searchn!t PeopleCo#e:• oMo#al• oMo#alComponent•  Trans(er•  Trans(er+,act•  Trans(ero#e•  Trans(erPa$e•  Trans(erPortal

    0et

    urn

    Cont!nue

    23PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    24/26

    SearchSave Event

    • SearchSa"e PeopleCo#e !s e,ecute# (or all search 7ey &el#s on a search% a##% or #ataentry #!alo$ 'o, a(ter a user cl!c7s Search* Th!s ena'les you to control process!n$ a(tersearch 7ey "alues are entere#% 'ut 'e(ore the search 'ase# on these 7eys !s e,ecute#* typ!cal use o( th!s (eature !s to pro"!#e cross&el# e#!ts (or select!n$ a m!n!mum set o( 7ey!n(ormat!on* Th!s e"ent !s also use# to (orce a user to enter a "alue !n at least one &el#%e"en !( !t.s a part!al "alue% to help narrow a search (or ta'les w!th many rows*

    • Note. SearchSa"e !s not !n!t!ate# when "alues are selecte# (rom the search l!st* To"al!#ate #ata entere# !n the search pa$e% use the Component PreBu!l# e"ent*

    •  =ou can use +rror an# -arn!n$ statements !n SearchSa"e PeopleCo#e to sen# the user'ac7 to the search pa$e !( the user entry #oes not pass "al!#at!ons !mplemente# !n thePeopleCo#e*

    • Note. Th!s e"ent% an# all !ts assoc!ate# PeopleCo#e% !s not !n!t!ate# !( run (rom acomponent !nter(ace*

    • SearchSa"e PeopleCo#e can 'e assoc!ate# w!th recor# &el#s an# component searchrecor#s*

    • Note. o not use the NMenu system "ar!a'le !n th!s e"ent* =ou may $et une,pecte#results*

    • SearchSa"e w!th Prompt !alo$s• Be$!nn!n$ w!th PeopleTools A*? you can put PeopleCo#e on the Searchn!t an# SearchSa"e

    e"ents on the search 7eys o( prompt ta'le recor#s* Searchn!t an# SearchSa"e e"ents w!llonly e,ecute !( the llow Search +"ents (or Prompt !alo$s chec7'o, !s selecte# (or thesearch 7ey.s recor# &el# propert!es !n ppl!cat!on es!$ner* By #e(ault llow Search +"ents(or Prompt !alo$s !s o)*

    • Note. Search process!n$ w!th prompt #!alo$s can a)ect per(ormance* 9racle recommen#sthat you l!m!t the use o( PeopleCo#e w!th prompt #!alo$s*

    0et

    urn24PS Component Processor Flow

  • 8/9/2019 Component Processor Flow Complete

    25/26

    %or&'ow Event

    • -or7Iow PeopleCo#e e,ecutes !mme#!ately a(terthe Sa"ePreChan$e e"ent an# 'e(ore the #ata'aseup#ate that prece#es the Sa"ePostChan$e e"ent*

     The -or7Iow e"ent se$re$ates PeopleCo#e relate#to wor7Iow (rom the rest o( the appl!cat!on.s

    PeopleCo#e* 9nly PeopleCo#e relate# to wor7Iowsuch as Tr!$$erBus!ness+"ent shoul# 'e !nwor7Iow pro$rams* =our pro$ram shoul# #eal w!ththe -or7Iow e"ent only a(ter any Sa"ePreChan$eprocess!n$ !s complete*

    -or7Iow PeopleCo#e !s not &el#spec!&c: !t tr!$$ersPeopleCo#e on all &el#s an# on all rows o( #ata !nthe component 'u)er*

    • -or7Flow PeopleCo#e can 'e assoc!ate# w!th recor#&el#s an# components*

    0et

    urn2PS Component Processor Flow

    PeopleCode Execution in

  • 8/9/2019 Component Processor Flow Complete

    26/26

    PeopleCode Execution inPages with Multiple Scroll

    Areas• Components w!th mult!ple le"els can ha"e mult!ple rows o( #ata (rom mult!ple pr!mary recor##e&n!t!ons* =ou must 7now the or#er !n wh!ch the system processes 'u)ers (or th!s #ata%'ecause !t appl!es PeopleCo#e !n the same or#er*•  The Component Processor uses a #epth&rst al$or!thm to process rows !n mult!plescrollarea

    pa$es% start!n$ w!th a row at le"el 8ero% #r!ll!n$ #own to #epen#ent rows on lower le"els% an#then wor7!n$ up the h!erarchy unt!l the system has processe# all the #epen#ent rows o( thelast row on the h!$hest le"el*

    • Scroll De"el 9ne• -hen pa$es ha"e only one scroll 'ar% the Component Processor processes recor# #e&n!t!ons

    at scroll le"el 8ero% an# then all rows o( #ata at scroll le"el one*• ata !s retr!e"e# (or all rows w!th a s!n$le Select statement% an# then !t !s mer$e# w!th 'u)er

    structures*• Scroll De"el Two• -!th scroll 'ars at mult!ple scroll le"els% the system processes a s!n$le row o( #ata at scroll

    le"el one% an# then !t processes all su'or#!nate rows o( #ata at scroll le"el two* (terprocess!n$ all su'or#!nate #ata at scroll le"el two% !t processes the ne,t row (or scroll le"elone% an# all the su'or#!nate #ata (or that row* The system cont!nues !n th!s (ash!on unt!l all#ata !s processe#*

    Scroll De"el Three•  The Component Processor uses the same metho# (or process!n$ su'or#!nate #ata at scroll

    le"el three* ata !s retr!e"e# (or all rows w!th a s!n$le Select statement% an# then mer$e#w!th 'u)er structures* The Component Processor processes a s!n$le row o( #ata at scroll le"eltwo% an# !t processes all su'or#!nate #ata at scroll le"el three* (ter process!n$ allsu'or#!nate #ata at scroll le"el three% !t processes the ne,t row (or scroll le"el two an# all thesu'or!#!nates #ata (or that row* The system cont!nues !n th!s (ash!on unt!l all #ata !sprocesse#**

    0et

    urn2>PS Component Processor Flow