Professional Documents
Culture Documents
Course Content
Intro$uction Wor !lo" architecture Wor !lo" %e!inition an$ "or !lo" &e'plate Wor !lo" steps in $etails &as Business (b)ects an$ Metho$s Container Structure an$ Container Progra''ing *vents (rganisational structure an$ role resolution %i!!erent types o! Agent Wor !lo" an$ A+*
# Copyright IBM Corporation 2003
Need of Workflow
!
Hmm ! Time to put in a purchase requisition request I "onder "ho approves buying this stuff#
TIME IS MONEY!!!
+
I guess Id better send off some inter-office mail to ask the approvers to approve my requisition
Time drags on
%ra"bac s
Inefficiency. *ach lacks a way to trace "here a tas is Who executed or is e3ecuting it 4o" 'uch ti e it re!uired-
Workflow Architecture
Organisational Level
Process Level
Workflow $efinition
Workflow $efinition
A "or !lo" $e!inition $escribes the "or !lo" process
Wor !lo" $e!inition consists o! 3182:Basic %ata In!or'ation about triggering events Initial 9alues Containers Bin$ings
Workflow Builder
&he "or !lo" $e!inition is create$ in the Wor !lo" Buil$er an$ $isplaye$ graphically in a net"or %ransaction& SW%% 'enu Path& &ools Business Wor !lo" %evelop'ent %e!inition tools Wor !lo" Buil$er-
Workflow $esi*n
Workflow Steps
Steps "hich are use$ !or internal process control an$ 'onitoring Acon$ition0 'ultiple con$ition0 loop0 etcB
Su"workflow
-
>or evaluation o! the 'ultiple con$ition0 the value o! the basis o! co'parison is chec e$ at runti'e against the co'parison values an$ branche$ accor$ingly-
Internal process control ,contd.W)I.( .oop - Steps are processe$ repeate$ly until the con$itions containe$ in the W4I+* step no longer apply +ntil .oop - Steps are processe$ repeate$ly until the con$ition containe$ in the ?7&I+ step is true /ork - ?se$ !or parallel processing branches- (nly a part o! the parallel processing branches actually has to run to continue the "or !lo"- %yna'ic parallel processing is also possible
Internal process control ,contd.Send ail - &e3t entere$ in this step can be use$ to sen$ a 'ail to the agent assigne$ Container operations - ?se$ to per!or' arith'etic operation o! value assign'ent to "or !lo" container ele'ents using constants an$ $ata in the "or !lo" container -
Internal process control ,contd. (#ent Creator - An event is create$ "hen this step in the "or !lo" is reache$- (ther "or !lo"s can be starte$ as a reaction to the event create$ in this step- &his event 'ust be the triggering event o! the relevant "or !lo" tas s an$/or te'plates WAI% for e#ent - ?se$ to stop the "hole e3ecution o! the "or !lo" until the event is create$ in the syste'- ?se$ to "ait !or events !or parallel processing
Stan$ar$ &as A&SB Single step Custo'er &as A&B &as s Wor !lo" &e'plateAWSB Multistep Wor !lo" &as AW>B
Customer Task T!"e T# Workflow %ask ,%ype W/Create$ b! customer customer &it' vali$it! "erio$ Client($e"en$ent Must be linke$ to its "ossible "ossible agents )'en it is $e*ine$
Stan$ar$ Task T!"e TS# Workflow %e plate ,%ype WSCreate$ b! S%P an$ &it'out vali$it! "erio$ Client(in$e"en$ent Must be linke$ to its agents )'en it is $e*ine$
Single step
.e!erences one o"1ect type ethod an$ $isplays one step in the business process
&as s
.epresents the "usiness process an$ is a se5uence o! in$ivi$ual tas s an$ control steps
Copyright IBM Corporation 2003
Multistep
Sin*le-step tasks
, Single<step tas s $escribe ele'entary business activities-
, Single<step tas s operate on an ob)ect an$ re!er to one ob)ect 'etho$ each
, Single<step tas s are lin e$ to their possible an$ per'itte$ agents "hose organi6ational assign'ents are $escribe$ in the organi6ational plan o! the enterprise-
, , , ,
$efinin* a %ask
Back*round SAPphones
&he "or !lo" $ials the telephone nu'ber attache$ to the current custo'er
# Copyright IBM Corporation 2003
Work Ite
, *3ecutable single<step tas s are represente$ by "or ite's at runti'e, (b)ect that represents a tas or action in the "or !lo" syste' at runti'e, %epen$ing on the "or ite' type0 so'e o! these "or ite's are $isplaye$ in a userFs "or list- (ther "or ite's0 on the other han$0 are only use$ an$ processe$ internally, &he "or ite's are $isplaye$ in the integrate$ inbo3es o! their selecte$ agents0 an$ can be reserve$ an$ e3ecute$ !ro' there-
Workite
%ypes
W& $ialo* work ite .unti'e $isplay !or a single step tas "ith a user $ialog $& 'issed deadline work ite &he 'essage recipient !or the 'isse$ $ea$line is in!or'e$/& Workflow work ite .unti'e representation o! a 'ulti step tas B& Back*round work ite .unti'e $isplay !or a tas e3ecute$ in the bac groun$(& Wait step work ite & .unti'e $isplay !or a "ait step in the "or !lo" $e!inition-
Workite
%ext
, &itle o! "or ite' in the Business Wor place , >irst create the "or ite' te3t an$ position the cursor to inclu$e a varible , Choose the FInsert variableF icon un$er the "or ite' te3t
(xa ple
Processes re5uest !ro' CGWIG(b)ectGI%-Create$ByC
Interfaces
Inter!aces are a co'bination o! attributes0 'etho$s0 an$ events to be use$ in co''on a'ong 'ultiple ob)ect types- &he purpose o! inter!aces is to $e!ine co''on !unctionality in one ob)ect type0 an$ to assign that co''on !unctionality via an inter!ace to 'ultiple ob)ect types across the Business (b)ect .epository- &his avoi$s re$un$ancy o! $ata an$ !unctionality $e!inition*ach ne" ob)ect type auto'atically receives the inter!ace I/SAP0 the SAP stan$ar$ inter!ace- I>SAP provi$es every ob)ect type "ith the !ollo"ing; - Metho$ %isplay - Metho$ *3istenceChec - Attribute (b)ect&ype
6ey /ields
Hey !iel$s are $esigne$ to uni5uely i$enti!y the ob)ect type-
I! the ey !iel$ has a $ata type re!erence o! a $ictionary table !iel$0 the runti'e syste' "ill loo to that table !iel$ to retrieve the value o! the ey "hen processing the ob)ect- When the ey !iel$ is create$0 the ABAP/1 progra' co$e is generate$ auto'atically "hen the ob)ect type is generate$-
Attri"utes
Attributes provi$es access to $ataABAP %ictionary >iel$ 9irtual
'ethods
Metho$s incorporate the per'itte$ !unctions available !or an ob)ectMetho$s have i'porting an$ e3porting para'eters as "ell as e3ceptionsMetho$s can be create$ using ;
'ethods
lt u s e -
Im"ort Parameters
MET+O,
E."ort Parameters
io "t ce s E. n
Copyright IBM Corporation 2003
methods finish e)ecuting before handing control back to the calling program These types of methods can return e)port parameters& results and e)ceptions 2synchronous methods do not return control to the calling program immediately 3nce e)ecuted& they depend upon events to communicate the results of the method back to the calling program 2synchronous ob4ect methods cannot have results& e)port parameters or e)ceptions
# Copyright IBM Corporation 2003
Instance independence& In$icates "hether an ob)ect re!erence is passe$ to the 'etho$ by bin$ing at the ti'e o! e3ecution- Metho$s that generate an$ return an ob)ect re!erence0 such as Create0 or 'etho$s that generate a report listing shoul$ be instance in$epen$ent-
(xceptions
I*rror han$ling is acco'plishe$ through the use o! 'etho$ e3ceptions Asynchronous 'etho$s onlyBI&he "or !lo" $e!inition can branch accor$ing to these possible error states an$ allo" !or subse5uent steps to han$le these con$itionsMessages an$ e3ceptions cannot be use$ "ith bac groun$ 'etho$s because they "ill ter'inate the progra'I7u'ber o! the e3ception; I000J<J000; e3ceptions $e!ine$ !or inter!aces IJ00J<:KKK; application<speci!ic e3ceptions A!ree !or SAP $evelop'entB I=000<=KKK; e3ceptions raise$ by the ob)ect 'anager IK000<KKKK; e3ceptions $e!ine$ by the custo'er A!ree !or custo'ersB
(xceptions
I*3ceptions are i'ple'ente$ "ithin a 'etho$0 bet"een the 'acro instructions B*GI7GM*&4(% an$ *7%GM*&4(%L*DI&G.*&?.7 Co$e 9ariableJ 9ariable2 9ariable3 9ariable1ICo$e E the 1<$igit nu'ber o! the e3ception I9ariableJ through 9ariable1 correspon$ to up to 1 variables "hich can be $erive$ !ro' the 'essage issue$ "ith the e3ceptionI&he !ollo"ing e3ceptions A!or te'porary errorsB are also available to allo" e3iting o! the progra'; L*DI&G(BM*C&G7(&G>(?7% E ob)ect not !oun$ L*DI&GCA7C*++*% E cancelle$ by the user
(#ents
*vents $escribe the change in the status o! an ob)ectWor !lo" are usually starte$ using events
, &he !unctionality has been replace$- &he ol$ !unctionality is still supporte$ !or t"o releases-
Su"type
&he subtype inherits all attributes0 'etho$s an$ events o! the supertype an$ is open !or ne" custo'er<speci!ic attributes0 'etho$s an$ events- &he ey !iel$s o! the supertype an$ subtype 'ust be i$entical- &his 'eans that any 'etho$s an$ attributes $e!ine$ on the parent can be e3ecute$ an$ accesse$ on the chil$ ob)ect-
$ele*ation
&ransaction; Menu Path; SW0J &ools /usiness (orkflo" - =evelopment - =efinition tools - /usiness 3b4ect /uilder - 1ettings - =elegate
&his $elegation is po"er!ul because it lets you i'ple'ent your o"n business logic "ithout 'o$i!ying any SAP co$e- As long as the ob)ects are properly $elegate$0 your 'etho$ "ill be e3ecute$-
Business 4"1ect 5epository ,B45&ransaction; Menu Path; SW0J &ools &ools < Business Wor !lo" L %e!ination tool LBusniness (b)ect Buil$er
%ypes of Containers
Workflow Container
, &he "or !lo" container contains "or !lo"<speci!ic syste' variables an$ other ele'ents "hich are $e!ine$ e3plicitly, As part o! the $e!inition o! the "or !lo" tas 0 the i'port an$ e3port para'eters o! the "or !lo" are $e!ine$ as ele'ents o! the "or !lo" container, When the "or !lo" is $e!ine$ in the "or !lo" e$itor0 ele'ents can also be a$$e$ to the "or !lo" container&hese ele'ents are then Olocal variablesO "ithin a "or !lo" $e!inition an$ can be use$0 !or e3a'ple0 to set up a counting loop# Copyright IBM Corporation 2003
%ask Container
, *ach tas container alrea$y contains the "or !lo" syste' variable an$ any a$$itional ele'ents !or the 'etho$ para'eters o! the re!erence$ ob)ect 'etho$, Pou have to a$$ a$$itional ele'ents to the tas container !or a$$itional values are re5uire$ !or variable replace'ent in the "or ite' te3t or in the long te3ts
What is a Container7
Container ,e*inition Container Instance -/2
0 1iel$ values 0 Multiline lists o* *iel$ values 0 Object re*erences ,e*inition -untime
%""lication ,ata
Element name ,ata t!"e ,escri"tion Multi(line 3alue re*erence Element Element Element 4 5 2 ,atabase 1iel$ ,atabase 1iel$ Object T!"e ,e*inition ,escri"tion ,escri"tion ,escri"tion 4 5 2
6 6 -untime
Bindin*
, A bin$ing is si'ply the art o! o! pouring selecte$ container ele'ents !ro' one container into another, &he bin$ing e$itor is available "hen $e!ining; Wor !lo" $e!initions &riggering events Wor !lo" steps Wor !lo" steps A Stan$ar$ roles/ (b)ect 'etho$s "ith para'etersB , &he bin$ing e$itor al"ays re!erences the container to receive the application $ata- Bin$ing $e!initions can re!erence; Constants 9ariables Acontainer ele'entsB Syste' !iel$s
Container 0 $ataflow
&ork*lo) Container Task Met'o$ Event -ole Container Container Container Container
5 2 9 : 44 7
triggering event
8
4=
role
42
45 48
#
as!nc task
as!nc met'o $ 47
terminating event
Copyright IBM Corporation 2003
S&C>CONT%INE-
,eclare Container
S&C>C-E%TE>CONT%INE-
Initiali?e Container
S&C>-ELE%SE>CONT%INE-
-elease Container
,eclare a variable as t'e ke! o* !our object0 ,%T%0 M%TN- LIEE M%-%(M%TN-B 1ill t'e ke! )it' a value0 M%TN- F C452789DB ,eclare a variable as an object0 ,%T%0 M%TE-I%L TYPE S&C>OBAECTB
Create an instance o* !our object in !our "rogram0 S&C>C-E%TE>OBAECT M%TE-I%L CM%-%D M%TN-B
Object t!"e *rom BBOB-B Ee! o* object !ou "reviousl! $e*ine$
rans*er value o* !our object instance to t'e container element0 S&C>SET>ELEMENT CONT%INE- CM%TN-D M%TE-I%L
# Copyright IBM Corporation 2003
Element0 P-Items
(#ents
(#ent
An event $escribes a possible status change !or an ob)ect in the SAP Syste'Be!ore an event can be use$ in a "or !lo"0 it 'ust be $e!ine$ in the Business (b)ect .epository !or the ob)ect type*vents 'ust be triggere$ e3plicitly- &he application itsel! can be the triggering agent-
Change %ocu'ent
Status Manage'ent
Message Control
Speci!ic 4. &ables
Status Manage'ent
Maintain the processing progra' .SW*MC0J "ith the >(.M routine C.*A&*G*9*7& !or the output type *9*7 an$ trans'ission 'e$iu' K-
-eceivers
#
Creator
Copyright IBM Corporation 2003
(#ent %race
&ransaction; SW*+ Menu Path ;Basic 'enu <@ &ools <@ Business Wor !lo" <@ %evelop'ent <@ ?tilities <@ *vents <@ *vent &race-
4r*anisational Structure
A$$itional organi6ational units Create )obs Create positions Assign 4ol$ers Assign tas s
#
Create Sales region 0 Pro$uction A$'inistrator 0 Sales Manager Sales Manager L eastern None
A*ent
, , Agent is an e3ecutor o! a "or ite'Agent is responsible !or e3ecuting a tas in a "or !lo"Agent is $eter'ine$ by the syste' either through organi6ational chart or $irectly i! user is assigne$ as agent !or a particular tas I! the agents o! the in$ivi$ual "or !lo" steps are $eter'ine$ using the custo'er<speci!ic organi6ational chart0 your agent assign'ent in the "or !lo" re'ains !le3ible to change-
%ypes of A*ents
Possi"le a*ents are a collection o! agents "ho 5uali!y to e3ecute a "or ite'
Selected a*ents are those possible agents "ho are electe$ to e3ecute a tas at runti'e
Actual a*ent is the agent a'ong those selecte$ agents "ho actually processes the "or ite'
Copyright IBM Corporation 2003
5ole 5esolution
A role $e!ines rules by "hich selecte$ agents can be $eter'ine$ at runti'e through role resolution- .ole resolution restricts the nu'ber o! possible agents-
9ole 9esolution
Standard 5ules
A rule container is $e!ine$ !or each rule&he rule para'eters $eter'ine "hich in!or'ation is re5uire$ !or the rule resolution to be e3ecute$ at runti'eI! an error occurs $uring rule resolution0 setting the ter'ination in$icator !or the rule resolution $eter'ines ho" the "or !lo" "ill continue; >lag is selecte$ < the "or !lo" assu'es an *rror status an$ a noti!ication is sent to the "or !lo" a$'inistratorIn$icator is not activate$ < the "or !lo" !or"ar$s this "or ite' to A++ possible agents-
5ule Basics
&ransaction ; P>ACGI7SACreateB Menu Path; &ools L Business Wor !lo" L %evelop'ent L %e!inition tools L .ules !or Agent Assign'ent L Create/Change/%isplay-
*ach rule gets a = $igit generate$ by the syste' pre!i3e$ "ith AC .ules can be teste$ using P>&C or by !unction 'o$ule Q.4GG*&GAC&(.SR
George Peter
Anna Michael
Areas o! .esponsibility
9alue >ro' AS +S Which 9alueT >ro' &o HS NS 7a'e *'ployees !ro' A<N *'ployees !ro' +<N Which Agent Mr- An$re" Mr- Miller
*valuation path $escribes ho" to !in$ one or 'ore organi6ational ob)ects base$ (n an initial organi6ational units *3a'ple
(#aluation path W>G(.G?7 W>G(.G?S ?SGC4*> SAPG4(+% 'eanin* Get organi6ation unit !or a user i$/person i$ All users o! a organi6ation unit0)ob0 position Superiors o! a users 4ol$er o! a position
$escription &ype o! organi6ational 'anage'ent ob)ect I% o! organi6ational 'anage'ent ob)ect (rgani6ational 'anage'ent ob)ect
J23-
Create a rule setting the type Q>unction to be e3ecute$R*nter the create$ !unction 'o$ule na'e Create container ele'ents-
Possible agents
Hser Position Aob OrgB Hnit Person
,e*ault role
Business Wor place
T%SE
)ow are Selected A*ents $eter ined With and Without a $efault 5ole7
Possible %gents
Triggering Event Task $e*inition )it' no $e*ault role Task $e*inition )it' $e*ault role
Workite appears in user>s In"ox (xecute Workite $isplay I$oc for user processin* ,I$oc ethod ?Input/ore*round?/ix error and reprocess I$oc or /la* I$oc for deletion A.( tri**ers end e#ent
input >inishe$
Workite co pleted
* 3 c e p tio n . a is e $
% e te r ' in e . e c ip ie n ts
. e s ta rt th e p ro c e s s
> i3 th e e r r o r
Pes
C a n e rro r b e ! i3 e $ T
7 o
*n$
P u rg e th e I% o c
Active Monitoring
Active 'onitoring allo"s to speci!y threshol$ values !or the state o! the syste' >or e-g threshol$ can be on the nu'ber o! I%ocs in error or the ti'e li'it .eport Progra' .S*I%(CA can be e3ecute$ perio$ically Selection screen ta es as input the threshol$ values an$ persons to be noti!ie$ When $e!ine$ threshol$ is e3cee$e$ Single Step &as &S302000== is e3ecute$
7ecessary Steps;
Create ne" ob)ect type in Business (b)ect .epository !or I%(CU ob)ect is chil$ o! I%(CAPP+ Create ne" custo'er tas Create event<couplings lin ing
*vent Qinput*rror(ccure$R lin e$ to stan$ar$ tas *vent Qinput>inishe$R to !unction 'o$ule Create ne" ob)ect type as chil$ o! I%(CPACH*&