Escolar Documentos
Profissional Documentos
Cultura Documentos
Workflow Customization
Wipro Limited, 2001, All Rights Reserved. This document is proprietary to Wipro Technologies, a division of Wipro Limited. ou may not modify, copy, reproduce, repu!lish, upload, post, transmit or distri!ute any material from this document, in any form or !y any means, nor may you modify or create derivative "or#s !ased on the te$t of any file, or any part thereof for pu!lic, private or commercial use, "ithout prior "ritten permission from Wipro Limited.
Page 1 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------Approach 5 If "ou make a cop" of t!e item t"pe itself% "ou will also need to customize "our form w!ic! calls t!e workflow% since t!e internal name is !ard coded in t!e application In case of an :Account +enerator: workflow% "ou can make a cop" of t!e top level process :+enerate ;efault Account:% customize it and ot!er processes under it and t!en call it b" settin# t!e internal name of t!is process under Application <= 6le$field <= >e" <= Accounts for t!e specific account #enerator As a #eneral rule% do not decided to customize forms code for workflow related c!an#es 'o retain "our customizations% upload "our customized workflows w!enever an" patc!es are applied Approach 6 *ome workflows do not allow "ou to use t!e cop" approac! so "ou !ave to modif" t!e standard process 5$amples w!ere "ou can use t!e cop" are? / All account #enerator workflows 0 PO Approval 2 Requisition Approval 5$amples w!ere "ou can not do t!is? / PO Create documents 0 5$pense Report Approval
Page 2 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------workflow ke"% its current status and position wit!in t!e specified workflow will form t!e main part of t!e article '!e item ke" and item t"pe can be found b" eit!er ?/ *i#nin# on to Workflow via "our specified url access e # (!ttp?DDappsnet wipro com?E@@0Dwf0@2DplsqlDwfaF!tml lo#in ) and *electin# :6ind Processes: - initial identification can usuall" be made b" t!e dateDtimestamp s!own OR 0 4sin# sqlplus to access t!e tables directl" '!e columns W6FI'5GF'1P5 and W6FI'5GF>51 contain t!e required information '!e" e$ist on several PO tables e # POFR5C4I*I'IO,FH5A;5R* POFH5A;5R* POFR5-5A*5* *o % if we knew t!e requisition number we could #et t!e desired information via ?sql = select wfFitemFt"pe%wfFitemFke" from poFrequisitionF!eaders w!ere se#ment/<:"our req no:I Once "ou !ave found t!e desired workflow ke" % t!e associated workflow dia#ram can t!en be displa"ed In our scenario our requisition !as stopped at t!e workflow :Wait for .ack#round 5n#ine: ,ow in order to find out w!" we need to undertake t!e followin#?/ 4sin# sql perform t!e followin# to s!ow requests queued for t!e workflow back#round process?sql= JK6,;F'OPDsqlDwfbk#c!k (*ample output ?;efered activities Item'"pe Item>e" Activit" -abel -------- -------------------- -----------------------------.e#in ;ate ------------------
Wipro Limited, 2001, All Rights Reserved. This document is proprietary to Wipro Technologies, a division of Wipro Limited. ou may not modify, copy, reproduce, repu!lish, upload, post, transmit or distri!ute any material from this document, in any form or !y any means, nor may you modify or create derivative "or#s !ased on the te$t of any file, or any part thereof for pu!lic, private or commercial use, "ithout prior "ritten permission from Wipro Limited.
Page 3 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------R5CAPPR8 0@0/-23@2 ,OOP @B-L4,-@@ /7?@0?2M R5CAPPR8 0@00-23@3 ,OOP @B-L4,-@@ /7?07?2E R5CAPPR8 0@02-23@7 ,OOP @B-L4,-@@ /7?22?// R5CAPPR8 0@07-23@M ,OOP @B-L4,-@@ /7?2E?7M R5CAPPR8 0/@/-299/ ,OOP /M-L4--@@ @B?32?2/ 'imeout 8iolations Item'"pe Item>e" -----------------PORCP' 2//2-;5C-/BBE AC'I8I'1 ,O'I6I5; Activit" -abel 2 ;ue ;ate /3-GAR-@@ //?@0?@@
0 *i#n on to core apps as s"stem administrator 2 C!eck for t!e Workflow .ack#round Process e$ecution '!is ma" be sc!eduled to run ever" few minutes % or on an ad!oc basis 3 *ubmit a new request to run t!e workflow back#round en#ine and note t!at submission parameters ( deferred and timeout ) need to be set to eit!er 1es or ,o to pick up t!e data queued above Once t!e back#round en#ine process !as completed successfull" a subsequent workflow is activated ( PO? Create ;ocuments ) '!is workflow will determine w!et!er a PO can be #enerated from t!e previous requisition approval One of t!e main processes in t!e PO? Create ;ocuments workflow is t!e :+et .u"er: one We will concentrate on t!is particular workflow in t!e ne$t part of t!is scenario '!e +et .u"er workflow process is a set of tests to determine w!ere sourcin# details are located '!is forms t!e basis of a !ierarc!" for bu"er retrieval and t!e followin# in order are t!e sourcin# locations t!at are c!ecked ?a) Requisition -ine b) Cate#or" c) *ource ;ocument 6or t!e purposes of t!is scenario we will insert a new piece of workflow in t!e !ierarc!" to prove !ow eas" customisation of standard workflow is ac!ieved
Workflow uil!er
Wipro Limited, 2001, All Rights Reserved. This document is proprietary to Wipro Technologies, a division of Wipro Limited. ou may not modify, copy, reproduce, repu!lish, upload, post, transmit or distri!ute any material from this document, in any form or !y any means, nor may you modify or create derivative "or#s !ased on the te$t of any file, or any part thereof for pu!lic, private or commercial use, "ithout prior "ritten permission from Wipro Limited.
Page 4 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------'!e workflow builder is a tool used to displa" and or customise workflows available to core Oracle applications In an" reported workflow problem b" a customer t!is tool s!ould be used in t!e first instance to locate t!e workflow It will also be !elpful to determine w!et!er t!e customer !as customised an" of t!e standard workflows '!e workflow builder can be installed on "our own client PC b" downloadin# software from t!e C; - :Workflow Client 0 @ 2 for Windows B7: As we are #oin# to connect to t!e Oracle database usin# t!e builder please make sure "ou !ave sqlnet access to t!e database e # c!eck "our file tnsnames ora for t!e correct instance definition e #?8I* < (;5*CRIP'IO, < (A;;R5**F-I*' < (A;;R5** < (PRO'OCO- < 'CP)(HO*' < /@ 0@@ 22 /9E)(POR' < /702)) ) (CO,,5C'F;A'A < (*5R8IC5F,AG5 < vis) ) ) ,ow fire up t!e workflow builder % use 6I-5% OP5, and click on database In t!is scenario we will be usin#?username? apps Password? apps Connect? vis *elect workflow PO?Create ;ocuments from t!e ri#!t !and window and select *!ow w!ic! moves it to t!e left window ,ow click on PO Create ;ocuments% Processes% +et .u"er ,O'5?-.efore customisin# t!e workflow please save t!e file to "our local drive '!e file will be saved wit! a wft e$tension
Wipro Limited, 2001, All Rights Reserved. This document is proprietary to Wipro Technologies, a division of Wipro Limited. ou may not modify, copy, reproduce, repu!lish, upload, post, transmit or distri!ute any material from this document, in any form or !y any means, nor may you modify or create derivative "or#s !ased on the te$t of any file, or any part thereof for pu!lic, private or commercial use, "ithout prior "ritten permission from Wipro Limited.
Page 5 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------6or e$ample if we define t!e function as pointin# to t!e followin# plDsql packa#e ?POFA4'OCR5A'5F;OC +5'F.415RF6ROGFCHRI* '!e POFA4'OCR5A'5F;OC code is found in PONWA'C* O PONWA'C. pls files We will customise t!ese packa#es after savin# t!e ori#inals first '!e c!an#es made are s!own below?6rom PONWA'C* pls?procedure #etFbu"erFfromFreqFline (itemt"pe I, 8ARCHAR0% itemke" I, 8ARCHAR0% actid I, ,4G.5R% funcmode I, 8ARCHAR0% resultout O4' 8ARCHAR0 )I procedure #etFbu"erFfromFc!ris (itemt"pe I, 8ARCHAR0% itemke" I, 8ARCHAR0% actid I, ,4G.5R% funcmode I, 8ARCHAR0% resultout O4' 8ARCHAR0 )I procedure #etFbu"erFfromFitem (itemt"pe I, 8ARCHAR0% itemke" I, 8ARCHAR0% 6rom PONWA'C. pls?DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP P P procedure? #etFbu"erFfromFc!ris P P ;escription? +ets t!e su##ested bu"er from c!ris P P PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPD procedure #etFbu"erFfromFc!ris (itemt"pe I, 8ARCHAR0% itemke" I, 8ARCHAR0% actid I, ,4G.5R% funcmode I, 8ARCHAR0% resultout O4' 8ARCHAR0 ) is
Wipro Limited, 2001, All Rights Reserved. This document is proprietary to Wipro Technologies, a division of Wipro Limited. ou may not modify, copy, reproduce, repu!lish, upload, post, transmit or distri!ute any material from this document, in any form or !y any means, nor may you modify or create derivative "or#s !ased on the te$t of any file, or any part thereof for pu!lic, private or commercial use, "ithout prior "ritten permission from Wipro Limited.
Page 6 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------$FitemFid numberI $Fbu"erFid numberI $FinvFor#Fid numberI $For#Fid numberI bu"er numberI item numberI or# numberI $Fsu##estedFbu"erFid numberI $Fpro#ress varc!ar0(2@@)I be#in $FitemFid?<0@0I $For#Fid?<@I select bu"er into $Fsu##estedFbu"erFid from c!ris w!ere item < $FitemFid and or# < $For#FidI if ($Fsu##estedFbu"erFid is ,4--) t!en resultout ?< wfFen#ine en#Fcompleted QQ :?: QQ :AC'IO,F6AI-5;:I $Fpro#ress?< :/@? #etFbu"erFfromFc!ris? result < AC'IO,F6AI-5;:I poFwfFdebu#Fpk# insertFdebu#(itemt"pe%itemke"%$Fpro#ress)I else resultout ?< wfFen#ine en#Fcompleted QQ :?: QQ :AC'IO,F*4CC55;5;:I $Fpro#ress?< :0@? #etFbu"erFfromFreqFline? result < AC'IO,F*4CC55;5;:I poFwfFdebu#Fpk# insertFdebu#(itemt"pe%itemke"%$Fpro#ress)I end ifI e$ception w!en ot!ers t!en wfFcore conte$t(:poFautocreateFdoc:%:#etFbu"erFfromFc!ris:%$Fpro#ress)I
Wipro Limited, 2001, All Rights Reserved. This document is proprietary to Wipro Technologies, a division of Wipro Limited. ou may not modify, copy, reproduce, repu!lish, upload, post, transmit or distri!ute any material from this document, in any form or !y any means, nor may you modify or create derivative "or#s !ased on the te$t of any file, or any part thereof for pu!lic, private or commercial use, "ithout prior "ritten permission from Wipro Limited.
Page 7 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------raiseI end #etFbu"erFfromFc!risI DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP P P Procedure? #etFbu"erFfromFitem P P ;escription? +ets t!e bu"er from t!e item master based on t!e P item on t!e requisition line PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPD '!e packa#e was replaced in t!e database and a c!eck was made for invalid obAects In order for t!e packa#e to retrieve t!e data a new table was created called CHRI* e # *C-= desc c!risI ,ame ,ullR '"pe ------------------------------- -------- ---OR+ ,4G.5R .415R ,4G.5R(B) I'5G ,4G.5R(B) and was seeded wit! / row of data e # OR+ .415R I'5G @ 0@/ 0@0 ,ow b" modif"in# t!e workflow dia#ram to use t!e newl" created function%savin# t!e customised workflow to t!e database% replacin# t!e above pls packa#es and seedin# t!e database table wit! data we !ave created a simple customised workflow for t!e standard PO autocreate documents part of t!e application '!is !opefull" outlines !ow easil" even t!e standard supplied workflow can be modified '!is of course is potentiall" dan#erous in t!e !ands of t!e ine$perienced SSS
Page 8 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------DP If a process is passed t!en it will be run P If a process is not passed t!en t!e selector function defined in P item t"pe will be determine w!ic! process to run PD I6 ( Item'"pe is ,O' ,4-- ) A,; ( Item>e" is ,O' ,4--) A,; ( reqF!eaderFid is ,O' ,4-- ) 'H5, wfFen#ine CreateProcess(itemt"pe <= itemt"pe% itemke" <= itemke"% process <= workflowFprocess )I $Fpro#ress?< :0@? startFwfFprocess? Lust after CreateProcess:I poFwfFdebu#Fpk# insertFdebu#(Itemt"pe%Itemke"%$Fpro#ress)I DP Initialize workflow item attributes PD It can be seen t!at t!ere is a call to a packa#e called poFwfFdebu#Fpk# '!is actuall" places t!e data contained in variable $Fpro#ress in a database table '!is table is called POFW6F;5.4+ e# *C-= desc poFwfFdebu#I ,ame ,ullR '"pe ------------------------------- -------- ---------------------------------5N5C4'IO,F*5C45,C5 ,4G.5R 5N5C4'IO,F;A'5 ;A'5 I'5G'1P5 8ARCHAR0(E) I'5G>51 8ARCHAR0(03@) ;OC4G5,'FI; ,4G.5R ;OC4G5,'F,4G.5R 8ARCHAR0(07) PR5PAR5RFI; ,4G.5R APPRO85RF5GPI; ,4G.5R 6ORWAR;F'OFI; ,4G.5R 6ORWAR;F'OF4*5R,AG5 8ARCHAR0(/@@) 6ORWAR;F6ROGFI; ,4G.5R 6ORWAR;F6ROGF4*5R,AG5 8ARCHAR0(/@@) A4'HORITA'IO,F*'A'4* 8ARCHAR0(07)
Wipro Limited, 2001, All Rights Reserved. This document is proprietary to Wipro Technologies, a division of Wipro Limited. ou may not modify, copy, reproduce, repu!lish, upload, post, transmit or distri!ute any material from this document, in any form or !y any means, nor may you modify or create derivative "or#s !ased on the te$t of any file, or any part thereof for pu!lic, private or commercial use, "ithout prior "ritten permission from Wipro Limited.
Page 9 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------;5.4+FG5**A+5 8ARCHAR0(/@@@) ,ow in a t"pical problem dia#nosin# scenario we sould #et t!e user to pinpoint t!e problem b" performin# t!e followin#?sql = select debu#Fmessa#e from poFwfFdebu# w!ere itemt"pe<:$"z: and itemke"<:$"z: order b" e$ecutionFsequenceI '!is s!ould provide useful information of t!e position in t!e plDsql packa#e w!ere t!e problem lies e# ;5.4+FG5**A+5 -------------------------------------------------------------------------------/@? startFwfFlineFprocess? Called wit! itemFt"pe < CR5A'5POD itemFke" < /EE0-29M / 0@? startFwfFlineFprocess? Lust after CreateProcess 2@? startFwfFlineFprocess? >ickin# off *tartProcess /@? #etFreqFinfo? Lust after e$ecutin# sql stmt wit! reqFlineFid /EE0 0@? #etFreqFinfo? result < AC'I8I'1FP5R6ORG5; 0@? rfqFrequiredFc!eck? result < , 2@? #etFsuppFinfoFforFacrt? result < 1 /@? isFsourceFdocFinfoFok? result < , /@? #etFbu"erFfromFreqFline? result < AC'IO,F6AI-5; ;5.4+FG5**A+5 -------------------------------------------------------------------------------0@? #etFbu"erFfromFreqFline? result < AC'IO,F*4CC55;5; /@ rows selected ,O'5?- Re#ular truncation and pur#in# of t!e data in t!is table is recommendedSS
Page 10 of 11
Wipro Technologies
Workflow Customizatiom ----------------------------------------------------------------------------------------------------------t!e workflow builder definition '!is can sometimes be set to da"s or weeks for e$ample w!en an approver !as been notified to approve a purc!ase order In order to decrease t!e timeout to a small value in order to pro#ress t!e workflow furt!er we can from t!e workflow builder click on t!e notification properties and t!e ;etails section to adAust t!e timeout values and its effective date 'ther Workflow &ebug Sources One of t!e main #eneric sources of workflow information is of course t!e scripts wfstat O wfstatus sql w!ic! are located in K6,;F'OPDsql '!ese provide #eneral information on t!e current state of a workflow and s!ould be used as a first port of call In addition an" errors reported back successfull" to a workflow will be contained in t!e view W6FI'5GFAC'I8I'1F*'A'4*5*F8 '!is view accessed b" workflow ke" will s!ow error messa#es and an error stack for t!e specific workflow to allow furt!er tar#etin# in to t!e cause of t!e problem
Wipro Limited, 2001, All Rights Reserved. This document is proprietary to Wipro Technologies, a division of Wipro Limited. ou may not modify, copy, reproduce, repu!lish, upload, post, transmit or distri!ute any material from this document, in any form or !y any means, nor may you modify or create derivative "or#s !ased on the te$t of any file, or any part thereof for pu!lic, private or commercial use, "ithout prior "ritten permission from Wipro Limited.
Page 11 of 11
Wipro Technologies