You are on page 1of 118

BPMN Business

Driven Development
BPM 11g PS6 Workshop
Contact: Angshuman Nandi
angshuman.nandi@oracle.com

October 4, 2013

BPMN Business Driven Development 1


Introduction
Business Process Management is a structured, coherent and consistent way of
understanding, documenting, modeling, analyzing, executing, monitoring and
optimizing business processes as well as associated resources leading to business
improvement. The BPM lifecycle is iterative and does not follow a water-fall model.
BPM is a management practice, a business philosophy that provides for governance
of a business process environment toward the goal of improving responsiveness and
operational performance. It is a journey not a destination.
The Oracle BPM Suite provides an integrated environment for developing,
administering, and using business applications based on end to end business
process. The Oracle BPM Suite enables you to create process models based on
standards with user-friendly applications. Oracle BPM supports BPMN 2.0 and BPEL
across the process lifecycle starting from modeling and implementation to run time
and monitoring.
In this day long workshop, you will utilize the full BPM Lifecycle around a government
specific use-case of Travel Request Management System. Throughout the day,
you will be modeling, implementing and step through validation of the Travel
Request process inside Process Composer. Composer is a web based modeling tool of
the Oracle BPM Suite 11g platform. You will simulate the model to view the process
behavior and you will also create user interaction forms using Web Form feature
which is a new capability introduced in Oracle BPM Patch Set 6 (PS6) release. In
addition, you will deploy the process from Composer and run the process inside BPM
Workspace. BPM Workspace is the primary interface for users of Oracle BPM Suite
11g platform.

Objectives
 Process Modeling
 Process Simulation
 Human Task and Web Forms
 Service Task Implementation
 Business Rules and Conditional Gateways
 Project Deploy and Run

BPMN Business Driven Development 2


Outline
Introduction ...........................................................................2
Objectives ........................................................................ 2
Outline ............................................................................ 3
Pre-Lab Information ...............................................................4
Assumptions ..................................................................... 4
Preparing your workstation for the labs ................................ 4
Objective ......................................................................... 7
Lab 1 – Process Modeling .......................................................8
Task 1: Creating a BPM Process using BPM Process Composer . 9
Lab 2 – Process Simulation ...................................................30
Task: Process Simulation .................................................. 30
Lab 3 – Human Task & Web Forms........................................42
Task 1: Implementing Human Task .................................... 43
Task 2: Implementing Web Forms ..................................... 45
Lab 4 –Service Task Implementation ....................................58
Task 1: Implement Service Task........................................ 58
Lab 5 – Business Rules & Conditional Gateways ...................63
Task 1: Implementing Business Rules ................................ 63
Task 2: Implementing Conditional Gateways ....................... 80
Task 3: Data Association .................................................. 87
Task 4: Validating the Process........................................... 90
Lab 6 – Process Play Back, Project Share, Deploy & Run ......93
Task 1: Sharing the Project .............................................. 93
Task 2: Process Playback.................................................. 97
Task 3: Project Deploy ................................................... 108
Task 4: Running and Viewing the Process in Workspace ...... 112
Appendix: Using Snapshots and Solutions ..........................118

BPMN Business Driven Development 3


Pre-Lab Information
Assumptions
 Your workstation is running Win XP, Vista, Windows 7 or Mac OS. NOTE:
Windows 8 is not supported due to a limitation in our VPN software.
 You have System Administrator privileges on your workstation.
 You have one of the supported browsers, IE7-IE10 , Safari, or Firefox with
Flashplayer enabled. NOTE: Chrome will work as well, however you must
authenticate to our VPN with one of the other listed browsers.

Preparing your workstation for the labs


 Disable any browser proxy settings:
Firefox users:
ToolsOptionsAdvancedNetworkSettingsChoose ‘No Proxy’OKOK

Internet Explorer users:


ToolsInternet OptionsConnectionsLAN SettingsUncheck all
checkboxesOKOK

BPMN Business Driven Development 4


 Disable any Pop-Up Blockers in your browser.
 Your browser will also need to have Flash player installed, which is available
from: http://get.adobe.com/flashplayer/
 Connect to the OSC Network using Array SSL. https://adc-ssl-cnc-
vsite.oracle.com/ The Username/Password will be provided. Click Sign In

Username and password


provided by instructor

 Click the link Click here to make L3 connection

BPMN Business Driven Development 5


 Depending upon your browser and version, you may be asked to allow plugins
(Active X or Java). Accept all requests from your browser to continue.
 You should see a message confirming that you are connected to Array SSL/VPN
Server and an IP address.

Keep this open, You can continue the labs in a new tab or browser window.
 Using notepad or another text editor, open your hosts file located in:

 Windows: C:\Windows\System32\drivers\etc\
 Linux: /etc/
 Mac: /private/etc/

BPMN Business Driven Development 6


Note: For Windows 7 users, you may need to launch your Text Editor (Notepad) as
Administrator. You can do this by right-clicking the Text Editor icon from the Start
menu and selecting Run as Administrator, as shown below.

 Add a line to your hosts file in the following format:


XXX.XXX.XXX.XXX psworkshop
Replace the X’s with the IP address provided by the instructor.
A sample HOSTS file
10.146.91.234 psworkshop
entry. Replace the IP
 Save and Close the file. address shown here
with the address
provided by the
instructor.
Objective
Let’s understand the Travel Request Process scenario here.
1) Employee initiates a travel expense request (Submit Request) for approval.
2) If the expense is more than $7000, then by business rule (Approval Rules) it
requires Manager Review for approval. Otherwise, it can directly complete the
process after calling some external system (Save Request).
3) If manager’s review is required, manager does it by Approve Request User Task.
4) If manager approves the expense approval request, process calls an external
system for some activity (Save Request).
5) If manager rejects, the control goes back to Employee to resubmit the request.
The complete flow is shown in the figure below:

Figure 100-1: The Complete BPMN Model.

BPMN Business Driven Development 7


Lab 1 – Process Modeling
Oracle Business Process Composer is a web-based, role-driven, collaborative tool
for the discovery, design and documentation of business processes. Business Process
Composer is aimed at a business audience and enables business users to participate
in the definition, feedback and design of business processes and process-based
applications. Business Process Composer:
 Provides an easy-to-use and intuitive user interface, enabling users to quickly
become productive.
 Provides a standards based, comprehensive modeling environment. You can
model business processes, create business rules, business data, and user
interface, and validate business processes.
 Contains built-in collaboration. You can see who else is editing a project and
invite others to participate.
 Provides security and permissions based on roles. Users have different privileges
that can be defined at a global or project level.
 Provides model-driven implementation. The Business Process Modeling (BPMN)
2.0 process model is also the executable model. The same model is enhanced
using Oracle BPM Studio. After using Oracle BPM Studio to provide
implementation details, a project can be shared again with business users. There
is no round-trip or transformation issues as both business and IT work on the
same models.
 Enables business users to perform implementation. In addition to modeling
business processes, business users can also create business rules, web forms,
business data, business indicators (business metrics).
Oracle Business Process Management Studio is a separate tool within the Oracle
BPM suite. Oracle BPM Studio runs in Oracle JDeveloper and is primarily used by
process developers. Oracle BPM Studio provides comprehensive developer tools and
enables them to develop components, including Web Services, XML, and integration
development that are required in a more complete BPM solution.
Today’s workshop focuses on using Composer to Model, Simulate, Implement and
Deploy a complete business process.

BPMN Business Driven Development 8


Task 1: Creating a BPM Process using BPM Process
Composer

STEP 1: Open the BPM Composer


 Open your browser and go to the BPM Composer using this link:
http://psworkshop:7100/bpm/composer

STEP 2: Creating Process Model with BPM Composer


 Log into Process Composer as jcooper with password of welcome1

 You will see three project folders. There is one with a completed project for
reference (Solution), a second folder is a Lab folder where you create your own
project. The third folder (Day2) is reserved for developer labs not covered today.

BPMN Business Driven Development 9


 Click the Create Project link in the upper right hand corner.

 Type PSTravelApplication for Project Name

 Click Browse next to Folder and select Lab folder.

BPMN Business Driven Development 10


 Click Finish.

 This opens the project’s home page. From the home page, you can see all of the
parts of the project: Processes, Rules, Human Tasks, Web Forms, and Business
Objects. You can also see information about your project.

BPMN Business Driven Development 11


 Click on the green plus icon (New Process) to create a new process. Enter
name TravelRequestProcess and click Create.

 Save the project by clicking on the Save button.

 Click on the newly created TravelRequestProcess process to open.

BPMN Business Driven Development 12


STEP 3: Top-down modeling with BPM Composer
You will now design the Process Model. The design approach we are going to follow is
called Top-down modeling approach. We will design the model with different
business activities. There is a palette of activities on the right hand side. Here is
where you get all of the pieces of your model.
 Click on the More tab on the bottom of the palette to see more flavors for each
activity.

BPMN Business Driven Development 13


STEP 4: Creating the Initiator Task
 Add an Initiator user interactive activity by following these steps. This activity
allows the end user to initiate the process. Cick on the Interactive Activity, this
will open a sub palette to the left. Drag and drop the Initiator Interactive
activity from the palette to between Start and End. Place on the line and drop
when the line pulses blue.

BPMN Business Driven Development 14


 Click on the text Initiator below the newly added activity and change the activity
name to Submit Request, hit your Enter key to save the change.

HINT: You can enable Grid Visibility and Snap-To-Grid from toolbar.

 Hover mouse on the Unassigned Role and click on the pencil icon . In the
dialog box: select Create radio button and type Employee to create a new role
called Employee. You can either hit Enter key or click somewhere outside the
dialog box to save the change to our role.

BPMN Business Driven Development 15


 Hover mouse on the Submit Request activity and click on the pencil icon .
In the dialog box, enter a description for the activity User is initiating a
request for travel approval. Click outside of the dialog box to close it.

 Re-open the dialog box by clicking the pencil icon and click on the
documentation link

BPMN Business Driven Development 16


 Select the documentation type of End User in the lower right hand
Documentation tab. Type in Please enter your travel request information.
Then click Apply Changes

NOTE: Throughout the labs you will be entering information into the
Editor Pane. It’s important to remember to click the Apply Changes
button in this dialog.

BPMN Business Driven Development 17


 Collapse the Editor Pane by clicking the down arrow just at the top right-
hand corner of the Editor Pane.

STEP 5: Creating the Business Rule Activity


Now add a Business Rules activity that determines the approval routing based on the
amount to be approved.
 From the Activity, select Business Rule.

BPMN Business Driven Development 18


 Drag and drop a Business Rules Activity on the connector between Submit
Request and End, but closer to the Submit Request task. Once again, you will
see the connector line pulse when the new activity is in the right place.

 Rename the task by Clicking on the Business Rule Task name and enter
Approval Rules.
 Drag Approval Rules to the empty space below the Submit Request activity.
This creates a second swim lane. Drag the End activity to the second lane too.

BPMN Business Driven Development 19


 Change the Role settings for the newly created swim lane as before, setting it to
Manager.

STEP 6: Adding Exclusive Gateway


 Add an Exclusive Gateway activity which is responsible for checking if manual
approval is required. For this drop a Gateway > Exclusive Gateway to the
Manager swim lane just to the right of the Approval Rules activity.

BPMN Business Driven Development 20


 Rename the gateway to Is Manual Approval Required?

STEP 7: Creating the User Task


 Add a User Task activity for the manager to approve or reject the request for
sending request. For this, drag and drop an Interactive > User Task Task
between “Is Manual Approval Required?” and End.

BPMN Business Driven Development 21


 Click on the pencil icon to modify the User Task. Change the name to
Approve Request and set the description to Manager approves or rejects
request.

 Click on the Edit transition flow between “Is Manual Approval Required?” and
Approve Request and name it “Yes” and keep the default Type of
Unconditional.

BPMN Business Driven Development 22


 Drag and drop another Exclusive Gateway to the right of Approve Request.
Rename it as Approval Outcome. This is to check whether the approver has
approved or rejected the request.

 With the Approval Outcome gateway selected, Drag the arrow back to Submit
Request and drop it when you see the activity glow blue. You can reshape the
sequence flow by dragging the line as suitable.

BPMN Business Driven Development 23


 Click on the Edit icon and give the sequence flow a name Rejected. Leave the
type as Conditional

BPMN Business Driven Development 24


STEP 8: Implementing Service Task
 Let’s create a Service task activity. This is a service call-out to a simple web
service that has already been deployed for you.
 For this, drag a Service Task from the palette and drop it to the left of the End
event.

 Rename it to Save Request.

BPMN Business Driven Development 25


 Name the transition flow between Approval Outcome and Save Request as
Approved leave the Type as Unconditional.

 Select the gateway Is Manual Approval Required? and hover over to see the
alternate transition arrow (Conditional Sequence Flow). Drag it to Save
Request. After dropping the arrow, readjust the line by dragging it out so that it
is visible. (note: to see the new line you just added, you may need to move Save
Request slightly lower)

BPMN Business Driven Development 26


 Click on the Edit icon on the transition, and give it a name No. If Manual
Approval is not required, the process can jump to Save Request.

 With this the BPM Process flow is completed. The process should look like below
image:

STEP 9: Taking Process Snapshot


Project Snapshots allow one to save projects at a point in time. We can always go
back and view an older version of the project and also revert our working copy to an
earlier saved snapshot. The process for reverting to old snapshots is documented in
the Appendix.

BPMN Business Driven Development 27


 Save the project using the Save button on the top.
 Click on the Project Home tab to navigate back to the home page. Then Click
on the Snapshots icon (on the right)

 Click on the plus to create a new snapshot. Call it PTA_Snapshot_01 (no


spaces) and optionally give a description. Click Create Snapshot followed by
OK.

BPMN Business Driven Development 28


 Throughout the labs today you can always revert to a saved snapshot or open the
Solution project should you make any mistakes. For more information refer to the
Appendix in this guide.

BPMN Business Driven Development 29


Lab 2 – Process Simulation
Task: Process Simulation

STEP 1: Creating Simulation Definition


 Click the Simulate button on the top of the process canvas.

 Click icon beside Simulation Definition to create a new simulation


definition.

BPMN Business Driven Development 30


 Enter the vales as shown below for Simulation Definition and Duration. Leave
default Start Time and click Next

 Click to create a new Simulation Model.

BPMN Business Driven Development 31


 Create Simulation Model as shown below and then click Add followed by Finish.
Model Name=DemoSimulationModel
Distribution Task=Exponential
Average Frequency=100
Every=1h
Use=organization resources
Select Policy=Minimum Cost
Available Threads=100

BPMN Business Driven Development 32


 Click Pencil icon to edit the ProcessSimulation.

 Now we need to add a process to run against this Simulation Definition. For this,

click beside the Model as shown below

 Ensure that TravelRequestProcess and DemoSimulationModel are selected


then click Add.

BPMN Business Driven Development 33


 Now click beside the model as shown below:

 This will open the Simulation Canvas as shown below:

BPMN Business Driven Development 34


 Hover the mouse on Start activity and click to see the Instance Creation
parameters. Keep this default.

 Click to open the Simulation Property of Submit Request activity. Go to


Resources tab, and then select Use Fixed Resources. Then change the
Available Resources to 10 as shown below

BPMN Business Driven Development 35


 Click Cost per hour tab and give the cost as 100 as shown below:

 Click to open “Is Manual Approval Required?” activity and adjust


outgoing flows as shown below. Slide bar on Approve Request to change values.

 For Approve Request give it 2 Resources, and Cost per hour as 300.

BPMN Business Driven Development 36


 For Approval Outcome adjust the Outgoing Flows as below:

BPMN Business Driven Development 37


 Click Save

 Click Simulate button on the top.

 Click the Run button

 It will execute the simulation, ending with some data for analysis.

BPMN Business Driven Development 38


 Click the filter button in Process Units section.
 You can select all filters by clicking All button. Close by clicking X at corner.

 The generated bar diagram is showing different statistics for the Process against
the sample simulation run. Hover your mouse on each bar and it will give you the
statistic brief in words like below:

BPMN Business Driven Development 39


 Now collapse the chart to go to the process. Click button on top left corner.
 When we come to the simulation canvas we can see each activity displays
average working count. If you hover your mouse over the number, it will show in
text.

 Now change from Units to Cost by selecting Cost from the dropdown besides

icon. It will show you the cost estimation for the process:

BPMN Business Driven Development 40


 Now change the scale to Time to see the time statistics.

 Click Clear Results button to clear the simulation statistics.

 Click the Save button.

 Close the Travel Request Process Tab by clicking the at the top right hand
corner.

 Do the same for the Process Simulation tab.

 Following the previous instructions, take a snap shot with the name
PTA_Snapshot_02.

BPMN Business Driven Development 41


Lab 3 – Human Task & Web Forms
Oracle Business Process Management provides functionality that defines how end
users interact with the applications defined by BPMN processes. There are three
components within Oracle Business Process Management that work together to
define this user interaction:
1) User tasks: are the BPMN flow objects that specify where in your process user
interaction is required. Oracle BPM supports different types of user tasks that
determine the approval process required.

2) Human tasks: define how users interact with a process-based application. They
define the user interface, data structures, and connectivity information.

3) Forms: define the interface that enables users to interact with your application.
For business applications created with Oracle BPM these forms are displayed in
Oracle Business Process Management Workspace.

Oracle BPM supports the following types of forms:


1) Web forms: define the user interface for a human task. They are based on
standard technologies, including XHTML, CSS, and JavaScript. Web forms are
created by process analysts using Business Process Composer. They are included
within a BPM project. This chapter describes how to create and use web forms.

2) Oracle Application Development Framework (ADF) task forms: are ADF


components that define the user interface for a human task. ADF task forms are
generally designed by process developers. They are created in Oracle JDeveloper
and can be added to a BPM project using Oracle BPM Studio.

3) User-Defined. Task forms can be created in other Frameworks such as Spring


or .NET using the Task API’s.

In this Lab, you will implement both Human Task and Web Forms.

BPMN Business Driven Development 42


Task 1: Implementing Human Task
 Click on TravelRequestProcess to open the process, if not already Open.

STEP 2: Initiator Human Task Implementation


 Let’s implement the Submit Request initiator human task. For that right-click on
the activity, and choose Implement.

BPMN Business Driven Development 43


 Click on the green icon to the right of Human Task. Enter name
SubmitRequestHT and click Create.

 To finish click Apply Changes.

BPMN Business Driven Development 44


 Now right-click on the Initiator task, and choose Open Human Task.

Task 2: Implementing Web Forms

STEP 1: Web Form Generation


 Enter Task Title Submit Request. For Presentation, choose Web Form as the

Presentation Style, and click on the green icon to create a new web form.
Enter name RequestForm and click Create

 Forms or User Interfaces design is a key aspect of business process modeling and
with PS6 release, you can easily build a form using drag & drop, declarative
design paradigm. You can not only design forms, but they can also be tested and

BPMN Business Driven Development 45


previewed. The Oracle BPM run-time is smart enough to infer the payload based
on the Form fields and auto-generates Business Objects (data types).
 Click on the Pencil to edit the newly created RequestForm

 You are presented with a blank form. We will now start to add form elements

BPMN Business Driven Development 46


 We will start by dragging and dropping a Text component from the palette onto
the RequestForm. The form color will change when you are in the right
location. Next go to the properties window on the lower left and change the label
to Name. Name field will automatically be populated with the label value.

 Next drag and drop a Date component onto the form below the Name. A green
down arrow will appear during the drag to indicate it should be below the other
field. Change the Label to Date. Then drag and drop Money component onto the
form below the Date. Change the label to Total Amount and uncheck Enabled.
Total Amount field will be populated programmatically.

BPMN Business Driven Development 47


 Drag and drop a Tab component below Total Amount. Click on Tab 0 and
change Label to Trip Details. Click on Tab 1 and change Label to Expense

Details. Hover over Tab 2 and click on to delete the 3rd tab.

BPMN Business Driven Development 48


 Click to save your work.

 We will now Test the form that has been created, but Clicking on . When
done testing close window.

 Continue building the form by adding remaining fields. Refer to Table and screen
shots for details.
# Label Component Tab Properties/Styles Hints
Type
1 Destination Dropdown Trip Details Label : Destination
Options:
NYC
Washington
San Francisco
LA
Miami
Phoenix
See below for
example
2 Purpose of Radio Trip Details Label : Purpose of
Visit Visit
Options:
Internal Meeting
Customer Visit
Training
Seminar
Item width(style) :
25%
3 Customer Text Trip Details Label : Customer
Name Name
Uncheck : visible
4 Justification Text Area Trip Details Label : Justification
Width(style): 80%

BPMN Business Driven Development 49


5 Expense Line Section Expense Label: Expense Line
Details
6 Expense Type Dropdown Expense Label : Expense Type
Details (Drop Options:
into Expense Air
Line Section) Cab
Train
Hotel
Other
7 Amount Money Expense Label :Amount
Details

Example of Entering Options:

BPMN Business Driven Development 50


5

 Click then click to test the form. When done testing close window.
 Now make the Expense Line as repeatable by dragging and dropping Repeat into
Expense Details section just above the Expense Line section. You should see a
green Up arrow indicating it will be placed above Expense Details.
 Drag and Drop Expense Line section inside the Repeat
 Change the Max# property of Expense Line to 5.

BPMN Business Driven Development 51


 Click to test the form. When done testing close window. Notice that now
you can click to add more than 1 Expense Line.

 Click

STEP 2: Adding dynamic behavior to Web Forms

We can use JavaScript to add dynamic behavior to forms. Such as setting visibility, performing
calculations, and even invoking REST services.

If you would prefer not to manually type the code in the following rules. You can
instead copy and paste from a text file on the server. To do this, open a new tab in
your browser and go to:
http://psworkshop:7100/html/labhelper.txt

 To add dynamic behavior to the form click Rules Icon

BPMN Business Driven Development 52


 In the rules editor, click to start creating form rules

 We will build a rule for dynamically enabling the Customer field, if the Purpose
of Visit is a Customer Visit. Click to edit the rule. Enter the rule as displayed
below.
if (PurposeOfVisit.value === "Customer Visit") {
CustomerName.visible = true;
}
else {
CustomerName.visible = false;
}

BPMN Business Driven Development 53


 Similarly, create a Rule to calculate the sum total of expense (JS)
var total = 0;
for(var i = 0; i < Amount.value.length; i++) {
total = total + Amount[i].value;
}
TotalAmount.value = total;

 Test this rule by clicking Test Web Form option on the top.

BPMN Business Driven Development 54


 Click
 Once completed, close the RequestForm tab by clicking the X.

 Go back to the Human Task, by Clicking on the SubmitRequestHT tab. Then


click on Data and Note that your Task Data automatically gets defaulted to the
RequestForm element.

STEP 3: Implement the Approve Request Human Task.


 Go back to TravelRequestProcess tab.

BPMN Business Driven Development 55


 From the TravelRequestProcess, right-click on the Approve Request activity
and choose Implement.

 Click icon to create a new Human Task field. Enter ApproveRequestHT, and
click Create.

 Click Apply Changes.


 Right-click on Approve Request and choose Open Human Task.

 For Presentation click Web Form. Click and select RequestForm. Click
Ok.

BPMN Business Driven Development 56


Note: You are associating the same form with this user activity. Both the user
activities interact with the same web form.

 Type Approve Travel Request in Task Title.

 Click Save
 Take a snap shot with the name PTA_Snapshot_03. You will need to click on
the Project Home tab. Then Snapshot.

BPMN Business Driven Development 57


Lab 4 –Service Task Implementation
Task 1: Implement Service Task

STEP 1: Implement Save Request Service Call


 Go to the TravelRequestProcess tab.

 Select the down arrow next to the tab manager(X). From the context menu
choose Close other tabs.

 From the drop-down in the top right corner, select Business Catalog.

BPMN Business Driven Development 58


 Click on Add Service.

 Enter Name SaveRequest.


 Enter Service WSDL details as shown in the screenshot. The WSDL URL is
http://psworkshop:7100/SaveRequest/saveRequestPort?WSDL

If you would prefer not to manually type the URL. You can instead copy and paste
from a text file on the server. To do this, open a new tab(it may still be open from
your last lab) in your browser and go to:
http://psworkshop:7100/html/labhelper.txt

BPMN Business Driven Development 59


 Once the URL is populated tab out of the field. Select SaveRequestSync in Port
Type dropdown leave Callback Port Type blank. Click OK.

BPMN Business Driven Development 60


 Click Save
 Go back to your process. Right-click on Save Request and choose Implement.

 In the Type drop-down, select Service Call.

BPMN Business Driven Development 61


 Click to the right of Service and choose the Service that you just created in
the previous section form the popup. Click OK.

 The operation defaults to Process.

 Hit Apply Changes and Save.

 Take a snap shot with the name PTA_Snapshot_04.

BPMN Business Driven Development 62


Lab 5 – Business Rules & Conditional Gateways
Task 1: Implementing Business Rules

STEP 1: Creating Business Objects


 You first create Business Objects (which are definitions of complex data), we will
then create Data Objects (variables that hold data) that will be used within
Approval Rules. Eventually, you will associate Rule activity with an Oracle
Business Rule Definition.
 On the Project Home page, click on Business Objects. NOTE: Several
Business Object have already been created for us when defining our
Form and Task.
 Click on the New Business Object plus icon to create a new Business Object.

 Provide a name RuleInput

 Business Objects reside inside modules. Click on the icon to create a Parent
Module for the Business Object. Name it BusinessData.

BPMN Business Driven Development 63


 Click Create. Make sure you have specified the correct Name and Parent
Module.

 Similarly, create another Business Object called RuleOutput. Choose


BusinessData as the Parent Module for this Business Object.

 You will now add attributes, or fields, to each of these Business Objects. Click on
RuleInput.
 Click on Add New Attribute

BPMN Business Driven Development 64


 Give it a name of amount . and type of Real. Click OK

 Highlight RuleOutput.

 Click on Add New Attribute

 Give it a name of manualApproval and type of Bool. Click OK

BPMN Business Driven Development 65


 Go back to the Project Home page by clicking on the Project Home tab. Click

Save.

STEP 2: Creating Oracle Business Rule


 Click on the Rules tab on the left.

 Click on New Business Rule to create the rule. Call it ApprovalRule. De-
select Expose Composite Service

BPMN Business Driven Development 66


 Click on the icon to create input data object.

 Type in ruleInput for Name and Select <component> from Dropdown. Then
select /BusinessData/RuleInput from BO dropdown.

BPMN Business Driven Development 67


 Click Add.

 Once again, click on the icon next to the Input and Output Data Objects.

 Type ruleOutput for name.

BPMN Business Driven Development 68


 Change the direction to Output.

 Select component for Type and select /BusinessData/RuleOutput for BO.

 Click Add.
 Double-check it looks like the picture below and Click OK.

 Click Save
 Click on ApprovalRule to create the details for the rule.

BPMN Business Driven Development 69


 Click on the Bucketsets option on the left to create a new bucketset.

 Click on the drop-down arrow next to the icon, and select List of Ranges

BPMN Business Driven Development 70


 Highlight the bucketset, Bucket Set 1, just created, it will be at the bottom, and

click on the Edit icon to enter details.

 Enter the following details:


 Name the bucketset AmountRange
 Change the Data Type to float.

 Click on the icon, and enter the value 5000 in the End Point text field.
The remaining fields get populated automatically when you tab out of the End
Point field.

BPMN Business Driven Development 71


 Repeat this step (Clicking green plus and entering End Point) twice more and
enter values 7000 and 10000 in the End Point field respectively.

 Change the aliases (High, Medium, Low, Very Low) to reflect what the
values represent. Your final table of values should look like:

BPMN Business Driven Development 72


 Click OK.
 Next click on Ruleset1 on the left.
 Click on the Add Decision Table option by clicking on the drop-down arrow next

to the green icon next to the View drop-down menu.

 Name the table Approval Decision Table.

STEP 3: Create Conditions, Rules, and Actions.

 Click on Conditions to bring it into focus. Click on the icon, and Add
Condition.

BPMN Business Driven Development 73


 Type RuleInput into the search field to find our parameter.

 Expand RuleInputType and click on amount. Click OK.

BPMN Business Driven Development 74


 Now, with the Condition RuleInputType.amount in focus, select
AmountRange from the list of Bucketsets values.

 Double-click on the R1 cell, and choose Very Low and Low as the condition for
rule 1. After selecting the values, click outside of the drop down to accept them.

 Highlight Actions in the lower left part of the table.

BPMN Business Driven Development 75


 Click on the icon, and add new action by choosing Assert New.

 Scroll down the list of Facts and select RuleOutputType.

 Check Parameterized and Constant for the attribute manualApproval. Click


OK

BPMN Business Driven Development 76


 Check the Actions checkbox (first, double-click to select the box, then click a
third time to set the checkmark).

 Double-click the cell directly under it. Enter value false and hit Enter.

 Add another Rule.

 Double-click the ?

BPMN Business Driven Development 77


 Select Medium and High, click outside the box to accept these values.

 Check the Actions checkbox (first, double-click to select the box, then click a
third time to set the checkmark).

 Double-click the cell directly under it. Enter value true and hit Enter.

BPMN Business Driven Development 78


 Click Save
 Click on TravelRequestProcess tab to navigate back to the BPM process

STEP 4: Implement Rule


 Click on TravelRequestProcess tab to navigate back to the BPM process.
 Right click on Approval Rule and then select Implement.

BPMN Business Driven Development 79


 In the lower panel, Click to the right of Rules and browse for the
ApprovalRule you created previously, and click OK.

 Click Apply Changes at the bottom of the screen.

Task 2: Implementing Conditional Gateways

STEP 1: Creating Data Objects for implementing conditions


 Complete the following few steps to create data objects that are used within the
process. Data Objects can be one of two types 1) Simple, or 2) Complex and
based off of Business Objects.
 Click on the Data Objects icon on the top ribbon.

BPMN Business Driven Development 80


 Add a new Process Data Object.

 Enter name requestDO, select type component and Business Object


Types.RequestForm. Click OK.

 Add another Process Data Object.

BPMN Business Driven Development 81


 Give it a Name of approvalOutcome and Type String. Click OK.

 Add another Process Data Object.

 Give it a Name of manualApproval and Type Boolean. Click OK.

BPMN Business Driven Development 82


 Click Close.

 Click Save.

STEP 2: Complete Conditional Sequence flows


Now you will complete the conditional sequence flows which define the routing of the
process flow based on the outcome of the previous step.

 Click on the Edit icon on the No conditional flow, and click on


Implementation.

BPMN Business Driven Development 83


 Click on Edit next to Condition.

 Highlight manualApproval data object.

 Click the Insert into Expression button.

 Type ==false after manualApproval. That’s two equal signs.

BPMN Business Driven Development 84


 You can validate your expression by clicking on the Validate button. Click OK
(the OK button is not available until your expression is valid).

 Click Apply Changes.

 Similarly, Click on the Edit icon on the Rejected conditional flow, and click
on Implementation.

BPMN Business Driven Development 85


 Click on Edit and enter approvalOutcome == “REJECT” in the Expression
Editor
 Click Validate, OK, and then click Apply Changes.

BPMN Business Driven Development 86


 Close the Properties Pane.

 Click Save.

Task 3: Data Association

STEP 1: You will now complete Data Associations for your process.
 Right-click on Submit Request, and click on Data Association.

BPMN Business Driven Development 87


 Complete Data Association by dragging and dropping requestDO from the Data
Object on the right, to the Submit Request Outputs box containing the text
RequestForm.

 Click Apply on the top right-hand corner.

 Similarly, complete the data association by Right Clicking on Approval Rules


and selecting Data Association.

BPMN Business Driven Development 88


 Expand the Approval Rules > ruleInput and ruleOutput.

 Expand the requestDO complex dataObject on the right to expose its member
attributes.

 Drag the totalAmount field under requestDO to ruleInput.amount(on the left


Inputs) and the manualApproval Bool to ruleOutput.manualApproval(to the
right Outputs).

BPMN Business Driven Development 89


 Click Apply
 Complete Data Association of Approve Request as follows, requestDO as
input.requestForm and approvalOutcome as output.outcome, and click Apply

 Complete data association for Save Request (requestDO.name to input


process.input and requestDO.name to output.processResponse.result Click
Apply.

 Click Save.

Task 4: Validating the Process

STEP 1: Validating the process


 Click on the Validate option on the top ribbon to validate this process. This
process will point out any details that are missing.

 If validation is successful, you will see a message like:

BPMN Business Driven Development 90


 Save and take a snap shot with the name PTA_Snapshot_05.
 We can also generate Process Reports in a variety of formats. To view the

information in our report. Click the Projects Icon at the top left.
 Select Process Report from the drop-down menu.

 Choose HTML and OK.

BPMN Business Driven Development 91


 The report should open in a new browser tab. You can expand the nodes of the
document and click through the activities. All documentation, descriptions, etc.
are automatically added to the report.

BPMN Business Driven Development 92


Lab 6 – Process Play Back, Project Share,
Deploy & Run
Task 1: Sharing the Project

STEP 1: Share the project


 Go back to the Project Home page.
 Click on the ribbon that says Private on the far right corner. Private means that
this project is not shared with any other user. It is accessible to the owner only.

 Against Specify Users and Groups, click Choose.

BPMN Business Driven Development 93


 Search for User weblogic and hit Search.
 Select the User check box and click OK

 Let’s give Editor Role to weblogic user.

BPMN Business Driven Development 94


 Click Share button and click Close.

 Save
 Now you will see that the project is shared, and also be able to see all
participants of the project.

 Mark the Project as a favorite by clicking the

 Go back to main Composer Page by clicking on the Projects link on the top left.

BPMN Business Driven Development 95


 The Composer main page provides the ability to filter and display process via
different views and filters, this becomes beneficial as the number of processes
that we work with either as an owner, editor, or viewer increases. Click through
some of the various different layouts and filters.

Layout
Editor

Filters

 Open the PSTravelApplication again by clicking on the Title.

BPMN Business Driven Development 96


Task 2: Process Playback

STEP 1: Opening the Process Player


 To work on the project you need to click Edit.

 Open the TravelRequestProcess

 Click on the Play button on the top ribbon alongside the Validate option. The
Player will initialize.

 Click on the Project Player tab

BPMN Business Driven Development 97


STEP 2: Adding User Mapping
 Under the organization, Set the Role to PSTravelApplication.Manager from
the Select Role dropdown, click the Choose button next to Specify Users or
Groups.

 In the Identity Browser. First select Users from the dropdown. Then type in
jstein and click Search.

 Select the checkbox next to jstein and then click OK.

BPMN Business Driven Development 98


 Click Add Mapping.

 Repeat the steps above. Only this time we first set the Role to
PSTravelApplication.Employee and then select the user mtwain.

BPMN Business Driven Development 99


 Click the TravelRequestProcess tab to open the process canvas. Now click on

the Start icon to start the process player by clicking on the little arrow on
the Start event.

 In the dialog box, select user mtwain and click Play.

BPMN Business Driven Development 100


 For the Submit Request, click on user mtwain and hit Execute. Click Launch
Form.

BPMN Business Driven Development 101


 Enter form details.

BPMN Business Driven Development 102


 Also, enter the Expense Details.

 Click the Submit button.


 Close the dialog box. The process will flow like below:

BPMN Business Driven Development 103


 Click Delete so we can run another scenario.

 Now let’s make another request. Make sure this time your expense exceeds
$7000.

BPMN Business Driven Development 104


 Close the dialog box.
 This time after Approval Rule execution, the request will go to manager for
approval.

BPMN Business Driven Development 105


 For the Approve Request, click on user jstein and hit Run. Click Launch Form.

 Note that all the fields from the Submit Request step are pre-populated on this
form. This is because we passed the requestDO onwards from Submit Request
via data associations. Click the Approve button.

BPMN Business Driven Development 106


 Close the dialog box.
 Also, there is option to approve/reject without opening the form.

 In case manager rejects the expense report, it will go back to employee.

 In case manager approves, process will execute like below:

BPMN Business Driven Development 107


 When you are done with Testing. Click on top ribbon.

Task 3: Project Deploy

STEP 1: Deploying project to BPM Server

 While logged in to BPM Process Composer as jcooper, click to get the


project menu. Select Deployment-> Deploy project.

 Complete the form as below: (weblogic password is welcome1)

BPMN Business Driven Development 108


 Click Deploy and it will show the deploy status as below:

 Log out of Composer

STEP 2: Accessing the project in BPM Workspace


 Open the BPM Workspace application in your browser. The link is:
http://psworkshop:7100/bpm/workspace
Enter username weblogic and password welcome1. Click the Login button.

BPMN Business Driven Development 109


 Select the Administration Link on the upper right corner and view the roles.
Here is where you associate the roles with the end user. We have already
assigned the Employee and Manager roles in Composer. We are going to add
weblogic as the Process Owner role.

 Select PSTravelApplication.ProcessOwner

BPMN Business Driven Development 110


 Click the new icon under Members to bring up the Identity Browser.

 Search for weblogic user, select the checkbox and hit OK.

BPMN Business Driven Development 111


 Back on the main page, click Save.

Task 4: Running and Viewing the Process in


Workspace
 Log out of Workspace.

 Log back in as mtwain password is welcome1. Click the Login button.

NOTE: Because we’re switching users frequently in our browser. It is


important that we explicitly click the Login button. This insures our
cookies are cleared in the browser.

BPMN Business Driven Development 112


 On the far left, select My Tasks drop-down menu and select Applications

 Click TravelRequestProcess to start the process. The Submit Request task


opens. Complete the values making sure the Total Amount is greater than
$10,000 and click Submit. Also note, if you click the info icon in the
Submit Request form you will see the End User documentation entered in Lab 1
as Help text.

BPMN Business Driven Development 113


 The process moves forward, through the Business Rule according to the values
you set.
 You can logout and login as jstein to approve the request, it will appear by
default in your inbox. Click the Approve Travel Request link to display the
form and Approve.

 Logout of BPM Workspace and log back in as weblogic. weblogic is the


Process Owner and can track (and also alter) the flow of processes. Select the
Process Tracking tab.

 Click the Advanced Search Link and change the options to:
Processes=All
Assigned=Anyone, at any Role
Status=All
Click OK

BPMN Business Driven Development 114


 You can select the individual processes.

BPMN Business Driven Development 115


 Click the History link.

With the List View option selected you can click the individual User Tasks and get
detailed audit on the individual tasks.

Tree View allows you to view the data as it travelled through the process.

BPMN Business Driven Development 116


Graphical View presents the current execution of the process as represented in the
BPMN Model.

Congratulations! You have completed the Oracle


BPM Workshop.

BPMN Business Driven Development 117


Appendix: Using Snapshots and Solutions
If you have made a mistake in a particular lab and want to revert back to a previous
snapshot. Perform the following the steps:
 Go to the Project Home tab and make sure you are in Edit Mode. If not, click
Edit.

 Click Snapshots, when the dialog opens. Right-click the Snapshot you want and
choose Revert to Snapshot. Click Yes to confirm.

Alternately, you may also use the TravelApplication project in the Solutions folder.

BPMN Business Driven Development 118

You might also like