You are on page 1of 5

Module 36: Executing Workflow Processes

Lab 36-1 Executing a Workflow Process using a Run- time Event


Objective: To invoke a workflow process using a run-time event

-3 minutes

Instructions:

!n a previous la" #ou created t$e am!le ecure O!!ortunit" workflow process and pu"lis$ed%activated it to t$e client& 'ou will incorporate t$is workflow process as-is into a workflow polic# in a su"se(uent la"& !n t$is la" #ou will make a cop# of t$is workflow process and modif# it slig$tl# to ena"le it to "e invoked "# a run-time event& )& !f necessar#* start +ie"el Tools and log in as #$%&'( #$%&' connecting to t$e Sample data"ase& 2& 'ou will first make a cop# of t$e +ample +ecure ,pportunit# workflow process& a& +elect Workflow Process :: +ample +ecure ,pportunit#& "& +elect Edit - .op# /ecord& c& 0ame t$e process am!le ecure O!!ortunit" Runtime& d& +ave t$e modified record& Note: 'ou ma# need to revise t$e original workflow "efore cop#ing it to ensure t$e cop# is edita"le& 3& 'ou will next modif# t$e workflow process to allow it to "e invoked "# a runtime event& a& +tart t$e workflow designer for t$e +ample +ecure ,pportunit# /untime workflow process& "& +elect t$e ,pportunit# connector leading from t$e +tart step& c& /ig$t-click and select )iew Pro!erties Win*ow& d& Provide values for t$e following properties 1in t$e order listed2: T#pe Event ,"3ect T#pe Event ,"3ect Event +on*ition ,us+om! O!!ortunit" WriteRecor*

Note: T$ese properties specif# t$at t$e workflow will "e invoked w$enever an ,pportunit# record is written to t$e data"ase& e& +ave #our c$anges&

4& 'ou are now read# to deplo# and activate t$e workflow +ie"el 5&6 Essentials Page ) of

Module 36: Executing Workflow Processes a& /eturn to t$e Workflow Process list in t$e ,78E& "& Pu"lis$%9ctivate t$e +ample +ecure ,pportunit# /untime workflow process& c& :erif# t$at t$e status c$anges to +om!lete*& & !n +ie"el .all .enter* navigate to t$e 9dministration - 7usiness Process - Workflow ;eplo#ment and verif# t$at #our new workflow was successfull# deplo#ed and activated& 6& 'ou will finall# need to refres$ t$e cac$e of run-time events& a& 0avigate to t$e 9dministration - /untime Events - Events view& c& .lick t$e applet %enu "utton and select Reloa* Runtime Events& <& 'ou are now read# to test t$at t$e workflow is invoked "# a run-time event& a& 0avigate to t$e M# ,pportunities view& "& .reate a new opportunit# wit$: ,pportunit# 0ame Pro"a"ilit# am!le Runtime -./

c& /ig$t-click and select ave Recor*& d& :erif# t$at t$e secured flag $as "een set to 0rue& T$is indicates t$at t$e workflow was invoked& e& /eset t$e pro"a"ilit# to 1./2 f& +ave t$e record and verif# t$at secured flag remains unc$anged& 5& ,nce #ou are satisfied t$at t$e workflow "e$aves as desired* #ou will deactivate it so t$at t$e priorit# of a opportunit# will no longer "e ad3usted "# t$is workflow& 'ou will do t$is to prevent t$is workflow from potentiall# interfering wit$ following la"s& a& 0avigate to navigate to t$e 9dministration - 7usiness Process - Workflow ;eplo#ment :iew& "& +elect am!le ecure O!!ortunit" Runtime in t$e 9ctive Workflow Processes detail view list& c& +elect Menu - ;eactivate Process 1in t$e lower list applet2& d& :erif# t$at t$e ;eplo#ment +tate c$anges to &nactive2 e& 0avigate to t$e 9dministration - /untime Events - Events view to update t$e run-time event cac$e& f& .lick t$e applet %enu "utton and select Reloa* Runtime Events to refres$ t$e cac$e of runtime events&

+ie"el 5&6 Essentials

Page 2 of

Module 36: Executing Workflow Processes

Lab 36-8 Executing a Workflow Process from a +ontrol


Objective: To invoke a workflow process from a menu item in an applet

-26 minutes

&nstructions3

!n t$is la" #ou will add a menu item to t$e applet menu in t$e +!+ 9ccount Entr# 9pplet and t$en create an 9pplet =ser Prop propert# to invoke t$e +ample 9ccount =/8 .reator workflow process #ou "uilt and tested in previous la"s& )& T$is la" involves configuring several o"3ect t#pes 1.ommand and 9pplet =ser Prop2 t$at are not normall# exposed in t$e ,"3ect Explorer& 'ou will expose t$ese o"3ect t#pes& a& !n +ie"el Tools* select :iew - ,ptions and click t$e Object Ex!lorer ta"& "& +elect +omman*& c& Expand 9pplet and select #!!let 4ser Pro!& d& .lick O52 2& 8ock t$e #ccount 6 9pplet #ou will edit& E7 pro3ect& T$is is t$e pro3ect t$at contains t$e +!+ 9ccount Entr#

3& 'ou will first create a .ommand o"3ect t$at references a named met$od 1 am!le4RL2 t$at will invoke t$e workflow& a& +elect +omman* in t$e ,"3ect Explorer& "& .reate a new record wit$ 0ame Pro3ect Met$od Target am!le #ccount 4RL #ccount 6 E7 am!le4RL erver

4& 0ext* #ou will create an 9pplet Met$od Menu !tem t$at allows t$e user to invoke t$e command& a& +elect 9pplet:: +!+ 9ccount Entr# 9pplet > 9pplet Met$od Menu !tem "& .reate a new record wit$ .ommand Menu text ,verride Position +tring am!le #ccount 4RL 4!*ate #ccount 4RL --

& ?inall#* #ou will create an 9pplet =ser Propert# t$at associates +ample=/8 named met$od wit$ t$e am!le #ccount 4RL +reator workflow process #ou created and tested& a& +elect 9pplet :: +!+ 9ccount Entr# 9pplet > 9pplet =ser Prop +ie"el 5&6 Essentials Page 3 of

Module 36: Executing Workflow Processes "& .reate a new record wit$:

0ame :alue

0amed Met$od: +ample=/8 9&')O5E )+:; :Workflow Process %anager:; :RunProcess:; :<Process'ame<:; :< am!le #ccount 4RL +reator<:; :<Row&*<:; :=&*>:

+#ntax is important $ere@ all parameters $ave single (uotes surrounding t$em& !n addition Process 0ame* /ow!d* and t$e name of t$e workflow $ave additional dou"le (uotes inside t$e single (uotes& T$e easiest wa# to create t$is expression is to cop# t$e 0amed Met$od: 0ew ,rder =ser Prop and edit t$e value using t$e expression "uilder& T$e parameters t$at follow !0:,A+:. specif# to invoke t$e Workflow Process Manager using t$e /unProcess met$od 1t$at is execute a workflow2 and to pass in 1Process 0ame2 am!le #ccount 4RL +reator and 1/ow!d2 t$e !d field of t$e selected "usiness component&

4& .lick O5 to close t$e expression "uilder& & .lick O5 to dismiss t$e error dialog& 6& .ompile all locked pro3ects& <& 'ou are now read# to test t$e configuration #ou performed& a& ;ou"le-click on t$e +ie"el .all .enter s$ortcut on t$e desktop& 8ogin as #$%&'( #$%&' connecting to Sample data"ase& "& 0avigate to t$e M# 9ccounts :iew& c& Buer# for an account record w$ose =/8 field is "lank and drill down& d& .lick t$e applet menu "utton in t$e upper applet and verif# t$at a new menu item named =pdate 9ccount =/8 appears at t$e "ottom of t$e menu& f& .lick on t$e menu item and see t$e =/8 field getting populated&

+ie"el 5&6 Essentials

Page 4 of

Module 36: Executing Workflow Processes

+ie"el 5&6 Essentials

Page

of

You might also like