/bpma nalytic s . Go to the Tasks tab.
516
©Copyright. All rights reserved .
Lesson: Managing Processes with APls
Note: The tasks chart displays the top tasks and their status for the current date in graphical format. The time duration chart displays the maximum, minimum, and average time taken by the top tasks from start to end. The top tasks in the chart imply that the corresponding task definition has the maximum number of tasks instances. Use the following procedures to view tasks: •
To view tasks in a particular state in the Top Tasks chart, choose the appropriate status from the Select Status drop-down list.
•
To view tasks for a particular time period in Top Tasks chart, choose the appropriate time interval from the Select Duration drop-down list.
•
To view tasks in a particular state in the Time Duration graph, choose the appropriate status from the Select Status drop-down list.
•
To view tasks for a particular time interval in the Time Duration graph, choose the appropriate time interval from the Select Duration drop-down list .
•
To view the number of tasks opened and completed for a particular t ime period in the History graph, choose the appropriate time interval from the Select Duration drop-down list.
To display the most recent statistics of tasks, choose Refresh. The Analytics Public API for Business Users It is also possible to use the BPM analytics public API (AnalyticsManager, com.sap.bpm.analytics.api) to obtain analytics information for business process administrators and business task administrators. You can display statistics pertaining to processes, tasks, and events. To be able to use this API, the current user must be a business process administrator or/and a business task administrator for any active instance on the system. The archived instances are not taken into account. The statistics provided by this interface includes only the process instances for which the logged in user is assigned as one of the business process administrators and the task instances for which the logged in user is assigned as one of the business task administrators.
©Copyright. All rights reserved.
517
Unit 9: Process and Task Customization and Extension
518
©Copyright. All rights reserved .
Unit 9
Exercise 22 Use Analytics to Check a Process
Business Example
As a business management process expert, you need to know about the built-in analytical functionalizes of the BPM . In this exercise you will use the BPM Analytics. In this exercise, when values include##, replace the characters with the number that your instructor assigned to you. 1. Start your BPM process. 2. Call the function /bpmanalytics and use the BPM Analytics Dashboard to view and change details about the display of information. 3. Use the Processes tab.
___ -·...._
·-
•
.......,_
••• I I
,,,
·-
-o..--.
"~
• l• &oot
'
..
--
•'
·7'i.
I. I
I\
/\
' •!------------+----+----+-\---~
l • l - - - - - - - - - - - - t ' C -.... ' --l--' ''\--- - 1 1------------:;~'-~',----7'--T-'-~/' \ I \ / ' -...._
Figure 390: BPM Analytics Processes Tab
4. Use the Tasks tab.
-
•
·-
--
··-
---·
--
C..-111-
·-----------------·1-------------; ,,,,__ ·''- r - - - - - - - .
_________________ _ ' ;
j:!------------+-'-\------.·
-
••
-
... •a.
--·
$'.
...
.......
\
••
Figure 391: BPM Analytics Tasks Tab
©Copyright. All rights reserved.
519
Unit 9 Solution 22 Use Analytics to Check a Process
Business Example
As a business management process expert, you need to know about the built-in analytical functionalizes of the BPM . In this exercise you will use the BPM Analytics. In this exercise, when values include##, replace the characters with the number that your instructor assigned to you. 1. Start your BPM process. a) Start your BPM process using the Process Repository. For instructions on performing this step, see the exercise Start a Business Process from the Process Repository. 2. Call the function /bpmanalytics and use the BPM Analytics Dashboard to view and change details about the display of information. a) In your internet browser, enter the following url: http :/ / nwktdcOO. wdf . sap . c o rp : 50000 / bpmanalytics The BPM Analytics screen appears displaying an overview of all processes, tasks, and troubleshooting (as shown in the figure entitled BPM Analytics Dashboard. This screen is realized using U15). w
i.V......- . ....
----
DASHBOARD ""'•~••r•
-••>;•
·-
_................ ... ..
_
I
3
··--
2 0 4 0
u
•
.......
,.__
---
-
t;O:."•
1
2
•
-·
--
' ' __ ,,._·--...i
••
-u
•
.......
:
:$'••$
4 -
•I
'
I
I
I
,I
I
"
\
"
.. - - -- .. .. .. - -. ..fio··-. .. ... .. - - 'I
/X,
--~ ·-~·-
\
\
...... ,"
•
o-
Figure 389: BPM Analyt ics Dashboard
b) In the Dashboard tab, choose the fo llowing areas and change the time-related entries within them as you wish (choose Refresh after changes): •
520
Top Processes
©Copyright. All rights reserved .
Lesson: Managing Processes with APls
•
Top Tasks
•
Business Activity (lower right-hand corner)
•
Change the values in the View Details links
c) In the Troubleshooting area (lower left-hand corner), choose View Details for one of the four rows. In the browser, a new tab opens--the Manage Tasks: Task Instances screen. 3. Use the Processes tab. OA"-'!l"-..."1:
PROCESSES ,... ~~
..,.,,._...
1...001
-
•
---G:
--
-
.
·-
·-·
.
·-... ....
t
0$
•
:~
1
11
I
1:····· ......
--
Jf
0...-h -
=
-
-·-
, •t - - - - - - - - - - - -.,.------I\ : ·t----------------1+ - - - -f-\ - , . . - - - I \ ~ Jf-------------1--\----+-+---•
/ \ I \ 1· 1 - - - - - - - - - - - l - - - + --+ -\----
- - - .. - .. - - - .. -
-- --
• t----------~~'-~\,.----7/--\-\----,7"'~ \ I \ ............_
..
~
~
.. ..
~
Figure 390: BPM Analytics Processes Tab
a) Choose the Processes tab. b) Change the entries in the available fields and check the information displayed. Changing the field entries in this tab allows you to tailor the view by various attributes, such as the current state of the process (In Progress , Completed, or In Error). 4 . Use the Tasks tab. ,.
n .. •..n·w:.i
04•-
P11
TASKS
I ·~. ..
___ ·-·-...,
1"11Vx
•
,...II
' I
I
'I
'
.
·-
'
-
··-··--
J_ •
u
•
~-..
••
J
n
•
''
•
-
·
---
. ~.
--
'. ' Cw-loo-. ,...........
., .
-
•1-------------..---------
i:,______________,/.____,,\_______
l •l-----------,.i'~ ' ------• I \ /
\
.t::::::;:::;;;;;;:::;;;:;;;;;;::;;;:;;;;;;:;;;;:;;~ ..=::-=-·~ ·;;;;;;:;;;;:;;;;;;;;:~~~ '= •* »W ... .,. ,,., •+• ..._ •& ...
••
.,.
to»
••
1• s
...
·~·
Uflo
Figure 391: BPM Analytics Tasks Tab
a) Choose the Tasks tab. b) Change the entries in the available fields and check the information displayed. Changing the entries in this tab allows you to tailor the information displayed for the process tasks.
© Copyright. All rights reserved.
521
Unit 9: Process and Task Customization and Extension
c) Check to determine of any of your tasks are in an error state.
522
©Copyright. All rights reserved .
Lesson: Managing Processes with APls
LESSON SUMMARY You should now be able to:
•
Manage processes with APls
•
Check processes and tasks with Analytics
©Copyright. All rights reserved.
523
Unit 9 Lesson 2 Managing the Business Process Management In box
LESSON OVERVIEW In this lesson, you will learn how to manage the attributes of the BPM lnbox and use it to deliver tasks. LESSON OBJECTIVES After completing this lesson , you will be able to: •
Deliver tasks using the Business Process Management lnbox
•
Manage Business Process Management lnbox attributes
Business Process Management lnbox Requirements
OPEN TASKS (8)
1!11 !·-5
.., (2r>en Tasks
, AH Tas"Ks Re
"
T3S.k Thlt
.• • En!« Puttbase ReQuest 05 TaSk • •• En'.er Purmase ReQuesi 05 Tas~ •• En~er Purchase Request OS Task
.•'
•
En:er Purc.hase Reques& OS TaS1<
•' En=er Pvrcnase Requesi 0$ T;i$ ' •;,. E~er Putehale Requesc 05 Ti!s.\(
F
J
Cre-auon Dai.
•
OUe Date
SUUUI
All< 22, 201'
Ready
Ap<7, 2014
Ready
Ape 4, 20t•
Re.;dy
AtJf 4, 2014
ReseNed
"""4. 2014
Rti
"""4, 201d
""'""
~ Ell
Ap<4. 2014
•~
""" 4 2014
Eteef Purcnase ReQutse ~ Ta&\I
o,
.... On Behilirf Ot
Rtady
Rtacy
-----
o.
P11<>111Y
Figure 392: The BPM lnbox
The BPM inbox provides easy, simplified access to the business outcomes of BPM processes. The BPM in box is a central workplace for a business user to view and perform actions on tasks from the BPM system, including the following:
524
•
View a task
•
Claim a task
•
Release the task which is reserved for you
©Copyright. All rights reserved .
Lesson: Managing the Business Process Management lnbox
•
Complete a task
The BPM inbox is accessed through the following url: http: //
Business Process Management lnbox Configuration Configuring BPM lnbox Users The BPM lnbox requires additional administration and portal roles, comparable to the roles used in the BPM . The following table lists the administration and portal roles used in BPM lnbox to view and work on the corresponding tasks: Table 9: BPM lnbox Roles Role Category
Role
Description
Comment
Administration UME Role
U nifiedl nboxUserRole
Unified InboxUserRole enables the user to access the tasks and their details within a BPM lnbox application.
Data source: UME database
Portal Role
com.sap.bpem.Endus er
BPEM End User role enables the user to work on the tasks and task execution user interface within a BPM lnbox application.
Data source: portal role
The following procedure is used to configure users for BPM lnbox so they can access and work on the tasks: 1. In your browser, enter the following url: http: I /
Search Criteria
User Role
Accesstasksinthelnbox
UME Database
UnifiedlnboxUserRole
Work on tasks
Portal Roles
com.sap.bpem.Enduser
Managing Substitution Rules in the BPM lnbox
©Copyright . All rights reserved.
525
Unit 9: Process and Task Customization and Extension
It is possible to enable substitution in BPM lnbox to either nominate a user to whom you can assign your tasks or to take over tasks from other users in case of planned absence or during an emergency. The planned and unplanned scenarios can be managed by substitution rules. To view all substituted tasks for a user, choose the Tasks Assigned To Me option from the A// Tasks drop-down list. If more than one user has assigned tasks to the user, who checks substitutions, it is possible to select the user who has nominated the substitute by selecting the On Behalf Of drop-down list. As a substitute, the tasks displayed in the inbox are the tasks that are in Ready status in the assignee's inbox. To work on a task, the task is to be selected, then Claim is to be chosen. When a task is claimed , the task moves from the Task Assigned To Me list to the My Tasks list and its status changes to Reserved in your inbox. On refreshing the task list, the task is no longer visible in the in box of the assignee or other substitutes. To assign a task, on that currently the user is working on, to a substitute, the task has to be selected and to be released. As an assignee, when a task is assigned, the status of the task changes from Reserved to Ready. On refreshing the task list, the task is visible in the inbox of your substitutes. Creating Substitution Rules 0
Strosll.'linon ru'.e crea:eo
MY SUBSTllUTES
X
I AM SUBSTITUTING
New; Active
s.nce All' 22, 2014
Approvff05 Apiiro~·e.JOS is currently feteiving
yolJf tasks
Un1i l\llr Tl 20 14
c.a on I
•
Figure 393: Substitution Ru les
To create substitution rules, use the following procedure: 1. From the Settings icon, click the drop-down arrow and select the Manage Substitution Rules option. 2. In the My Substitutes screen, choose New to create a substitution rule. 3. In the Create Substitution Rule screen, enter or choose a user in the Substitute field 4. If you are unavailable due to planned leave, set Automatic Forwarding to On. The substitution rule is displayed in the Inactive section of the I Am Substituting tab of the substitute until the current date. The rule is activated on the current date and the tasks are displayed in the Active section of the substitute's inbox. 5. If you are unavailable due to unexpected absence, create the substitution rule in advance and set Automatic Forwarding to Off. The substitution rule is displayed in the Inactive section of the I Am Substituting tab of your substitute. To receive your tasks in the task list, the substitute must activate the rule by choosing On . Enabling Substitution Rules To enable substitution rules, following the procedure below:
526
©Copyright. All rights reserved.
Lesson: Managing the Business Process Management lnbox
1. Choose Manage Substitution Rules . 2. In the My Substitutions tab, view the rules you have created.
Note: The Active section displays the substitution rules that are within the current date range. The Inactive section displays the substitution rules you have created in the past or for a future date. If the rule is created for a later date, the rule moves to the Active section on the start date. If the start date of the rule has exceeded the current date, the rule is no longer active and the status changes to Outdated.
3. To stop your substitute from receiving your tasks, disable the substitution rule by choosing the Off button, 4. To delete a substitution rule, choose the Delete icon. 5. In the I Am Substituting tab, you can view the substitution rules created by other users who have nominated you as a substitute. The Inactive section displays the substitution rules which you have either not accepted or which are not within the current date range . The rule moves to the Active section and you start receiving tasks of your assignee in your inbox. To accept or to take over the rule from the Inactive section, choose On. The rule moves to the Active section and you start receiving the tasks of your assignee in your in box.
Different lnboxes for Task Delivery Operating Tasks You can view the tasks that are assigned to you and perform one of the following operations at a time: •
View at task
•
Claim a task
•
Release the task which is reserved for you
•
Complete a task
To view operating tasks, perform the following steps: 1. Log on to your BPM lnbox at the following url: http: I /
©Copyright. All rights reserved.
527
Unit 9: Process and Task Customization and Extension
4. To claim a task which is assigned to you (and complete it or release it to another user) choose a task in the task list. The Claim, Open, or Release option is enabled or disabled based on the status of the selected task. The detailed information on each task status and possible actions are explained in the following table: Table 10: Task Status Actions Task Status
Possible Action
Status Change
Ready
You can claim the task
Reserved
Reserved
You can claim the task
Ready
You can complete the task
Completed
Completed
No operations possible
No status change
In Progress
You can release the task
Ready
You can complete the task
Completed
Note: You can also execute actions on multiple tasks that have the same status. To do so, select multiple tasks (Ctrl+Select) and choose the appropriate action button. For example, to complete multiple tasks, select two or more tasks from the task list table and choose Open . The task execution user interface is opened with multiple tasks. You can navigate to a specific task using the previous and next navigation icon and perform required action and complete the tasks. To filter the tasks, choose the Filter option and choose the required criteria.
Managing Tasks with BPM lnbox You can manage tasks in the following ways: •
Share a task with other users who can contribute to its execution. Task sharing allows the owner of the task to invite contributors to work on a particular task instance. Every user can be a contributor, except the owner. If any user is invited for a task contribution, that user will get the task in their task list in the BPM lnbox. If they open the task, they see who the actual owner of the task is and the task description, if any.
528
•
Delegate the task (if you want to completely hand over the task responsibility to another user).
•
Put back the task to the task owner if you are not able to complete it or do not have the resources to complete it.
•
Put back the task to the task owner if you are not able to complete it or do not have the resources to complete it.
•
View task details and process the task.
•
Add and download attachments in the form of documents or URLs.
©Copyright. All rights reserved.
Lesson: Managing the Business Process Management lnbox
•
Add notes that are visible on all process levels. Depending on the availability that is set, you can see all previously added notes along with details such as who added the note and on what date and time.
Deleting a Task To delete a task, use the following procedure: 1. In the BPM lnbox, choose the task you want to delegate. 2. In the Task Execution screen, open the Actions menu and choose Delegate . 3. In the Delegate dialog box, enter the name of the user you want to delegate to the individual task. To find a particular user name, enter the first name of the user in the User field and choose Find. In the search results, choose the user and choose Go. The applicable user is automatically entered in the Delegate dialog box. 4 . In the Delegate dialog box, choose OK. Once you have delegated a task, you cannot complete this task. The delegate is now the owner of the task. Only this individual task is delegated to the user nominated as the delegate. Putting Back a Task To put back a task. in the Task Execution screen, open the Actions menu and choose Put Back. The task is put back and the Task Execution screen closes. Managing Attachments To manage attachments, use the following steps: 1. In the Task Execution screen, open the View menu and choose Attachments. 2. From the Attachments area, in the Add menu, choose whether you want to add a file or a url. 3. If you want to attach a f ile, choose Browse and select the file from a file directory. 4. If you want to add a title to the file, specify the title in the Title field. 5. To make the selected file available only for a particular task, select the Only for members of this task option. 6. To make the selected file available for entire process, select the For all involved users of embedding process option. 7. Choose OK. 8. To download an attachment, choose the title link. 9 . To delete an attachment. open the context menu of the icon next to the attachment title and choose Delete . Adding Notes To add notes, use the following steps: 1. In the Task Execution screen, choose the View menu, then choose Notes.
©Copyright. All rights reserved.
529
Unit 9: Process and Task Customization and Extension
2. Choose Add.
Note: You can customize your note by text by using the formatting button. You cannot delete notes.
3. To make the selected file available only for a particular task. select the Only for members of this task option. 4. To make the selected file available for entire process, select the For all involved users of embedding process option.
530
©Copyright. All rights reserved.
Unit 9
Exercise 23 Configure and Use the Business Process Management lnbox
As a business management process expert, you need to know about the built-in management in box of the BPM as part of the BPMANALYTICS transaction. In this exercise, when values include##, replace the characters with the number assigned to you by your instructor. 1. Check if Administrator## and Requestor## have the necessary authorizations. In order to access the lnbox tab, authorizations must be extended . First, check if the roles for the users Administrator## and Requestor## include those in the following table. If they do not, include them. Role Category
Role
Description
Comment
Administrator UME Role
UnifiedlnboxUserRole UnifiedlnboxUserRole Data source: UME database enables the user to access the tasks and their details within a BPM lnbox application.
Portal Role
Data source: portal com.sap.bpem.Endus BPEM End User role er enables the user to role work on the tasks and task execution user interface within a BPM lnbox application. BPEM End User role enables the user to create substitution rules and forward tasks only to those users who have BPEM End User role.
2. Use the lnbox tab.
© Copyright . All rights reserved.
531
Unit 9 Solution 23 Configure and Use the Business Process Management lnbox
As a business management process expert, you need to know about the built-in management inbox of the BPM as part of the BPMANALYTICS transaction. In this exercise, when values include##, replace the characters with the number assigned to you by your instructor. 1. Check if Administrator## and Requestor## have the necessary authorizations. In order to access the lnbox tab, authorizations must be extended . First, check if the roles for the users Administrator## and Requestor## include those in the following table. If they do not, include them. Role Category
Role
Description
Comment
Administrator UME Role
UnifiedlnboxUserRole UnifiedlnboxUserRole Data source: UME database enables the user to access the tasks and their details within a BPM lnbox application.
Portal Role
Data source: portal com.sap.bpem.Endus BPEM End User role er enables the user to role work on the tasks and task execution user interface within a BPM lnbox application. BPEM End User role enables the user to create substitution rules and forward tasks only to those users who have BPEM End User role.
a) In your internet browser, enter the following url: http : I / nwktdcOO . wdf . sap . c o rp : 50000 / useradmin b) If requested, log on as user Administrator## .
532
©Copyright. All rights reserved .
Lesson: Managing the Business Process Management lnbox
c) On the Search screen, in the Search Criteria field, choose User , and in the second field enter Administrator##. Choose Go.
I
welcome System Administrator01
I
Identity ~"nagerrent
~
Z'llJB
l/J
II nport II COnfiguration II Consistency Oleck I
Search Search Criteria: !User
...-1IAI Date Som:es
IAdlllnistrator01I.
~ ~ I Advanced Search I
I Create User II Copy to New User 11 I Delete 11 I Lkllock II Lock II Generate New Password 11 I Export I
Figure 394: Search for the User Administ rator##
d) Double-click the line with the result. The details for the user appear. e) In the Details of User Administrator## area, choose the Assigned Roles tab. Details or user Aelmlnistrator01
I11~lod•t I 11s.ve Ic-.. I Generol i>lonretlon
Account. hfometion
Conte
Addiional nlorn11tion
-
Assigned Roles
Assigned GrOUP
I
Assigned Rotes searc.h Criteria:
R'Tic.,...
Nome
.§)
i'.,} g') g') i'.,}
IA• Data Sources · I
o
surch Re
•
CQ2J
0M
Oeta SOurce
NN....S\EffiACMN
MVA_Sl.fl:RACMN
U\€Dotabese
ped:ponaLcontenL'e-"ery_user1generaYeuJcle
SWid!lrd User Role
~IRoie
J
U\€Dot8bes•
SFM.._Flll_Access_ROLE SA.P_JAVA_WS_AC:MN_B!Z
SA.P_JAVA_WS_ACMN_BIZ
l.t.E Dot8beso
SA.P_fR1..SuperOisplay
Ne1Weaver BR.IA<*mlstra!or Read Only
Lt.E Database
I
Figure 395: Assigned Roles
f) In the Name and Description columns, search by scrolling the two roles above. g) To add the two additional roles, choose Modify. h) In the Availalable Roles area, in the Search Criteria field , choose All Data Sources for the first field. In the second field, enter Unifiedinbo xUs erRo l e. Choose Go.
Note: The entries in this search field are case sensitive.
i) Choose the displayed entry, then choose Add.
© Copyright. All rights reserved.
533
Unit 9: Process and Task Customization and Extension
liii
Available Roles Search Criteria: Al Deta Sources
r
lib
P
Narre
~
UnifiedlnboxUserRole
.i.
.... Unifiedlnbo.xUserRole
Go
Description
Oeta Source
D
ut.E Oetabase
n Figure 396: The Additional Role Unified lnboxUser Role
j) Search for the second role (com.sap.bpem.Enduser) and add it to the assigned roles. k) Choose Save .
liii
Assigned Roles Search Crite ria:
lib
r
IA• Dela Sources · I
P... Narre
~ 11 ~ I~
.i.
I
Description
Go
I El
Dela Source
SAP_Xl_OB/B..OPER_J2EE
ut.E Delabase
uoot_TterN
Ut.E Delabase
SAP_X1_82B_AOlvlNISTR. ..
UtvE Oelabase
~ UnifiedlnboxUserRole
LM: Oelabase
~ pcd:portaJ_conlentlcoms ... BRM End User
R:>rtal Role
0
'~
IRem:ive I Figure 397: The Two Additional Roles Assigned to t he User
I) Repeat steps c through k for the user Requestor##. 2. Use the lnbox tab. a) Switch back to the tab containing BPM Analytics, then choose the lnbox tab. b) If requested , log on as Requester## to see your tasks. SAP
Roo R.ll!-0
Hl't.1 lriOoJ
INBOX OPEN TASKS (1)
T '· 'ti T..alillt
!
~t!'l'l«'-.11t~OClt~•
. .......
-
0.
o.
m" ,. Figure 398: BPM lnbox
c) Choose a task to view details for it.
534
©Copyright. All rights reserved.
Lesson: Managing the Business Process Management lnbox
oo..:
~u•itu•~~
Ooo!oer.
fl~I00,119n
51- !11?Joi1•" P••r,,ir, kl!
Alt.cl-: o
Pio~:
l'..n11•i•OfiltlM"PoMOO
~
o-
Ta:lc ApplkMion
'
..
Figure 399: Details of a Task
d) If requested, enter your data and choose Confirm. e) Log off as user Requestor## and repeat the same steps with user Administrator## .
Note: A notification may appear asking you to change the compatibility mode in Internet Explorer. If this occurs, change to a Chrome browser. This can be found under Start~ All Programs~ Google Chrome .
©Copyright . All rights reserved.
535
Unit 9: Process and Task Customization and Extension
Business Process Management lnbox Custom Attributes Depending on the products, custom attributes can be set and delivered/transferred in the business processes and then used in the inbox for additional purposes, like assignment, sort, or display. These attributes are to be assigned in a task and mapped depending on the business data. In the BPM lnbox, these attributes can be used with the Filter button.
Note: Display of the custom attributes requires a release higher than 7.40, SP03
536
©Copyright. All rights reserved.
Unit 9
Exercise 24 Use Business Process Management lnbox Custom Attributes
Business Example
As the business management process expert, you want to use custom attributes in your BPM inbox in BPMAnalytics. In this exercise you assign custom attributes to your BPM inbox. In this exercise, when values include##, replace the characters with the number that your instructor assigned to you. 1. Set custom attributes for your product, PO_Product_##, according to the following table: Field
Value
Name
started
Label
started at
Type
string (not changeable)
2. Use custom attributes in the BPM lnbox.
© Copyright . All rights reserved.
537
Unit 9 Solution 24 Use Business Process Management lnbox Custom Attributes
Business Example
As the business management process expert, you want to use custom attributes in your BPM inbox in BPMAnalytics. In this exercise you assign custom attributes to your BPM inbox. In this exercise, when values include##, replace the characters with the number that your instructor assigned to you. 1. Set custom attributes for your product, PO_Product_##, according to the following table: Field
Value
Name
started
Label
started at
Type
string (not changeable)
a) In NetWeaver Developer Studio, in the Composite Designer perspective, choose your product, PO_Product_##. b) Choose Process ~[Local development] pm_product_##/pr/pm Modeling~ Tasks.
~
Process
c) Double-click the task Enter Purchase Request##Task. The Enter Purchase Request## modeling tab opens. d) On the modeling tab, choose the Attributes and Actions tab. e) In the Attributes and Actions tab, in the Custom Attributes area, enter the values shown in the table in step 1. f) Add a new line containing the default parameters by choosing Add.
Note: You can change the default parameters by Name and Label directly in the line by double clicking on the default parameters.
g) Choose Edit to create a new expression.
538
©Copyright. All rights reserved.
Lesson: Managing the Business Process Management lnbox
The Expression Editor appears.
liii
Attributes and Aciioos
>/H,lt~
,.,......., .,_ ......... ..,_ ,,....., "•"" ..........
.,,,.,.«t... l:it f'
~'
:.I
~ ~~tkll
.!!!!....
·-
....~
'" I
ilM#MM
J
iii:;.~~
:.I
~
l!Ot 11.l
. I I
I
~lh·
.W•fr1!·~:n-.,l(lJIO}~I~
?
•o,
Figure 400: Add a New Attribute
h) In the Expression Editor, enter (Task.Attributes/activationTime) cast as xsd: string, then choose OK. i) Choose Save. j) From the context menu of PO_Product_##, choose Deploy. In the Product built required dialog box, choose Build and Deploy. The successful deployment can be checked on the Infrastructure Console tab. 2. Use custom attributes in the BPM lnbox. a) Start your process using the Process Repository. The steps for starting a process using the Process Repository were described in a previous . exercise. b) In your internet browser, enter the following url: http: I /nwktdcOO. wdf. sap. corp: 50000 / bpminbox c) Log in with your user name (Requestor##) and password. In the lnbox, your task Enter Purchase Request## Task appears.
SAP
~1t1>u
'"' 01~1"·J~1'T•
!
INBOX OPEHTASl
m= . ....
.. Oan l atb
T ,,
0.
o. ~
...~1111111
~ EfWF\l
Figure 401: The BPM lnbox
©Copyright. All rights reserved.
539
Unit 9: Process and Task Customization and Extension
d) As shown in the figure entitled Custom Settings, choose the Filter View icon (point 1), then choose your task in the Task Type field (point 2). The custom attribute you set is started (point 3).
liii
OPEN TASKS (1)
mlei ...,
,.,nra;m
2
1 8 1~
Zl!ll
v
'
V!le..-tSfl•
...,...,
v
·~
.Cl6. ,.
...
pm
1 g ,,
"'
1
R.t~r.N
Tcdw Lff110.,
TOdtr
liltdl.lm H:g~
"'Pi'rigrt;$
U$11SO;J,.::
M;.CJ$(lflf,l;
L"!))0¥ts
Ne:•300tt*
Ret':\o
\'
3 b
!ask r1111
!:
..... ..
$lMdll
£1D:1P~1t11.-,eP.r11u~~O)·~~ lti14·01·14-t03i·~.s1 ~nt ;o
0.
.,._..,.
•
......
Ne•1~
.....
o.
,1;11 ~·. lo·.~
Figure 402: Custom Settings
Note: Display of the custom attributes requires a release higher than 7.40, SP03 .
540
©Copyright. All rights reserved .
Lesson: Managing the Business Process Management lnbox
LESSON SUMMARY You should now be able to:
•
Deliver tasks using the Business Process Management lnbox
•
Manage Business Process Management lnbox attributes
©Copyright . All rights reserved.
541
Unit 9
Lesson 3 Extending Processes with an SAPUIS User Interface
LESSON OVERVIEW In this lesson, you will learn how to create an SAPUl5 Start User Interface and start a process. LESSON OBJECTIVES After completing this lesson , you will be able to:
•
Extend processes with an SAPUl5 user interface
Process Start User Interface Development Tasks SUPUl5 technology can be used to start BPM processes. In general, a process can be started using a UI created with SAPUl5, or the SAPUl5 functionality uses the OData service. It is possible to consume a WSDL by an Ajax call, but it is recommended that a rest service be used for calling the WSDL. The BPM OData service enables simplified access to BPM task data with a custom user interface based on a modern Web technology like SAPUl5. SAPUl5 supports several data sources, such as XML and OData. The UI controls of a view are connected to a data source with a data binding, so that the controls are updated automatically whenever the application data is changed. A model is provided by SAPUl5 for each supported data source. If OData is the data source, the model instance is called ODataModel. The ODataModel enables the binding of controls to data from OData services. The constructor of the ODataModel has the service URL as a parameter to connect itself to the OData service. Requests to the service to fetch data are created automatically according to the data bindings defined in the UI controls.
542
©Copyright. All rights reserved.
Unit 9
Exercise 25 Create an SAPUIS Start User Interface and Start a Process
Business Example
As the business process management expert, you need to implement user interfaces (Uls) into your business process. In this exercise, you create a UI using the U15 technology. In this exercise, when values include##, replace the characters with the number assigned to you by your instructor. Note: In this exercise, you use the PO_Enhanced_## product, used in exercises 6, 9, and 18.
1. Import the service interface Sl_CustomerData as a WSDL file from the Y: \ \ TrainingSetup shared folder using the data in the following table to complete the Service Reference dialog box. Field
Value
Name
SI StartProcess
Description
Start Process
2. Create the process StartProcesswithU15_## . 3. Create a message trigger named Start SI StartPro cess .
- -
4. Implement the data object DO_Data. 5. Assign the pool administrator. 6. Test the process using the Process Repository. 7. Copy the source to PO_Enhanced_## /ui/web . 8. Customize the file class sapbpm.imp.SAPBPMOperations . 9. Change the service call in StartProcess_PO_##.html.
© Copyright . All rights reserved.
543
Unit 9: Process and Task Customization and Extension
Jii
15 28:08 28 01.2014 c~~~ , ;&p~~W:flCl~.VtUP \
V.4111:~ ~~~~
it(tountcyfield.9etV1lue()
~~ u~1
'
~~p.u&. ~...,Lc . V~l~C~ ~~~C . VCl«Ul~ ' ' '
(counec7tielci.prop (•valueState", sap.ui .core.Value.State .trrorj :l
else
11
!~ r.d the data to tbe f« ade here
$ .getJSCtl(host_and_port+"I po_e.ntha.."l(:ed_00...ui"i."eb/procesi_00/ sttttt?f irstMarre• "•f ir:t.Na::oeFie Jd .qetValue I)+"' lestffame• ''+la:JUitmtrie ld. //q< t ~a. llboerdOstaADdS
¥a.c d.&3hboardData •( trequestld
:daea.r~ ~tl~,
la.st!l&r!: : data. i&StNarre,tirsttJAllle :
city : dAta.c1ty,eountry : ctata.ct1unc.ry,:ipCod.e: : dat1. z1p(Ode, ered.ltLiru.t : dlta.eredltl.imit,
Figure 415: Changing the Service Call
10. Change the file web.xml to match your project settings. 11. Change the file web-j2ee-engine.xml to match your project settings. 12. Add the external Lib com.google.gson.Gson . 13. Add dependencies 14. Build and deploy. Change to the Composite Designer perspective and build and deploy the product
PO Enhanced ##. 15. Configure the inbound communication on NWA.
_,, r1a1 •.-·-...-..i. .-..-
11~«.?211111101•
....
ll;J
.........
~·*°'"
u '--~~l:U
,, _
l e...i-t~]tJ
y
--
4 "'"""'•~orl
™
r•..,.-.cs;,.... 1
. --·
............ .....
·-··-
...:.i...·.. -t11:~....
._ ...-.... ...........
~
~.-
-· -· .. m
~,,WNJ.T_"'O'U
~~' "'(11'\f
~
::..P_Jlln,U..T_.a'U
"'...-_ --
-ri-~
-
ai....-
.....
-J
Figure 427: Configuring Inbound Communications
16. Create the role Requesto r xx and assign it to the user Requestor_##.
-
Save all changes .
544
©Copyright. All rights reserved.
Lesson: Extending Processes with an SAPUl5 User Interface
17:14;50 28.01.20 14
I
Welcome System AdministratorOO
I t!en"Y •11111!9•"""' II "PM I~Ieon -11g -ur ~a= ,.,., "'"''ll=eons =;,=1enc=y=01=.. =~=-1 search
!Rote
SearehCrlterlo:
mEnter
· l~!A~•llel=•~S..="~"=es~_•,.I_____~ ~
8 $earch. P8"8mefer and choose Go
Details
11 ' ._y l I (S.ve II Cencel I General Information 1
/
I ....,.,_
~ I
~r------------===..
-"'"°""
O..trWon;
u-..
Ass i;ned Ae-tlons
~lf!!gU!!--'-""-~oo~---------~
Non-e< •
°""
Assi;nec1 Gfoop$
I)
Figure 428: Role Requester_## assigned to user Requester_## ( 1)
,, ~' 1.# 280120 14 !W'52~1~ 1 ~·11 '--X
H«•
s... ...,c.i...11: !11:;to
· Jl:.Ut11o!>S.U
~
•1'
-
lo - •I I ~-1 i1JEI ti
~-l'rs-
""' 1 -r l
--·
.. O.otf1*11
m-··.wc.•po:---·-•Cll>
~ 1 c-e1 J
~-~
""'..-.0~
.!....:.~~:I ....
~~
I
"""'~'"~-~'"'
.A•oilliekU.•n
- ................_ -· --- _
....~ll CtilHio:
'b
l tlo
a.....,,_., 6 """'~ a ~"'t(I
~a ~·Ill!»
~
.
Tw
°*"""'••
·~--......
&l«r~b
A$J.1Qn"l
EE
--~-
\ll•••
........ ·-·
SNIUlClbrtiJI I
"
'b. ,.... d
l
__ .-
• l
....
I
~1 .
°"""'~··
U4Qot"'-•
:"-W I
Figure 429: Role Requester_## assigned to user Requester_## (2)
17. Test the website.
© Copyright. All rights reserved.
545
Unit 9 Solution 25 Create an SAPUIS Start User Interface and Start a Process
Business Example
As the business process management expert, you need to implement user interfaces (Uls) into your business process. In this exercise, you create a UI using the U15 technology. In this exercise, when values include##, replace the characters with the number assigned to you by your instructor. Note: In this exercise, you use the PO_Enhanced_## product, used in exercises 6, 9, and 18.
1. Import the service interface Sl_CustomerData as a WSDL file from the Y: \ \ TrainingSe t u p shared folder using the data in the following table to complete the Service Reference dialog box. Field
Value
Name
Sl_StartProcess
Description
Start Process
a) Choose PO_Enhanced_##[vendor##.org] ~Process~ [LocalDevelopment]poenhanced_##/pr/pm ~Process Modeling~ Service Interfaces. b) From the context menu, choose Import WSDL . c) In the WSDL Import dialog box, choose Remote location/File system, then choose Next. d) In the WSDL URL Access screen, choose Browse. In the Open dialog box, chose the Y drive. e) Choose TrainingSetup
~
SAPBPM ~ Sl_StartProcess.wsdl, then choose Open.
f) Choose Finish. 2. Create the process StartProcesswithU15_## . a) Choose PO_Enhanced_##[vendor##.org] ~Process~ [LocalDevelopment]poenhanced_##/pr/pm ~Process Modeling~ Processes. From the context menu of Processes, choose New Process. b) In the New Process dialog box, enter the following data:
546
©Copyright. All rights reserved.
Lesson: Extending Processes with an SAPUIS User Interface
Field
Value/ Action
Name
StartProcesswithUlS ##
Create a pool with the following name and lanes
Select
Name (1st lane)
PoolAdministrator
Name (2nd lane)
LaneAdministrator
Project
[LocalDevelopment]po_enhanced_##/pr/ pm (should be pre-filled)
-
c) Choose Finish. The StartProcesswithU15 modeling area opens d) If the StartProcesswithU15 modeling area is not open, choose PO_Enhanced_## ~Process Modeling~ Processes. Double-click StartProcesswithU15 ##. e) In the process flow, delete the connection between the Start and End elements. To do so, choose Delete Connection from the context menu of the connection. f) Add a timer object named Intermediate Timer ##.
-
g) Choose the Intermediate Timer object, then choose the Properties tab. h) Choose the Timer Configuration view. i) Select Use an offset relative to timer creation time. j) In the Offset+ field , enter 2, and in the second field select Minutes .
I •I
i
"C Properties 0
1:3"
.'.l:S Relations ] 11; Problems} 0
Deploy View Console
l~ Wrastructtrre C011Sole l
J
Intermediate Timer
t:".:'====-1 General
0
Off
Timer Configuration Ev
...::..C.:....'==-'----1
I_
Use "" clfsel relotivo to timer creatiQn timo
0
+
[£
J IMir-..te(•) El
use expression
DefW>e the time alter v.llich ti>< time< ls triOQertd ('n millisecond<) Expres~on:
I
~----------
Figure 403: Configurat ion of the Timer
k) Using the speed buttons, drag a connection between the Intermediate Timer and the end event. The results appear as shown in the figure entitled The New Process.
© Copyright . All rights reserved.
547
Unit 9: Process and Task Customization and Extension
liii I
,-
'
...!Sa I St rt
I~ lntermedbte Tim...
I~
I
End
I:
.:
Figure 404: T he New Process
I) Choose Save . 3. Create a message trigger named Start SI StartPro cess.
- -
a) Choose the !Start event. In the Properties tab, choose Event Trigger. Choose the Messages radio button. From the context menu, choose New Message . b) In the Name field, choose New, then enter Start SI StartProcess .
- -
c) Choose Next. d) In the New Message Trigger dialog box. in the Service field, select the service interface SI StartPro cess.
-
e) Choose Finish. The newly entered information can be reviewed at two different places--at the Start Event, or by choosing the Event Triggers---+ Messages---+ Start_Sl_StartProcess branch in the Composite Explorer. f) Choose Save.
liii
-
•uw:J
,g sv:~....'"1! ~fbCJe
.
~
Ci! (louiDe<1el~om) 1>. wtZ>Jil'.e!> • eui.-l(;(J( •
... ·-
..
,,,_,
.. --
.
odfle QllO!f
El.umd St'Mcff
~.Jft~~lfl'~
Dxl.ft,tlft/IOW
Grm~,
J PO..~,.OO("'l'!fllbOO.o:}
0 """
c;l !W
B
·Zif (l«t.iOeY~ir:ftJ po_~~-®"i\ft Iii ~ CO'l'
Ef'l~ K:tl'.c:
..............
em ~~
9..-1.'! Pi'Ufl~
--
i ~-
• Setting'
~t~"l
0
http:lf~->;.qm>~~WO~d'X\9~ •:1
o.r.;,,. ~•:Mf\ • J ~ lt(tr'lQ lfl'd ooer
--
z ~~W!S rasi.s
""'"*"'
9'9 E_..-t ~ S:Q> we,~
@} SWt,.st~~ ltO•.t1~
jSJ_st~s l~,,SWtPl~011;1>'!'l.'Sl"'~QIJ:)
e w ~eitJ1Lev..t-e.t.e_1'1iJl'.m
-e st;)!1,.sa_si~n;cc•u •• ..; csca·~ ~ ~t.tq~SGo.rtiH
i& 11,U,Sets ~(S F~W
ID
J2B ~, ty~
{+£!_\ S1rvU
- I
fnt.aif.xes
S 1:11 h;Q:fJ-w,~orco.un
I
-
,
@ OSI~ s Os1_~DM t"1 O si_
Figure 405: Result of t he New Message Trigger Creation
548
© Copyright . All rights reserved.
Lesson: Extending Processes with an SAPUIS User Interface
4. Implement the data object DO_Data . a) Double-click the newly created process StartProcesswithU15_## in the Composite Explorer under PO_Enhanced_##[vendor##] ~Process~ [LocalDevelopment]po_enhanced_##/pr/ pm~ Process Modeling~ Processes . b) From the Palette, choose Data Object and drag it into the process. Name it DO_Data_## . c) Choose the Properties tab, then choose the Data Type view. d) Assign the date type StartProcess-http: //vendor##. com. 5. Assign the pool administrator. a) Choose the pool. b) Choose the Properties tab, then choose the Administrators view. c) Select Choose one or more UME principals . In the Principals field, choose Choose . d) In the Browse Principals screen , in the Principal Name field , choose User. In the second field, enter Administrator## . Choose Search. e) If requested, log on as Administrator##. f) From the search results, select Administrator##. Choose Add, then choose OK. g) Choose Save . 6. Test the process using the Process Repository. a) Build and deploy the process by choosing PO_Enhanced_## . From the context menu choose Deploy. From the Product build and deploy dialog box, choose Build and Deploy. b) In your internet browers, start the NWA, either by choosing an already open browser tab, or entering the url: http: I /nwktdcOO. wdf . sap . corp: 50000/nwa c) If requested, log in as user Requestor## . d) in the NWA choose Configuration~ Processes and Tasks~ Process Repository. e) Choose your newly deployed process StartProcessWithU15_## (displayed in the Details of Component po_ enhanced_## pr pm area). Choose the newly deployed process. Choose Start Process.
© Copyright . All rights reserved.
549
Unit 9: Process and Task Customization and Extension
liii
14 39 45 28,01 2014
...........
Ul' ...,.,,..,.....,.,....,., • ...,_.,
I I
1"'1•-'"_"_·.."'"" (Vel!OOtOO.C anf
-
...._._.
:20 14" 12'& 10 I 4 I & (kX eC>eve~m
00_..M!r..onc~-C
20 1 ~177tX6..~CIDceDeYcqim
...
po_UllMMCCl_OO~ (¥endcWOO .<~
~140127 1 3060$ (lccelOeveqim
•c...bt>e~~.....-8ft1va"1)rot ie6& •*•o conll
7'4003~1~ 17 0000 (5.
'"' ....
k""bcle~~.,~
7.•00!l 20f~ 1 1«IOO(.S.
It ~ OMcni~ S.-"1t.tn'llll ( $1111>.Coni
7 400J 20130$3Con9170000(&,
U:~or.11er.~--0tf>dd~~rour (s.op.c~
7. 4003 :Z.01~3Sl7 COOO t S
....
(MP CQIT(l
List o fVeNi o n s o f Con1ponent po_end1an ced_OO-pr- p m (vendo100.com)
I""""•• A0e&c1t.-111tA• I tJ : AC.tu• V.•i!>ti
-....... ...........
~
-
A~otbn OomTuil:°*>
D D
20 1~1~1 t 1101 2ttoee()(i11~1'11)
CJ
:0140127 10~3 tbt•~eloipmet'fl)
D D
~140127 104G43(loc •'°*'-•~)
~1
"°'
l.oolr:: /JI De-s!lrol!Oon
211109:6 ooc "'°'""~)
2Q 1 .4Q1~1 1~S 4leiecfl0$v e~"(lll'lt)
......,.
Oetalls of Com ponent po_enthonced_OO-.p,,..pm (vendorOO.com) end Versi on 20140128133:80!
_, .,_.OGe•••o~ THlfl
''
•
I Fhx.s s FbN JI StMI Roces•-1
,.....
__ .. ....
-"'...
..
I
--
Ct.tstotrr.~aln
-
~e.••Ch\JI!.
Figure 406: Process Started with the Process Repository (1)
f) In the BPM Process Startup: Process screen, enter the applicable values in the Values column. Choose Start Process .
fiii
or •I&
l!fl
·:~.f;(l).....,~i:;pA,.'\"Q.\~ 'Cf\
::t ~-~·Wlid'..
'" t' ,,,.,._. ...,.....1'41.,I•
-1fl
fPM~btl.0·'$/i),,'.,. )(I:.· ""*~·Yl'~...
~..... - h l r..o,.i.iJy,(fl;~;:_l!!l~.;.>'4(J
J: !'nn'&~cl'l\:dld, .. I t
BPM Process Startup: Process
~ra:i)n:
~01,.iu11;1,;
-
• Mi_~...
·• !htltme • trtll
~do:. I
:,
====1&w.!!-~-.I
~
"'1
Im~
"' SI?•"*'*•
........ ...
Ioe.~ . OWVWH I ,,l_Stlll=·=·~=·,.I._ _ _ _ _ _ __.
~t-
D D
r
D D D
. .........
D
• Dtbtf
D
~.,.
:~
•
•
••
•
••
~ Y.SO..IR.1 tQU'll'~wtl'MCl'~~~fO))pr.r~IAflri:~'"'~V*r
Figure 407: Process Started with the Process Repository (2)
g) In the BPM Process Startup: Process screen, choose Details, then choose View Started Process. h) In the Manage Processes:Process Instances screen, choose Show Process Flow. i) Return to the new tab where the process is waiting.
550
©Copyright. All rights reserved .
Lesson: Extending Processes with an SAPUl5 User Interface
14:39'20 28.01 .2014
D lrrtermedi ite Tlmer O
-.....
,,~·;,:
Figure 408: Process Started with the Process Repository (3)
j) In the Manage Processes:Process Instances screen choose Refresh until the process is completed 7. Copy the source to PO_Enhanced ## /ui/web. a) Choose the NWDS. In the Composite Explorer, choose PO_Enhanced_##[vendor##.org] ~User Interface. Open the node PO_Enhanced_OO/ui/ web. b) Using copy and paste, replace the nodes Source and Web Content with the source material foundat:Y:\\TrainingSetup\SAPBPM\SAPBPM_lO Solutions\EX25 . c) Select the folders Source and Web Content in the Y file system. From the context menu, choose Copy. d) Switch to the NWDS and select [LocalDevelopment]po_enhanced_##/ui/web. From the Context Menu, choose Paste.
© Copyright. All rights reserved.
551
Unit 9: Process and Task Customization and Extension
liii
D Y:\ JralnflgSetup\ SAPBPM \ SAPBPM _ l 0 _SOLU TJONS \ EXl 4
00
I · WOf'l.SMTro?S • ' ""(\\-t2382)(Y:) • Tr.inngs.tup • 5'>Pel'M • SAP!ll'M_IO_SOlUTIONS • ElC2< .
"=
-fdder
Or90'1ize •
.:.J
JAxxx.jdl
Io.ie modfied
Nome -
log
.;.J
• l{D I S-ch EX24
My..,.,.,
......
_. nwds
p2
I
Type
1/31/ZOI 4 2:22 AM
Fllefoldet
1/31/2014 2:22 AM
Fllefoldet
1/28/ZOl'I 3:51 PM
f )(ecutable Jar File
1~
186KB
p\,o;ns
EOO_O.«a
1/28/2011 5~36 PM
SCAFlo
n••
!j Recycle Bin
O_O.sca
1/28/2011 5:36 PM
SCAFlo
i,731 K8
.SJ SAPEIPr'1_20
8
PO_Emanced_20[verd«20) ~o Portal l!f Q Process 8
I
'
4i11 User lntetface W-ia [LocalOevelopmen ~ [LocalOevelopm Gl 'ib Oeployme
!I
JAX·WS
' 2'fJ pi&j
po_emanc '..20/u/vc (DC) Jpo_effia _20/u;/web riptor: [ IDevelopment) po_
bServlces
4J a\ JRE System Libr"'Y l;l
1.6.0.•3)
a\ Required Oevdo 12;.
$ 12;. def $~ gen 12;. '"'
~ test
'
(2;. Webe
Figure 409: Replacing the Content in t he Nodes
e) In the dialog box that appears, choose Yes to all.
liii
15.0J 51 28 01201' t;l-ia 1'°""'""-loo.~.Ofl/o>l"
e :t1!I ILocabewl°""""" oo.--.l.ooJ\Jlwtb Ii \t;i l~...-J '°-"""""°'·OO!U/w 'j) tJ lAX·WS Web Ser~
_,.De'"'"""
~ SW'C$
€ a\ :RfSy~lbbfY(ldtl.6.0_43) !!! ti; liA~-°"°"""""""'-"""' do
Ii""""
;)!. ""'
ti; "'
~ te~
@J "" WebCont... ~ 1.«~....po_ent:h¥lcedJ»..1,,
lil ..,...,.,. l'9'= Gil (lltetnol Servi"'$
{§) lrh'dtuctu'e
~~~~~~~~~~~~~~~~~~-' ""'
.c.t laQ>OPTIOr•AL t loi;::tin-aiodl.i.lf!>
J PO_Frodu:t_oo [vetlcbOO.com]
Figure 410: Replacing the Content in the Nodes--Overwrite
f) Repeat steps b through e for the Web Content folder.
552
©Copyright. All rights reserved.
Lesson: Extending Processes with an SAPUl5 User Interface
15:08:33 28.01.2014 ~ [localDevelopment] po_enthanced_OO/uilweb W· ~ Deployment Descriptor: [LocalOevelopment] po_entharw:ed_llOlli/web
Iii 8 J/>Y.·WS Web Services 8 fi!) source
e lJI S4P0Pm....p1 ijl [f)
8
[i) C
ill iutilja~_!i
fil sapbpm.servlet 00 {jj SAPBP~rvlet.jovo
ma\ JRE System Llbr.ry [jcl
a\ Required Development Components (3. cfg
l!I
e. def
00 ~ gen 1?7 src 1?7 test 8 WebContent El e;. i111a9..
e.
-[!I. wstomerPic.Pl>Q [!. newRoc1lrd.png f ~. PF png • r ~ sompleMop.png 1
-f!!.i soplogo.png
00 0> META•lr-1' S!Ol> resot>'cos
e e css
hi bodcground.jpg
~ layootPI.css I ~ maln.css 1 8~ WEB·INF 127 lib
,'!) web.x_. ~ web-j2ee-engine .x_.
.5'.l start:Ptocess_PO_OO.ht_.
Figure 411: Replacing the Content in the Nodes--Results
8 . Customize the f ile class sapbpm.imp.SAPBPMOperations. a) Choose PO_Enhanced_##[vendor##.org] ~User Interface~ [Loca/Development]po_enhanced_##/ui/web ~source~ sapbpm.impl. b) Double-click SAPBPMOperat ions . j ava. c) At the top of the class section of the file, change the following variables to your process setting: •
VENDOR
•
DC NAME
•
PROCESS_NAME 15:22:25 28.01.2014 .o import com sa . secur · t . api. I User;
.o ;Q
import ~1!'.t..~.M.:.R~.illl· api . U!!Factory; import S.ll!!!!liai:i.i· sdo. DataObject; public class SAPBPMOperations
(
private static final Str ing VENDOR a "vendorOO . com"; private static final String DC_ llA>IE e "po_enthanced_OO- pr- pm"; private static .final String PROCESS_l/AME a "StartProcesswithUIS_OO"; public String startBPMProcess(Customer customer)
Figure 412: Fixing the Class
To find out the vendor being used, go to the Properties of your Web project:
© Copyright. All rights reserved.
553
Unit 9: Process and Task Customization and Extension
liii
15:24:30 28.01.2014
-
SQ Process 9 ~ l"I
•
Go Into
C
B-W ProcessMod!!l _ _ _ _ _ _ _ _ _ _1 1 S ~ Pto=,.S COC>Y a
£ ~
f
1
J,
Pa?_.
st«t, tj
Q3 t aslls
00 f9 Event T"j
Clrl+Y
_X_Delet _ • ____ Delo _ t_• _ _ _ Rehesh Cose Project
1
I'S
Ci>se IJIT
i;!J:I R - f &::,1Jr9o
e. .
00 Function> ~ (9 CB oataly RwiovtfromeortteY.t o.rl+M.-+SWlt+Down ~ i!l (.9 5ervlc.e l lf..J',.e n--F" 'P src ,_~ _ -•~ _ •••_ _ _ _ • - - - - A< User lntetf«e
la [loc•l:>ev
8· tSf, [Locatlevelopme f!l. ~ DePovrr.ent ljl
tJ
JAX·WSWeb
!Ir
Voldole
~s Met«jl!ta
RAnAs
~ -'·
• • :rr.
Figure 413: Properties of the Web Project
15:25:1928.01.2014 Resource source Iders 1
>ject References •
I oo l• I
1•
•
Path:
flocalDevelopmentNpo_enthanced_QijNprNpmNVendorOO.com
Type:
Project
y
Location: N: \My Documents\JAxxx, jdi\locak>evelopment\SC_PO_Enthanced_00\vendorOO.com \po enthanced QO\or\pm\ como
Figure 414: Finding the Vendor
d) Choose Save . 9 . Change the service call in StartProcess_PO_##.html. a) Choose PO_Enhanced_##[vendor##.org] ~User Interface~ [Local Development]po_enhanced_##luilweb ~ webContent. b) Double-click StartProcess PO_##.html. c) In the code, find the line starting with $ . ge t J SON (host_and_port+ " I ve ndorOO . com-po ent hance d '' /vendor OO . c om-po_enhan c ed) . d) In this line of code, change the vendor number, the po_enhanced number, and the process number to your process number. e) Choose Save . 15.28.08 28.01 2014 C'.J.lit
i t 1fl\.UW:t ii! lll · pt up\ '' Yl:l.iur!.l""-'-it: • ;,:11j.1. "'' . t:ULC . Ytl.1 lle.)l.Sl.e . VC'l-«1111.I; ~
if (COl!r: ttyfi!ld. gttVll!Je (, •• ""I ( eountryr ield. prop ("valti!Stat!" 1 Mp. ui.co:re. Velu!St.tte . Error I ; } t lst
f
el•• t
11
the date to cbe 1«4de here $ .QetJS((t(host_end_portt"/po_enthel'lced_oo..ui... ~b/process_00/ start ?t iistNarre• l'tt irs~t ield .qttValue I)+"' la:stNaroe•''t last NimeFie ld. ~er.d
I /getD4;bboardtlataAM!SetKod.e i 11: Yilr WhboacdData • ( ( requtstld :data. ctq~! t ld, let!I~ : data. 18StKame,firstJlpe : data . f irstNM.e, city : det•.c1ey,country : dai a.oour.tcy,:ipCode : data. 11pCode, creditLU.lt : d!i~ . creditl.imit,
Figure 415: Changing the Service Call
10. Change the file web.xml to match your project settings.
554
© Copyright . All rights reserved .
Lesson: Extending Processes with an SAPUl5 User Interface
a) Choose PO_Enhanced_##[vendor##.org] ___..User Interface___.. [Local Oevelopment]po_enhanced_##/ui/web ___..web content___.. WEB-INF.
b) Double-click the file web.xml. In the file open web-app with the+ button, and change the following lines: •
Choose display-name and change the process number to your process and vendor number.
•
Open security-role and change RequestorOO to your user.
•
Open security-contraint, then open web-resource-collection and change the entries under web-resource-name and url-pattern .
•
Choose security-contraint, then open web-resource-collection, then open authconstraint, then open role-name, and change the requestor name.
•
Open servlet-mapping and change the process number.
•
Open auth-constraint, open auth-contraint and change the user to your user.
1$:33·$.1 28 01.2014 l ; isc:be!Nll.~t lOU" "h e ep; 11j4 "", 6 i;n• .;
u
<~
tccc:i;e-rtle- lt:ii:.> ~eleo•~-:t t le,.i.11dex. ttml
velo.:::01.-.· t l l•>•! • wl t . IU,.M
< ..v.r ti-""'-"~ ~"°'d>tOP:11:.:/ l'lut 11-~etincl>
.cne\lr.:.t y-l:olf!> <~e,or1p~1Qn>Cll5~oll'l'!r Rcq:JC~tcc<1.oe~er1c t 1on>
~c~rltv-eoastro~nt>
c-uz l--S:.$.ttCt-h>/ Sc ai:tProc.H"•- f'O_ oO. bt"ll!l \IC' 1...,..., U:t n> C-/-.b~~.-e
C-A\lt l...,o:q.r_. tr•• QI.>
• . -......>
11,~·-ccr.e1.l'•tt11.>
<::icrvlet- 1:.M1C)'S.tJ>ilJ>l!l3eTvlct
curl
>
,.Oltcrn~/proec::i:>_OO/• <(furl ~ttCTIP
~CTVlCt n'iOp~lfl~>
<1p•c-- M1111e>c:OJ11. :iap. ut.5 . rc:JOu.rce • u:st_Cl.C ta.:/ per- r . ->
••
Figure 416: Occu rrences for the New Project Settings
c) Choose Save. 11. Change the file web-j2ee-engine.xml to match your project settings. a) Choose PO_Enhanced_20[vendor##.org] ___..User Interface___.. [Local Oevelopment]po_enhanced_##/ui/web ___..web content___.. WEB-INF
b) Double-click web- j 2ee-engine.
© Copyright . All rights reserved.
555
Unit 9: Process and Task Customization and Extension
c) Choose the+ in the file, then open the security-role map. Change the two occurrences of the user Requestor## to match your project settings.
liiii
15:36:43 28.01.2014 -<.veb-J2ee-eng1ne xmlns:xsi= "http:/ / TAN'. v3 . o~g/2001/XMLSchSM-ins tance" xsi: noNaroe~paceSchemaLoce
<5pec-vers1on>2 . 4$pec-vers1on>
<109in-module-cont1ourat.1on>I
Figure 417: Occu rrences for the New Project Settings in web-2jee-engine.xml
d) Choose Save . 12. Add the external Lib com.google.gson.Gson. a) Change to the Development Infrastructure by choosing Perspective~ Development Infrastructure .
Window~
Open
b) Choose LocalDevelopment ~ SC_PO_Enhanced_##[vendor##.org]. From the context menu, choose New~ Development Component. c) On the New Development Component dialog box, choose Composite Application. Choose Next.
d) On the New Development Component dialog box, enter the name po enhanced ## /
-
extlibs. Choose Next.
fiii
·
·-- . f'·--- -·-· ---·
,.~,I_,,,_,
..
....,.......o:r,_J
~
Wf-1
~~ \(l'(O>~:O.,....
- ... -t-.•-.1 ~·-··~ ... .., --!.....-,)
. >;
~
:".
--:i
•
.~-,_,
~=--·!<-
~...::
il.( ........
1)'-10!'10\11\t
~;.wi=z---•
-h
_,,.. ,..,.. •• '">«I:.. 11111:.n1 •'· --~-<;>;.I •• ~ JC;,W. •• .,,..... • "'>.P.'-.1».J(I_....,. ~~x~•~ ~
==~
!.w>Jd."1-->
l.ICI-··-'.-";.";':. . . = • }Ul:_i(I ~~
.•-" '
~,..,,,,,.,,
,.,.>fW! .........
,,,.!"I.__.
Jt.tll'~I!
~)
""""""'...,_...,,.... . f:..--..,-...,,
n., ~, ~
31 ....>i"~
I
-~.....,
•
'
~· O....•ft'.1....., 0)... - . .
.... -"'"'' ... e-. .... ..
.;;;,.itati;;ou
1411(1);
···_,,.,......,""'_ t>-•
•oo ""'-'""" .,~ 1-~·--
. ,,. ?f
-
F=-
•
rj:) 3
3
"
. :J
'I•-«~
'
·,o-·'' . • ' ·fil-·~ ,,•• ·-- '''
•
'
~
IJ
-
......
·-
I
IC:- I
-
I
Figure 418: Adding a Development Component
e) On the CAF projects dialog box, choose Finish . f) Change to the Resource perspective.
556
©Copyright. All rights reserved .
Lesson: Extending Processes with an SAPUl5 User Interface
g) In the Project Explorer, choose your project po enhanced ##/extlibs/dictionary. From the context menu, choose Import.
liii
-
-
,....,.._......,................
16.02.35 28.01.2014 _..,................-/"..,,............,.
.....
~
.. .
S ~ (UIUllOe.~)po_enthanc!d_OO/l:tfscc~
d ti? C...-100....-.ed,.ool-
-a;,.
-
&. .a df!J
!'£ ~ qen
acm 0 ~<
0 ...
IJ,i
•
~-,.
1·= Ill
"""' +V
fi1T
"''"'
~xt
.+~~-
.rf't1{10
Move...
:...§ (t.Qc.~)po_enth4nced_OO/Wf4/'9C
@1 ~.; ri.oc~l oo ~ed
00/rrJpm
"
> i~=·...· '
d:f)por~
l~""""' ,,,..,
'' '
..
FS
• • •
·~.,
""""'"' ProffeAs
• •
'""'
COl'llP¥fJW«h R~ ftOM Locoll Hr;t,ofy• .,
•
o~~
.,,,,,.
•
.
Al+Erter
• """''""
Figure 419: Im port
h) In the Import Select screen, choose General~ File System. Choose Next. i) On the Import, File system dialog box, choose Browse. j) On the Import from dialog box, choose WDFLBMTXXX (or something similar)~ Y-folder (all folders can be reached by choosing the +-symbol) ~ TrainingSetup ~ SAPBPM ~ SAPBPM_lO ~Solutions ~ EX25. Choose OK. k) On the Import File System folder, choose the gson-2.2.4.jar from your work directory. Choose Finish. I) Change to the Development Infrastructure perspective and locate SC_PO_Enthanced_##[vendor##.org]/po_enthanced_##/extlibs/dictionary. l6'1'"'1$t1.M1'
! I., 31..
~· ~ ti~
.... ~ <~C-0.-1 '•
•
"
, Clo!l'.U.:.ru>-1
..............., 00'«»'1 t-•..V u-1 ·~
•.'
.
~
_
....
.
"'"Owl po_M IN!ll(t
....,,,....,.. .... ,,.,_x " !': -~
~,
!_....,
f'1'(«1Mii.) ~
• '
r - • n ._
CNl.llll!C "J>.&.t>l~I
·""~~I
'"''
UQQOP ~µ.Mtw-1 , ,..-~
"
•'
• '
" ""'-- . : ;11. . . .1
-·-~
_ ,___ :1="" 1
~io.-1
I>'
...............) .. .....,
<
PJUl~_jC~IJ i'f-i'~ ...........
.
-;-
.
,
.... i
~.-.,C~-~
i
N~~.SCl-.i
'
~.)Wl...-
l'o\,~...:'IJ!Otl~ ,,..~~
....
_ 1
Iii! tc.."11-~iool)IOC..,..,..._.
•. .........,,._ ... •• •• °"'u. ..... ().. ..,...,.._~~
c.. -..-.~
g,. ..~.._•
-
~.-...~ ,.-~~
•, :. ...~ ~ o. .,,,_~-
-.
•.. u.. ...,_.,.)Ill!_ ....-..- - ti (). * • ~o.
Clo~
"'" ~ "'P•
.- c. ..~
'" I::•.._
• M
11:~.-c.M ·~ ~
,,._.........
..1 -:~-
'
Figure 420: The Extlibs
m) Choose the Public Parts tab. From the context menu, choose Manage Entities to add the gson-2.2.4.jar to the archives.
© Copyright . All rights reserved.
557
Unit 9: Process and Task Customization and Extension
____
--------
liii
16"12 1.5 28 01 2014 _.._..._.
Oef"JMd Pl.ilk Pa.1$
59e
l).bli:: p.!fll
'°' wsoc
·-.......
- Ill!'
j
Aefereni:e (rd~ ~&11.l!M
~
~.,.
Figur e 421: Manage Entit ies for Public Parts (1)
n) In the Manage Entities screen, choose Finish . •' E1>111)' Mfl'llnllilrollon Oil Piiblle Pon l """'-·--~""~.,-~(~ ..-··~- .. - ·· 'old!-~'
'
Figur e 422: Manage Ent ities for Public Parts (2)
13. Add dependencies a) Under the dependencies tab, add BPM-FACADE to SC_PO_Enhanced_## and choose Finish.
. . :1::-...::..
--·~
~·
.. .,.. F ,.
• · 0 · '\ •
... --1 ...--.-••..,. . ___
•
-' .
'
'
.
IU'Ol!l'l"N•
• .J · # ..
.;.·-..-.... '
_ .. ___.. -............... · ...•Uoto>-·._,,...,_
• !oCJl'O.r....__-.,.._.u. .....1
...
~·-~-
--:J to~ . •"II
,e,.-~"I~-
-~
,
•
·-..... ...• -·u. • _,,.,.,. ....... I ,... ~
~
...-~ ,,.._.
_ -------.:..-1 -.---.-.....,
--·------ ....--i
~
_,_
~-
.~-....:
:::::.;::::
---1 -·----
~--
.•• ...• ·-.--1 .. __,...,...
---:oo..-___--.· --· '•. ----.---
•
"-~-1
....
' • ..........__,.,, • --"-.•i-w-i ...~_.._...,_ .... • •
1 c·
558
-~ ·-·-
~
Figur e 423: Dependencies (1)
© Copyright . All rights reserved.
Lesson: Extending Processes with an SAPUl5 User Interface
16:27 10 2ll.01.201A l.t5( of SCs r~r·fJd for t~ts SC
~ ~BuJLDT(s"!>.Com] ~ $F&l-COHTENT [~oom]
BE SRMS-BUILOT(sap.cofl'l]
Bf:
~ COt.JIUllDT (~com) ~ OIGFACJ« [wp.
im ESMPJIUllOT (s.ap.o;wn)
~ fWEWORK(up.com] ~ MOlN,JllOlDT (~.cao) Qi St.PJ!IUilOT[u.p.«ICl'I)
~ 5C_PO_(r.t~d_00(ve:tl(
fJI SERViCE
Select SCs to be rele1enced
0 B 0 0 0 0 0 0 0 0 0 0 n
~
a?: EPEM
•
~ tPEM-FACAOE(s,as>.CM)
d
BPEM-,.,(sop.com]
Select AA
,,.,_., I
~ flAA'IS"ACAO!(s4').comJ
!i aB Ill! ~
~ ~
aB ~
qf?
~(So'JCl.(O'JI) E
.::.I
Figure 424: Dependencies (2)
b) Add tc/bpem/fa9ade/ear to po_enthanced_##/bl/ear and choose Finish.
~ 1=;.~~1
!•
fQM:Cl'lq - 1
I•
~'tl~
"
~Co•-.J
II}
~c-.-t ~<¥! {--!
!\.
l:P'"tXU:W.f•-1
h
It "
~!)l({NI.-)
~,U.l
lo
_,~ft$11C
&..:lo\~~
\I.
...~ . ...-.......-"l."4"QI>
"
"to-.. ~
~.. I I llloQ
.. ..
I- ~ ..~...-
I
€X
(yo>"-"°' ""'°~
jl ir;
-... ,-
me
tt',.N.041-1
;i
I
te~:w...,1
{•
~.-.i'~l
I!
-ti••~
(I
.........::q>~....-.J
tu4'1'1!t.O'(••~
Ii'
...
• ......:i
-~c.o
)ol('lfl'JllW)ll--1 ~ .......-~ "Jt11:.)tbdc:oo;J
ti}
a:
lt: F..
fli0~1>
-0.•;::1.............J
111
rr
fll)JJl•-..:U..Ot,S( I~~ P0~.00.XI_,..~ S#.P...1:11'11_ . , .
l!T I•
I• '
11._...oc.
~.JW~_,.,.l
sc:_>ooJ~:..W-=i It ·:::i..~.-.v
... "(). .,,....,....._OC(lliJ
. ·e. ........-.~~,.,,,...,..
.
D •
&;
§-OOM•rmr--t
.,loult"'.....,.. D
a
S D
IF'QollUIOI C. ..-.J
-.tu:.a«1--1
: agls::r~~i
11; (II!
0
!ii 0 !I! Q /'f' 0 i.1 n
,,.;.,.. I
>hJll1 -1
(lOt1I'
1'4.loCo(.((W.-.)
l;oCool'JolWl l<'f'-i IW,>.11,lll(WI~ ,.,,...""*!~
Wl"ll
,.,.~,,._....l
.:I
c.a..""'~-"°"""~'ldU.
-: "°"""'~--~.\l
. """'
"" ";;)oo.:..-i........~ ii ~I/Oft~
Figure 425: Dependencies (3)
c) Add po_enthanced_##/bl/ear and po_enhanced_##/extlibs to po_enhanced_##/ui/web and choose Finish. Add all parts under ENFACADE to po_enthanced_##/ui/web.
© Copyright . All rights reserved.
559
Unit 9: Process and Task Customization and Extension
liii
16.32.06 2tl 01.2014
.!:r '!)., p o_c n th anced_OOlui/Web ~~~~l~ t>~ts lctr-\iOCs !Pum"s~, ftlders l Q!stomPrcpcrticsl lrpe ;pcdfic:s Req!M'ed OU Sipf!dy tM tst ot OC$ fl!CfkN hr tfib OC
ltl 9
~· I I •...,.., I ' '"""'' ,. I
Choo.so OCs to be refe renced
I rypetexl tofihr(b-»ilo' str1n9. ~,,,.
0
'St..)'O.,.frt.~..oo ["erido!OO.com)
D •o.. oo_etll:M'l(ied_t))Jtll/c.al'/~rwy
•ew P?..entN1iced.,OO,!W«l/eu D •c.. p3~edJIOJl;Vcdfmet&clot6 o •cw po_onltl¥lc•dJXtJWWJpe,..~sions 0
D "Oft po_~J))Jt\fc~/~
D ~ po,..eoltlllrlted..OOJWdtk s •c,, oo_~cd_OOJWc.r
D ~ po..,.riwiced..OOJblf~ o •o..oo_~-~
a -e... po_eolhe,,.ed_oo;w$(~ 0 ~ ........ .,.._.~xtd_ooJ4xtf.»
n ~"" ..~'""'miw,..,.,.,,.
~
Figure 426: Dependencies ( 4)
14. Build and deploy. Change to the Composite Designer perspective and build and deploy the product PO_Enhanced ##. 15. Configure the inbound communication on NWA. _,,,_ r'
,_
\1'9t'W2$111.20l'
t @ii
~
,.
--·----
• -CC•~5Jll'P'. " -
.,
I
~-~""'
- "%::1'"""!!:!2'1
1~1-1:s_ ~.........
.-...-
~-
•, .,_ _
--
1, ::~s
....... . ...
.,;:,,. ..
-·-
~··-·.,..w •• ~.,.,.
~-
.. ~ ~
... ~JiCnJ.·.'lltn.l
_.:a......._t_l"'O'U""'.tA!l'f.l4t.}l'OO\f
__
.."'
........ Rimi@
··~ .,. ........
··-
_,
Figure 427: Configuring Inbound Communications
16. Create the role Requestor xx and assign it to the user Requestor_## .
-
Save all changes.
560
©Copyright. All rights reserved .
Lesson: Extending Processes with an SAPUl5 User Interface
17:14;50 28.01.20 14
I
Welcome System AdministratorOO
I t!en"Y •11111!9•"""' II "PM I~ICOn-f!g-ura=,.,.,'"'11"'"=eons = ;,,=enc~y=01= ..=-~I search
!Rote
Search Criteria:
mEnter
• I~IA•~llel=•~S..=•~"=es-·~I ~---~ ~ ~
Description
--------~
8 $earch. P8"8mefer and choose Go
Details
11 ' ._y l I (S.ve II Cencel I General Information 1
/
I ....,.,_
Ass i;ned Ae-tlons
=1f!!g0!!--",..-~oo~-------~
Non-e< •
°""
Assi;nec1 Gfoop$
~ I
~r_________-==:::::,
-"'"°""
O..trWon;
u-..
I)
Figure 428: Role Requester_## assigned to user Requester_## ( 1)
,, ~' 1.# 280120 14 !W'52~1~ 1 ~·11 '--X
H«•
s... ...,c.i...11: !11:;to
· Jl:.Ut11o!>S.U
~
•1'
-
lo - •I I ~-1 i1JEI ti
~- l'rs-
""' 1 -rl
--·
.. O.otf1*11
m-··.wc.•po:---·-•Cll>
~ 1 c-e1 J
""'..-.0~
~-~
.!....:.~~:I ....
~~
I
"""'~'"~-~'"'
.A •oilliek U.•n
- ................_ -· --- _
....~ll CtilHio:
'b
ltlo
a.....,,_., 6 """'~ a ~"'t(I
.
~a ~·Ill!»
Tw
A$J.1Qn"l
EE
°*"""'••
·~--......
&l«r~b
~
\ll•••
........ ·-·
SNIUlClbrtiJI I
"
--~-
'b. ,.... d
l
__ .-
• l
....
I
~1 .
°"""'~··
U4Qot"'-•
:"-W I
Figure 429: Role Requester_## assigned to user Requester_## (2)
17. Test the website. a) In your internet browser, go to the following url: http : I / nwktdc : 50000 / vendor## . com- po enthanced ## - ui - web/ StartProcess PO ## . html
-
-
- -
b) In the CUSTOMERS screen. choose the symbol on the left.
Jiii I
......
Sou> '11!'!'!.., ....,1~
n
-"""'
~,..~.... ~,,,d
CUSTOMERS ~"''''
._......
<•
..........
Figure 430: CUSTOMERS Screen
©Copyright. All rights reserved.
561
Unit 9: Process and Task Customization and Extension
c) Enter the applicable data in the form, then choose Submit. 17'21'05 28.01.2014
Figure 431: New Customer Record
d) Choose Analytics and assure that the process has started .
fiii
17.3\:12 28.01.201~ ~AS!
f!11M+t.l\U RJIU
DASHBOARD
PROCES>ES
TA>KS
"JBOX
I Tod~
•
T00$7
-
"11 l'IPIODft$$ .i: C:ompl~
_. nem1
02~11111"''f4~8
'
'
'
Figure 432: Analytics
e) Choose View Details . 17:32:1<128.0 1201.4
I
l
I
I
I
•
I
I
I
I
I )(
Vlt\'I OttaUs
Top Processes Chart Data In PTQs111ss
Pr0(.8$~ OP'fimhon
•
Ile~;P~~e~&
Sl311P,ot•sa:"'°llht.-:5
···-
1•
..
I
2
Coff1PleCt6
rn Error
• •
•
•
-·
Figure 433: Details
f) Choose 1 to go to the Manage Process Monitor.
562
©Copyright. All rights reserved .
Lesson: Extending Processes with an SAPUl5 User Interface
11 JJz:s2'01 2014
'!!"SiP~.,._a't.lNd,•
C
+.
11;
~ ~"'~SJ.Pl.I(
) n..~.td:O:I !{(O)l,..,,L.J.1
II w,..~
tif1h~
.... ,
X
1~~FWiw l!s.-11~r... 1'"'t'1 @ij
.,
,
'9't#N>
V'-'.·~~:OJ1.'>b,"4;J tu11/tl.:...../n r.it:...':11·1 ..... ··11\r.!irf: J11~-.J;flo.1Pl«"~V~~~t.W'\lD•1.0tn ~bclt!rn ,J.J
· I 1 ~ 41
0-tll...I,
. .-
(o=-l IE>rnA--a.•ll~io~ ~-'T"...-jtf
·-·
P(OceM k1Mf11tit StllllProceM1.1- \f!UIS_(l8 ""~~t'
~l!Wt
~
l'l'oettt l'l!l«".Ct~ t
~ ~1Srwrfd.cro f!!ft!;tlQH
Figure 434: Manage Process Manager
©Copyright. All rights reserved.
563
Unit 9: Process and Task Customization and Extension
LESSON SUMMARY You should now be able to:
•
564
Extend processes with an SAPUl5 user interface
©Copyright. All rights reserved .
Unit 9
Lesson 4 Solving Recurring Problems with Enterprise Integration Patterns
LESSON OVERVIEW In this lesson, you will learn how to implement conditional start patterns, content enricher patterns, aggregator patterns, and splitter patterns to solve recurring problems. LESSON OBJECTIVES After completing this lesson, you will be able to:
•
Implement a conditional start pattern
•
Implement a content enricher pattern
•
Implement an aggregator pattern
•
Implement a splitter pattern
Stateless and Stateful Patterns Enterprise Integration Patterns (EIP) help in solving recurring problems faced in the integration of enterprise applications. Most patterns consist of a mix of SAP Pl Integration Flow (iFlow) configurations and SAP BPM process implementations. That is, they rely on the power of SAP Process Orchestration, which combines both of these technologies. The figure entitled Patterns by Category shows all the patterns offered by SAP BPM . •
• • Aggregator
• g
Claim Check
• • Spl1ter (v118P~i)
•
Content Enrlctier (wl8Pt.1)
• • Scatter-OdUler
• • Composed ~.1essa9e Processor
• Request-Reply 0
-
AsynCISync Bndge
o - SyncJAsync Bridge
Figure 435: Patterns by Category
Patterns can be differentiated between stateful and stateless patterns, as shown in the figure entitled Pattern States and Availability.
© Copyright . All rights reserved.
565
Unit 9: Process and Task Customization and Extension
1r.
flrll
•1
..J Aggregator .al Claim Cheek
SAP Ne.Weaver 7.3 EhP1 SPS
d Composed Message Processor
SAP Ne.Weaver 7.3 EhPI SPS
...i Scaner-Galher
SAP Ne.Weaver 7.3 EhP1 SPS
.l Sync/Async Bndge
SAP Netweaver 7,3 EhP 1 SP4
SAP Ne.Weaver 7.3 EhP 1 SPS
~~t
d Content Enncher (w/BPM)
SAP Ne.Weaver 7.3 EhP1 SP4
....J Spfiner (w/BPM)
SAP Ne.Weaver 7.3 EhP1 SP4
.;:; Async/Sync Bridge
SAP Ne.Weaver 7.3 EhP I SP4
.:;. Pure AEX 1mp1ementa~on of these statetess patterns:
SAP Netweaver 7.3 EhPI SP4
• Content Based Router • Recipient LISI • Dynamic Router • Sphner • Message Filler • Content Enncher • Content Filler • Message Translator
Figure 436: Pattern States and Availability
Stateless patterns can be implemented either as Integration Flows on Pl (AEX) or as processes in BPM . As a general guideline, stateless patterns are best implemented as Integration Flows on AEX. This applies especially if the integration process consists of a single pattern only and no additional business logic is executed in the Process Orchestration system (that is, a pure ESB scenario). In such cases, the overhead of starting, executing, and completing a BPM process instance is typically very prohibitive. If the pattern is part of a larger business process involving multiple integration and/or workflow patterns, it could be implemented within SAP BPM, as the overhead costs become less relevant in the overall scenario.
Note: All patterns are described in the help portal at the following url: http: / I scn . sap . com/ community/ process-orchestration/ blog/ 2012 / 09 / 15/ sappro cess-orchestration-integration-patterns
Connectivity Pl and SAP BPM SAP BPM now supports the XI 3.0 protocol for service endpoints (configurable on the service reference). This means that messages can be sent reliably between Pl to BPM.
Pl
JPR
WSRT
BPM
Figure 437: Inbound Communicat ion from SAP Pl to SAP BPM
The message received by Pl will be processed by the Java Proxy Runtime (JPR), which delivers it via the Web Service Runtime (WSRT) to BPM . The message could start new process instances or trigger intermediate message events in BPM. The message will be discarded if it does not match either a process start interface or an intermediate trigger.
566
©Copyright. All rights reserved .
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
BPM
WSRT
JPR
Pl
Figure 438: Outbound Communication from SAP BPM to SAP Pl
Outbound communication (automated activity triggering a message) happens in a similar way. Here the sender component name can be specified in the service configuration in BPM.
Conditional Start Patterns A process uses the Conditional Start feature if the same message trigger is used in the start event and in at least one intermediate message event of the process. In BPM, a web service endpoint is represented by a reusable message trigger. The start condition and the correlation condition can be independently defined. Usually, the correlation condition is a more specific variant of the start condition. In the conditional start use case, a new process is started only if there are no running processes that match the correlation condition of the incoming message. The start event is not directly triggered by the message. First, the matching evaluation is done and if there is no runn ing process, the process start for the active version is initiated. That means, all messages that come in at any point in time will then be received by exactly one process instance. For a running instance of a conditional start process, messages with matching correlation criteria will be received by the intermediate message event. If there is no running process instance with matching correlation criteria, the message will be received by the start event-- given the start condition is satisfied-- thereby spawning a new process instance.
Content Enricher Patterns A content enricher pattern is a message transformation pattern. It is a stateless pattern and is available with NetWeaver 7.3, SP4. Enterprise Integration Patterns (EIP) are design patterns that help in solving recurring problems faced in the integration of enterprise applications. One of the message transformation patternsthe Content Enricher-is needed if the target system requires data fields that the originating system cannot supply. In numerous integration scenarios, for instance, System B needs additional data that System A has not provided. Such instances are tailor made for the Content Enricher pattern. It has the ability to look up missing information or compute it from the available data. The Content Enricher allows you to communicate with another system if the message originator does not have all the required data items available. Example 1--Service Technicians As a service technician, Kevin's daily job is to visit customers for servicing and/or repairs of appliances. His supervisor Emil wants a summary of the tasks each of his technicians worked on during the day. For each of his technicians, Emil gets a daily report of customers visited and tasks undertaken. He would like to get better insight into the kinds of service calls conducted by his technicians than what is already provided in the daily report. Emil wants a list of all visited customers (including name, address, phone number, issue/regular service, and service date and time) served by Kevin on that particular day. Emil will input Kevin's employee ID to the process and the requisite details would be retrieved from the system.
© Copyright . All rights reserved.
567
Unit 9: Process and Task Customization and Extension
I
Enriched Message
Message I
Figure 439: Illustration of the Content Enricher Pattern
Example 2--lntegration Scenario The Content Enricher helps gather additional information from a system using the available information. In this example, Kevin enters his direct report's ID into Business System Sl. A generated message in SAP Pl (AEX) is delivered to SAP BPM (Inbound). Web service calls in SAP BPM aid in looking up additional information based on the ID and the enriched message from SAP BPM (Outbound) is relayed through Integration Configuration 2, eventually providing Business System Sl with the requested information.
Business System (Sl)
AEX Web Service Calls
Figure 440: An Integration Scenario for t he Content Enricher Pattern
As shown in the accompanying figure, the following integration scenarios exist:
568
•
Integration Configurationl (ICOl) - A message flow can be triggered in Business System Sl that flows through SAP Pl (AEX) to SAP NetWeaver BPM .
•
Integration Configuration2 (IC02) - To send the enriched content back to SAP Pl (AEX) from SAP BPM and store it as a file in your specified folder using File adapter.
©Copyright. All rights reserved.
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
Note: The message flow from Business System Sl could also be simulated by using the Web Services Navigator. Example 3--Process Modeling in SAP BPM For creating the Content Enricher pattern in NetWeaver Developer Studio, the following prerequisites apply: •
The service interfaces to be used in the process model-starting interface and automated activity-should be created first and then imported from the SAP Pl Enterprise Service Repository.
•
For testing the BPM Process from the BPM Process repository, the UME action SAP_BPM_ TR/GGER_EVENT should be assigned to the specific user role.
S\Ab-Process Loop
-19'
IQGet Order Lisi for Emp ID
Start
•
cl
e0et >
St8l1 Event 0
•
I
D
Emp_Oelails
D
Orderlisl
-)
customer Deleils for the order
I
-
•
Encl even o
" '
D
Counter
~ Sendlhe enriched summary
e End
.
D
Order_Details
Figure 441: A Content Enricher Scenario Modeled in SAP BPM
The steps for modeling the process are enumerated as follows: •
The pattern starts with a service interface.
•
An Employee ID is provided as input to the system.
•
A Web service call retrieves the order list (List of Order IDs).
•
The order details are then retrieved for each Order ID using Web service calls.
•
These details are consolidated and a summary (the enriched content) is returned to the sender system.
Note: Use the 'XI' service reference instead of 'WS' in the configuration settings of the automated activity. The sender component also needs to be specified. Use the SAP Pl Integration Flow Designer to create the configuration objects in SAP Pl.
© Copyright . All rights reserved.
569
Unit 9: Process and Task Customization and Extension
Aggregator Patterns The aggregator pattern is a stateful filter that is used to analyze and store input messages until a complete set of (related) messages are received. It can then produce a single refined message from the messages that were received. It is used in cases where subsequent message processing is contingent upon the successful processing of multiple input messages. Dealing with asynchronous messaging systems presents challenges like correlating the messages, particularly since the incoming messages may arrive in any order. While some of the other routing patterns can be stateless, the aggregator needs to store each incoming message until the set of messages is complete for further processing. The aggregation is limited to a completion condition, either time bound or quantity bound. Example 1 One division of the company manufactures stationery supplies like colored pencils and graphite writing pencils. Graphite pencils are manufactured and placed into bins on a conveyor belt so that they can be packed by a machine. Each package contains 10 graphite writing pencils. The company would like to increase throughput without compromising on quality.
Item A
Item B 0
Aggregated 0
Item C
'---..J
Aggregated order
--
Item N
Figure 442: Illustrat ion of the Aggregator Pattern
The aggregation is not dependent on the order of messages received , which means the Aggregator may receive related messages at any time (within a reasonable limit) and in any order. Each time the Aggregator receives a new message, it should check if the message is part of an existing aggregate and create a new aggregate if a related aggregate doesn't exist, and then add the message to the appropriate aggregate. In our example for the graphite writing pencils, we need to aggregate a set of 10 pencils. The pencils are collected into the next bin and once the count reaches 10, the bin is conveyed to the machine that packages them. Example 2--lntegration Scenario
570
©Copyright. All rights reserved .
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
Business System (51)
AEX
Figure 443: Integration Scenario for the Aggregator Pattern
This example deals with these three integration configurations: •
Integration Configuration! (ICOl) - A message flow can be triggered in Business System Sl that flows through SAP Pl (AEX) to SAP BPM.
•
Integration Configuration2 (IC02) - For triggering intermediate message(s) that flow to SAP BPM via SAP Pl.
•
Integration Configuration3 (IC03) - For sending the aggregation to SAP Pl (AEX) from SAP BPM using a File Adapter.
Note: The message flow from Business System Sl could also be simulated by using the Web Services Navigator. Example 3--Process Modeling in SAP BPM
>---<1~\----1 Merge
Check ount
Increment
Awalt next Msg
(Q '------M
~
Send Aggregated message
1----------r End
Figure 444: An Aggregator Scenario Modeled in SAP BPM
The steps for modeling the process are enumerated as fo llows: •
The pattern starts with a service interface with the message counter reset to zero.
•
As long as the counter is within defined bounds, incoming message(s) that match the correlation key are collected.
•
The message counter is incremented for each collected message (matched correlation key).
© Copyright . All rights reserved.
571
Unit 9: Process and Task Customization and Extension
•
Once the counter has met the completion condition, all the collected messages are processed (aggregated) and this aggregation is sent to the rece iver.
Note: Use the 'XI' service reference instead of 'WS' in the configuration settings of the automated activity. The sender component also needs to be specified. Use the SAP Pl Integration Flow Designer to create the configuration objects in SAP Pl.
572
©Copyright. All rights reserved.
Unit 9
Exercise 26 Implement an Aggregator Pattern
Business Example
As the business process management expert, you need to create a new process using an aggregator pattern.
Note: In this exercise, the product PO_Enhanced_##, created in exercises 6, 9, 18, and 25, is used. In this exercise, when values include##, replace the characters with the number that your instructor assigned to you.
Note: This exercise is based on data found at the following url: h ttp : I I sen . sap . com/ community/process-orchestration/bl og/20 12/ 1 0/ 11 /enterprisepatterns-in-process-orchestration-aggregator
1. In the Product PO_Enhanced_##, create and design a process named Aggregator that contains the following objects: Object
Name
Start
Start
Uncontrolled merge
Merge_##
Exclusive Choice
Check Count_##
Intermediate message event
Await next Message_##
Mapping Activity
Increment Counter ##
Notification Activity
SendMail ##
End
End
-
-
2. Import the service interface Sl_Aggregator into the process. 3. Create two new message triggers named Start_Sl_Aggregator_ Trigger_## and lntermediate_Sl_Aggregator_Trigger_##.
© Copyright . All rights reserved.
573
Unit 9: Process and Task Customization and Extension
4. Configure the start event and the intermediate message event. 5. Create a new data object named OO_Aggregator. 6. Create a data object named OO_Counter. 7. Change the settings of the Start event. 8. Create a mapping from OO_Counter to OO_Counter in the Increment Counter activity. 9. Implement the condition in CheckCount_##. 10. Implement a mapping in the Start event. 11. Implement a mapping in the intermediate message event Await next Message_##. 12. Configure the mail activity SendMail_## . 13. Assign Administrato r## as pool administrator. 14. Configure inbound communication. 15. Build and deploy the process. 16. Run the process and check the results.
574
©Copyright. All rights reserved.
Unit 9 Solution 26 Implement an Aggregator Pattern
Business Example As the business process management expert, you need to create a new process using an aggregator pattern.
Note: In this exercise, the product PO_Enhanced_##, created in exercises 6, 9, 18, and 25, is used.
In this exercise, when values include##, replace the characters with the number that your instructor assigned to you.
Note: This exercise is based on data found at the following url: h ttp : I I sen . sap . com/
community/process-orchestration/bl og/20 12/ 1 0/ 11 /enterprisepatterns-in-process-orchestration-aggregator
1. In the Product PO_Enhanced_##, create and design a process named Aggregator that contains the following objects: Object
Name
Start
Start
Uncontrolled merge
Merge_##
Exclusive Choice
Check Count_##
Intermediate message event
Await next Message_##
Mapping Activity
Increment Counter ##
Notification Activity
SendMail ##
End
End
-
-
a) In the Composite Designer perspective, in the product PO_Enhanced_##, create a new process named Aggregator ## with PoolAdministrator and one lane called LaneAdministrator by choosing New Process from the context menu of Processes .
-
© Copyright . All rights reserved.
575
Unit 9: Process and Task Customization and Extension
b) In your process, add the objects as described in the previous table. In the exclusive choice name alternative 1 more messages needed, and name alternative 2 enough messages. 15:11:01 24.01 20 14
0
PootAdrninittntor
x >----------..
0
Aw&t
A'H ..,
End
I
•
Figure 445: The Process
c) From the context menu of Pool, choose Format Pool. d) Choose Save. 2. Import the service interface Sl_Aggregator into the process. a) From the context menu of Service Interface, choose Import WSDL to import the service interface Sl_Aggregator from your folder into the process. b) In the WSDL Import dialog box, choose Remote Location/File System, then choose Next. c) In the WSDL URL Access screen, choose Browse. In the Open dialog box, choose the folder, then choose TrainingSetup ~ SAPBPM ~ SAPBPM_lO_solution ~ EX26 .
Y:
I
d) Choose the SI_Aggregator. wsdl, then choose Open. e) Choose Finish. f) Assure that your service appears under PO_Enhanced_OO[vendor##.org] ~Process~ [LocalDevelopment]po_enhanced_##/pr/ pm ~ Connectivity. g) Double-click Service References, then choose the+ in front of Customer~ http:// www. vendor##. com.
576
©Copyright. All rights reserved.
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
•
I 1i) P_test2 [test2.orgJ f PO_Enthanced_OO (vendofOO.com] m Pata!
!\i>
Lti.ol. U1
El
0
B-Q Process El !;;> (Locak>evelopment) po_enthanced_Q( ~ ~ U>nnec.tivly
~t=tVl\..t:
ttt=I t=(t:J I\.~
Ei Customer
13-S l
http:l/www.vendorOO.tom 9 SI CustomerD<>t• . Q Sl=Awegator
al {[p 5ervieo Group<
'& 5erviee References
13 l:>l:> Process Modelrlg 13 ~ Processes
i
'
I
•
Aggregator CustomMapph;functlon
Figure 446: Check t hat t he Service is Listed
3. Create two new message triggers named Start_Sl_Aggregator_ Trigger_## and Intermediate_ Sl_Aggregator_Trigger_##. a) Choose Event Triggers, then choose New Message from the context menu. b) In the New Message Trigger screen, in the Name field , enter Start SI Aggregator Trigger ## .
- -
-
-
c) Choose Next. d) In the Service field, enter SI Aggregator using the F4-Help.
-
e) Choose Finish. f) Repeat steps a through e to create a second message trigger named Intermediate SI Aggregator Trigger ## with the service interface Sl_Aggregator.
- -
-
-
4. Configure the start event and the intermediate message event. a) Return to the process, either by choosing the modeling tab or double-clicking the process in the tree structure. b) Choose the Start event. c) In the Properties tab, in the Event Trigger view, in the Trigger field, enter Start SI Aggregator Trigger.
- -
-
d) Choose the activity Await next Message. e) In the Properties tab, in the Event Trigger view, choose Start_Sl_Aggregator_Trigger. This reflects the conditional start pattern .
© Copyright . All rights reserved.
577
Unit 9: Process and Task Customization and Extension
liii PoolAdinllntmllor
D
D ,------< X
""" 9$0c_Trigger 'tw!!Da~_Tr~·
t') Await next l\1essage
.
0
0
El
"""'''
""""EY~nt Tttqg~r
'Select a tr1Q9e1" fo1this e'l\Vt T1W r Typt:
0
~
0
rlfl\(lll'
0
Etro•
0
Estailltoo
0
Kone
[start_Sl_Aggi-~1_t1i99@1
Cortelatlon condition
Figure 447: Settings for Await Next Message Object
5. Create a new data object named DO_Aggregator. a) From the Palette, drag a data object and drop it next to your process, and name it DO Aggrega tor .
-
b) In the Properties tab, in the Data Type view, in the Data Type field , select DT Aggregator - http ://www.vendor##.com.
-
c) Choose Save . 6. Create a data object named DO_Counter. a) From the Palette, drag a data object, drag it next to your process, and name it DO Counter.
-
b) In the Properties tab, in the Data Type view, in the Data Type field , assign a simple integer type (for example, Integer-http:/ /w3.org/2001/XMLSchema). c) Choose Save. 7. Change the settings of the Start event. a) Choose the Start event. b) Choose the Properties , then choose the Output Mapping view and double-click DO_Counter on the right side of the screen . c) In the Expression Editor, enter a 1 and choose OK.
578
©Copyright. All rights reserved .
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
09. 12.~
"1 · 1/b ·"" -"' "
~ l!!J J
27.01.201'
· ·
I ~d>W
· ·
{Q ~totri
!YJPO~hrct11.c»C~~.-1
~. ·~~ u ...____~
.
0
0 " ~---
0
'"'" lit)IOO (OUllt~
._,._, .,,.,.
-
l:j ' ----~-
t6I
f~ll
!!'".-e CO'te>l
I!. -'8 ~11'd'~
'915 00.Jw""• i:...m ~
~·~-------''. l"""'
rr:3l 1 i -
11J'Do-
bird¢ f\Rt
Figure 448: Settings for the Start Object
8 . Create a mapping from DO_Counter to DO_ Counter in the Increment Counter activity. a) Choose the Increment Counter_## activity. b) Choose the Properties tab, then choose the Mapping view. c) Create a mapping from DO_ Counter in the left pane to DO_Counter in the right pane. d) Double-click the DO_Counter on the right side. In the editor, the standard function numeric-add(DO_Counter,l) must be added. Choose OK, then choose Save .
!iii
C92252101-2~1l
[
!~ '"'~· ,.11 ·.s\t.
~~~-.:.....;:
~1$'\1
;j,I
. ..,_Ull.ol
¥0~ - ·
_.,...,_,.., ,-----
r~
•
•
__ ,,,
.
~ ~..{
'
--
-"•-
I ~' "
.!.I IS! t :
a.. --~~l........._.__J~ .....
r:.--
"
-~lei\".~··
·-. --
1-<~ ··'l •i }
-cil!(-~-- _.,..,....
··-
~-...
....... , ~-~"""'
...-~..Ml:O""""
~-""·r~
~-
.r
-
~ s ---... 1-w.
(9' N -· Nli)iVNw
r
~.
I
Figure 449: Settings for the Increment Counter
9 . Implement the condition in CheckCount_##. a) Choose the CheckCount_## object. b) Choose the Properties tab, choose Condition Evaluation view. c) In the Name field of the first row, enter More Messages Needed. d) Choose Edit. In the Condition field, enter numeric-less-equal (DO Counter , 5) .
-
e) Choose OK. f) In the second row, enter Enough Messages in the Name field and select the Default Gate check box.
© Copyright . All rights reserved.
579
Unit 9: Process and Task Customization and Extension
liii
"" ', "
.. D
D
_,,,_
'
CO,.Cb.lnr ,.......,.«~
•
.
J
,x O:·
·~-
-~ .we~.w,Je' ~
...... ...... a
r~ ~I
""
'
'I ~M !.1'.. ~~
'' ~ lft 111.:tillrff! 0' °"'1*'fb~~,,;_· :N°r.utruat.n('µwde
Cheict' (l(l\a'it
Gencrd
3
J°"'"'
tM
<6tdt.IOl'!~ilfte.'*' fCI iM-...., . ~fo. det...t OfilA "- net .-flAJitl.rd. I ~WI
--
Odff I I~
CMdllutlf¥11~
1
•
I
_..,.....,..MMed
l otM~
tl-.ir~,..Cb.tl!llr_.~
0 511
'""
..__
.~·;;;
Figure 450: Settings for t he Check Count Object
10. Implement a mapping in the Start event. a) Choose the Start object. b) Choose the Properties tab, then choose the Output Mapping view. c) Open MT_Aggregator on the left side and DO_Aggregator on the right side. With the left mouse button depressed, implement a mapping between the nodes Header and Items from MT_Aggregator to OO_Aggregator. d) Choose Save. 11. Implement a mapping in the intermediate message event Await next Message_##. a) Choose the object Await next Message_## . b) Choose the Properties tab, then choose the Output Mapping view. c) Open MT_Aggregator on the left side and DO_Aggregator on the right side. With the left mouse button depressed, implement the nodes Header and Items from MT_Aggregator to OO_Aggregator. d) Choose the mapping line Items~ Items . From the context menu choose Assignment~ Append to aggregate the messages.
cy
•
•
·~
--
x
i ......_
-----
· "'·-C-
__. ....."' ,,..,, G~
.
-~---:.J
,
~
'11."w
"'!;,,,_ ,,_ ;:, !JI ~
--
.. ,,,___, l:ll'lool ~
-·-
Ill ~·.··
Figure 451: New Settings for Await Next Message Object
e) Choose Save.
580
©Copyright. All rights reserved.
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
12. Configure the mail activity SendMail_## . a) Choose the activity SendMail_##. b) Choose the Properties tab, then choose the To view. c) In the Principals field select Choose. In the Principals screen, select User and in the search field enter Requestor## , then choose Search. Select the user Requestor## from the results list, then choose Add, then choose OK. d) Choose the Mail view. e) Choose Add. In the Name field, enter NoOfMessages . Choose Edit. In the Expression Editor, enter the expression (DO Counter) cast as xsd : string
-
f) Choose OK. Choose Save . • '
......
.._....
--
-
--..--
X>---
•
.
___ ,
--
....
'
'
...
o.r.........- ... - ··-- · ...- - .,.- · ..·"'""'
....'
1..~,......
I
a
1
toiu1
I
.... ~-·
Figure 452: Settings for the Send Mail Activity (1)
g) In the Parameterized Texts area, enter the following information: Field
Value
Subject
{NoOfMessages} successful processed
Message
Hello Requestor , {NoOfMessages} • successful processed. Have a nice day, your BPM process.
h) Choose Save .
© Copyright . All rights reserved.
581
Unit 9: Process and Task Customization and Extension
liii
6
•l
C
Awai
nlxt Mes...
!;;!'- ~Relations l It. Problems) 0 Deploy View C01Y..olei ·~ Infrastructure Console
Properties
~ SendMall
• Vari.ables
General
To
Oeftle the variables you want to use to pa.-arnetetlze the U!:er texts beJov.i
Mail
Variables: Name
I T~I!!!
NoOfMessaQOS
!
string
.!.I
~
0
• Parameterited Texts
Oeme the texts that ..a be shown in the""''" iroox. Use braces({}) to reference tile variables demed'
>ui>Ject: ~ssage:
j jNoOfMesmes} S
••
Figure 453: Settings for t he Send Mail Activity (2)
r~
13. Assign Administrator## as pool administrator. a) Choose the pool header. b) Choose Properties~ Administrators. c) Select Choose one or more UME principals, then select Choose . d) In the search dialog box, choose User. In the search field enter Administrator##. Select Choose . e) Choose the Administrator on the left side, choose Add, then choose OK. 14. Configure inbound communication. a) Open the NetWeaver Administrator (NWA) and log on as user Administrator##. b) Choose the SOA tab, choose Application and Scenario Communication, then choose the Application Communication link. c) In the NWA, configure the inbound communicator for Start_Sl_Aggregator_ Trigger as a service provider.
___
fiii
...
__
Commun~rton: Configuration __ ,
( Appllcatlon ._
-.
-·-
·---
.
11:r..--~1i
·---
.
..........
I
~
•• --~
""" ' ,_
. . .. . , ... j
I
r;;:
-w.... · -4>
.
-
--··-_.....
-
......
~
-
~.
..,.,..,m-....1,M'U
r-
-pl/~ i..J.J)Olo;A.•.~
~-· ........ •b-
·-
Figure 454: The Process in the NetWeaver Adm inist rator
15. Build and deploy the process. a) In the Composite Explorer view, in the PO_Enchanced_## context menu, choose Deploy.
582
©Copyright. All rights reserved .
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
b) In the Product Build Required dialog box, choose Build and Deploy. c) When the build and deploy process finishes, choose the Infrastructure Console tab and verify that the process has completed successfully. d) If required, log on with the user Administrator##. 16. Run the process and check the results. a) Start the WSnavigator with the following url: http: I / nwktdcO O. wdf . sap . corp: 50000 / WSNavigato r b) Start your process and send a message. c) Open a new tab in your browser and enter the following url:http : / / nwktdcOO . wdf . sap. c orp : SOOO / nwa . d) In the NetWeaver Administrator, choose Processes .
Operation~
Processes and
Tasks~
Manage
e) Check the Manage Process Monitor for results. The results should appear as shown in the following figures: (ii5 crp.,"- "!~1~ ..K
"~"'·' ' , •• ' .,._ ..,_ I
......
t '
'"'"
~~Ml '"'
.uw:::..~1
-~
1
1!'!9's.l °"""'--6Jif:""·T--~I
Strol
l"Pucr-a ••m••·~
~ '"*1~~r;J
~-
I
tmP"°°
I
j
u;;;;;J ·
J wr~ P~
- .:J ' -l lt ~.
-:;.; .,.. ,.. u• ..l i ~f-.
.l
~· · I
:J ~·
,,,, fl,
,,P.
u ,.pr
;ioi..
/ ,
Figure 455: The Start Settings for t he Process
The process starts, The DO_Counter reads 1 and the start message is processed .
© Copyright . All rights reserved.
583
Unit 9: Process and Task Cust om ization and Extension
liii
Manage Processes: Process Instances SllOW:E [ Rl.lnrJng R Ol:. ., .,_ ___. ... j = j ~&IM FM R-ocest bstant".
. I I 9iaw ProcKS Fbw I SbaM ~* Tub I I oo I
Art.'*°-
ff!por! ~oces' OK.Ii I~
1
AecOll.er
.""
0.l3il5of lht Proct$$ lnsuince Aggregator Fl'o:MS O!linUc>n
~
"
..... ..
AJ:ltrinis!)'~
I'
oo_~
1
Figure 456 : The First Results
The first message appears as shown in the following figure:
liii
--
'
"""' ' se- 'l•Mb·Z·!fl!l
!'tot~,~
'
..
~
,,,..,. •
'
I
MllOIY ~-C0-.111 ~
-I
'
,.
~"
·~~ ·I
'
13 f 69.1 '--s..e...,,,.._1 IOftd] C>..o
,_
IX>_.4wi~!:ir
. .-fl·
...
-b
'
. . .,...,
'
·---
'
.
~-
Figure 457: The First Message
The process waits at the intermediate message event Await next Message.
D
D
x'>E---------
00_AggregatOf
Me ge
enouQh me$S4Qes
x
~------·~ .
Check Counl
more Messaoos neeced A
~I
-...
...
Await nex Message
Iner~
Counltr
Figure 458: Process Flow--Waiting at the Await Next Message Object
584
© Copyrig ht . A ll right s reserved.
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
f) Send the next message. Note that the DO Counter is 2.
Ootail.s of tho PrOC4M l11$An«1 Aggf8t)a~Of ~ l l'f'oc_HS Dltlntbn .fi(lf'MitlrKQl1
sr. 1'W·'·¥'
....
!•l
"*'lOf't
~ (.eclMlt Olla
'I
fl l'O l
-'!tMb'l'el'llS
@CSMAtd-n~ ~
Figure 459: The Next Results
There are now two items in the object DO_Aggregator. O.tolltot di• Ptoo..M lnSUonc• Aggr•g;.tof
~'oer~
oei•
'
~,.~
ill
'"":«r ,_ come~'19U
J-
i:w1,
--
... - ... -- ........~
~ ~
.
..
~
!ii!
...__.,
~
Figure 460: Final Results
©Copyright. All rights reserved.
585
Unit 9: Process and Task Customization and Extension
Splitter Patterns A splitter pattern is a message routing pattern. It is stateless and available with SAP NetWeaver 7.3 SP04. One common requirement in Enterprise Integration is to break down a single large message into multiple logical smaller messages. The splitter pattern helps in cases where each smaller message might need to be handled in a different way and thus avoids a need to send the larger message to all the destinations. The splitter pattern allows a message to be processed if it contains multiple elements, each of which may have to be processed in a different way. Example 1 To illustrate the splitter pattern, we consider a company that deals with servicing and repairs of laptops. The servicing department receives an order to repair multiple laptops from a customer. The customer has sent for service, a number of laptops manufactured by some of the top manufacturers of personal computers in the world. The service provider has allocated different groups in the service department that takes care of service and repairs of computers manufactured by different vendors. The service request can be routed to a specific group in the service department using the splitter pattern.
liii
• •
Service Request Group2
Figure 461: Illustrat ion of t he Aggregator Pattern
In this example, the service request from the customer triggers the Business System Sl to send a message to SAP Pl (AEX), which is delivered to SAP BPM (Inbound). The large message is split in SAP BPM (Outbound) for different targets (groups in the service provider). SAP BPM sends a confirmation to the original sender Business System Sl once the split has occurred. Example 2--lntegration Scenario
liii
Business Syste m (51)
AEX
Figure 462: Splitter Pattern Integrat ion Scenario using SAP Process Orchestration (1)
This example deals with two integration configurations:
586
©Copyright. All rights reserved.
Lesson: Solving Recurring Problems with Enterprise Integration Patterns
•
Integration Configurationl (ICOl) - A message flow can be triggered using a SOAP adapter from Business System Sl that flows through SAP Pl (AEX) to SAP NetWeaver BPM.
•
Integration Configuration2 (IC02) - To send the enriched content back to SAP Pl (AEX) from SAP BPM and store it as a file in your specified folder using File adapter.
Note: The message flow from Business System Sl could also be simulated by using the Web Services Navigator.
@- ;a Start
Ordercount
r--...i!Q
-= Split
Increment
I-~
X >---t 10outbOuncl cal
Check loop
0
...,_.,
End
Figure 463: Splitter Pattern Integration Scenario using SAP Process Orchestration (2)
The steps for modeling the process are enumerated as fo llows: •
The splitter pattern starts with a service interface with count initialized to zero.
•
Count the total number of order items in the order list.
•
Get the current order item from the order list and send the order item to the receiver.
•
Increment the count on the loop. Repeat until there are no more order items.
•
Complete the split process outbound call with type order data on end of loop.
Note: Use the 'XI' service reference instead of 'WS' in the configuration settings of the automated activity. The Sender Component also needs to be specified. Use the SAP Pl Integration Flow Designer to create the configuration objects in SAP Pl.
© Copyright . All rights reserved.
587
Unit 9: Process and Task Customization and Extension
LESSON SUMMARY You should now be able to:
588
•
Implement a conditional start pattern
•
Implement a content enricher pattern
•
Implement an aggregator pattern
•
Implement a splitter pattern
©Copyright. All rights reserved.
Unit 9
Learning Assessment
1. What do APls enable you to do with tasks and processes?
Choose the correct answer.
D D D D
A Configure tasks and processes at a technical level. B Create business processes at a technical level. C Develop applications that interact with tasks and processes. D Monitor individual task and process status by user
2. The BPMAnalytics dashboard allows access to statistics for processes and tasks in graphical charts. The statistics displayed are based on various t imeframe filters, which can be set by the user. Which of the following can be displayed using the BPMAnalytics dashboard?
Choose the correct answers.
D D D D
A Tasks without owner. B Process modeling options. C Escalated tasks. D The number of processes and tasks in error state.
3. The BPM lnbox requires additional administration and portal ro les, comparable to the roles used in the BPM.
Determine whether this statement is true or false.
D D
True False
© Copyright . All rights reserved.
589
Unit 9: Learning Assessment
4. Depending on the products, custom attributes can be set and delivered/transferred in the business processes and then used in the inbox for additional purposes, like assignment, sort, or display.
Determine whether this statement is true or false.
D D
True False
5. SAPUl5 supports several data sources, such as XML and OData.
Determine whether this statement is true or false.
D D
True False
6. A process will use the Conditional Start feature, requiring only that a message trigger is used in the start event.
Determine whether this statement is true or false.
D
True
D
False
7. Enterprise Integration Patterns (EIP) are design patterns that help in solving recurring problems faced in the integration of enterprise applications.
Determine whether this statement is true or false.
D D
True False
8. The aggregator pattern is a stateful filter that is used in cases where subsequent message processing is contingent upon the successful processing of multiple input messages.
Determine whether this statement is true or false.
D D
590
True False
©Copyright. All rights reserved .
Unit 9: Learning Assessment
9. The splitter pattern does not allow a message to be processed if it contains multiple elements.
Determine whether this statement is true or false.
D D
True False
©Copyright. All rights reserved.
591
Unit 9
Learning Assessment - Answers
1.
What do APls enable you to do with tasks and processes?
Choose the correct answer.
[Kl
D D D
A Configure tasks and processes at a technical level. B Create business processes at a technical level. C Develop applications that interact with tasks and processes. D Monitor individual task and process status by user
2. The BPMAnalytics dashboard allows access to statistics for processes and tasks in graphical charts. The statistics displayed are based on various timeframe filters, which can be set by the user. Which of the following can be displayed using the BPMAnalytics dashboard?
Choose the correct answers.
[Kl
A Tasks without owner.
D
B Process modeling options.
[Kl c [Kl D
Escalated tasks. The number of processes and tasks in error state.
3. The BPM lnbox requires additional administration and portal roles , comparable to the roles used in the BPM.
Determine whether this statement is true or false.
592
[Kl
True
D
False
©Copyright. All rights reserved.
Unit 9: Learning Assessment - Answers
4. Depending on the products, custom attributes can be set and delivered/transferred in the business processes and then used in the inbox for additional purposes, like assignment, sort, or display.
Determine whether this statement is true or false.
0
True
D
False
5. SAPUl5 supports several data sources, such as XML and OData.
Determine whether this statement is true or false.
0 True D False 6. A process will use the Conditional Start feature, requiring only that a message trigger is used in the start event.
Determine whether this statement is true or false.
D 0
True False
7. Enterprise Integration Patterns (EIP) are design patterns that help in solving recurring problems faced in the integration of enterprise applications.
Determine whether this statement is true or false.
0 True D False 8 . The aggregator pattern is a stateful filter that is used in cases where subsequent message processing is contingent upon the successful processing of multiple input messages.
Determine whether this statement is true or false.
0 True D False
©Copyright. All rights reserved.
593
Unit 9: Learning Assessment - Answers
9 . The splitter pattern does not allow a message to be processed if it contains multiple elements.
Determine whether this statement is true or false.
D
True
~ False
594
©Copyright. All rights reserved.