Oracle®
BPM 11g
TABLE OF CONTENTS
AGENDA: ... 4 GETTING STARTED ... 5 LAB 1: BPMN MODELING... 14 Introduction... 14 Naming Convention ... 15Creating the BPM Project for Quote Process ... 16
Creating the high-level outline of the BPMN process ... 18
Adding conditional split for Business Practices Review Step... 27
Adding parallel paths for approvals ... 30
Adding loops for redo of Quote ... 34
LAB 2: PROCESS SIMULATION WITH BPM STUDIO ... 39
Process Simulation Overview ... 39
Process Simulation Lab ... 39
Creating Process Simulation Models... 40
Creating the Project Simulation Definition ... 45
Running the simulation ... 47
Analyze the Simulation Results ... 48
LAB 3: PROCESS IMPLEMENTATION ... 51
Naming Conventions ... 51
Launch BPM Studio ... 51
Business Catalog... 53
Creating a Business Object... 53
Data Inputs and Data Outputs ... 56
Creating Data Objects ... 57
Implementing “Enter Quote Details” Interactive Task ... 60
Configuration of the Service Task... 73
DAY 2 ENVIRONMENT SETUP ... 90
LAB3 CONTINUED ... 94
Mapping swim lane Roles to LDAP Roles ... 94
Deploying the process ... 96
Using the Oracle BPM Workspace ... 100
Monitoring the Process Instance using Workspace ... 107
LAB 4: BPM COMPOSER ... 110
Introduction... 110
Creating a Process Blueprint in BPM Composer ... 110
Creating a Process Template in BPM Studio ... 114
Creating a Mediator Service... 123
LAB 5: MONITORING AND ANALYTICS ... 139
Adding Monitoring to a BPMN Process ... 139
Configuring BPM Project for BAM Monitoring ... 146
Creating BAM Dashboards... 152
Viewing BAM Dashboards... 159
APPENDIX ... 162
Set up MDS Connection ... 162
Agenda:
DAY 1
8:30-9:00 Sign In
9:00-9:30 Introductions and JDeveloper Install
9:30-10:30 Oracle BPM Product Overview Presentation and Demo
10:30-10:45 BREAK
10:45- 12:00 Process Modeling with BPMN Presentation
Modeling Lab1
12:00-1:00 LUNCH
1:00-2:30 Process Simulation Presentation
Simulation Lab 2
2:30-2:45 BREAK
2:45-4:30 Process Implementation Presentation
Implementation Lab 3
4:30-? Day 1 Wrap up
Q & A
DAY 2
9:00-10:30 Implementation Lab (con’d)
Deploy and Testing
10:30-10:45 BREAK
10:45-12:00 Customization and BPM Composer Presentation
Composer Lab 4
12:00-1:00 LUNCH
1:00-3:00 Process Analyti cs Pre sentation
Process Analyti cs Lab 5
3:00-? Day 2 Wrap up
Getting Started
We’re going to be installing Oracle JDeveloper and then adding the SOA and BPMN editor plug- in’s.
1) Double-click jdevstudio11113install.exe in the location you downloaded to (c:\BPMWorkshop)
3) Make sure the “Create a New Middleware Home” radio button is selected. If you do not want to use the default installation directory make sure you install to path which does NOT contain spaces (do NOT install to Program Files).
5) Click Next on the Confirm Installation Directories page.
7) Click Next to start the installation, it will take a few minutes to complete. When it completes, De-Select the Run QuickStart option and click Done.
8) To Start JDeveloper either click the JDeveloper Studio 11.1.1.3.0 option under the Oracle Fusion Middleware 11.1.1.3.0 Start Menu Program group or double-click jdeveloper.exe from Windows Explorer under yo ur
<Middleware Home>\jdeveloper path
9) Select Default Role and OK to open.
11) De-select the usage tracking option and click OK
12) De-select Show tips at Startup and close the Tip of the Day.
14) Select Check for Updates
15) Click Next on the Welcome page.
17) Navigate to your C:\BPMWorkshop (or wherever you saved the download files) and select the soa-jdev-extension.zip and click Open.
18) Click Next
20) Click Yes to restart.
21) Repeat steps 13 through 16. Instead of Step 17 we’ll instead select the bpm-jdev-extension.zip file.
Lab 1: BPMN Modeling
Introduction
Note: The solution for this chapter can be found in
c:\BPMWorkspace\Solutions\SalesQuoteLab_lab1.zip
The first exercise is based on building the Sales Quote Process model. You first create an outline of the process flow as a BPMN model using the Oracle BPM Studio. Oracle JDeveloper with the BPMN Editor extension is called Oracle BPM Studio. Implementation details are added in a later exercise.
The Sales Quote scenario is as follows:
The business process implements a solution for Sales Representatives to submit Sales Quotes and manage all the approvals within a particular Sales organization. A quick recap on the business process definition and its flow is detailed below.
The Business Process is triggered by a Sales Represe ntative creating a Task to Enter the Quote details in the “Enter Quote” interactive step.
The next step is to determine the list of approvers for the Quote using business rules and also to determine whether additional review by Business Practices is required. This is accomplished through the “Determine Approval Rules” step.
After the rules have been evaluated, the next step is to check whether “Business Practices Review” is required and if “yes” go through the “Business Practices Review” step.
The Quote then has to get approved for the deal structure and terms. After the “Business Practices Review” has been completed, the process instance moves to the “Approve Quote” and “Approve Terms” activities that are executed in parallel.
The “Approve Quote” activity is executed by approvers in the
“Approvers” role and the “Approve Terms” by individuals that have been assigned the “Contracts” role in the organization.
Once these 2 steps in the business process have been completed
successfully, the process instance moves on to the “Finalize Contracts” step and waits for its final approval by an individual in the “Contracts” role.
The complete flow is shown in the figure below.
Naming Convention
The folder and the application should be called SalesQuoteLab
The project and the composite should be called QuoteProcessLab
Creating the BPM Project for Quote Process
1. Open BPM Studio and select the BPM Process Analyst mode when you start JDeveloper.
3. Enter SalesQuoteLab for the Application Name, choose BPM Application in the center panel and click Next.
5. Close the Overview tab by hovering your mouse over the tab and clicking the X.
6. Go to the BPM Project Navigator by clicking on tab on the left hand side.
Creating the high-level outline of the BPMN process
8. Select From Pattern » Manual Process.
9. Click Next
10. Specify the name for the Process – “RequestQuoteLab”. Click Finish.
11. This creates a RequestQuoteLab process with a Start Event (thin circle) and End Event (thicker circle) of type “None” with an Inte ractive Task of type User Task in between. The Start Event of type “None” signifies that there is no external event triggering the process. The first activity after the Start Event creates the process instance.
12. In addition, a default swim lane – Role gets created and the swim lane points to the default logical role – “Role”.
Note: In BPM Studio, the swim lanes in the BPMN process point to logical Roles. A logical role represents a process participant (user or group) and needs to be mapped to physical roles (LDAP use rs/groups) before the process is deployed. This will be addressed in Lab 2 .
The Interactive Tasks refers to a step that is managed by the workflow engine. The Performe rs represent the business users who need to carry out the Interactive Task. The associated Task (work to be performe d) is shown in the inbox of the assigned Performe rs when the Interactive Task is triggered. The actual work is performe d only when the Performe r executes on his Task. The Task is presented to the Pe rforme rs through a browser based worklist application. In BPM Studio, the Performe r is automatically set to the “Role” associated with the swim lane in to which the Inte ractive Task is dropped.
13. Right click on the User Task step, select Properties and specify name “Ente r Quote Details” for the step. Click OK.
14. Now, change the name of the default role Role to “SalesRep” by going to
15. In the left navigation bar, select BPM Project Navigator to view the contents of the BPM project. Right-click on Organization node and select open. This opens up the Organization pane.
16. Highlight the default role named “Role” and use the pencil icon to edit it to be “SalesRep”.
17. Click on the “+” sign to add the following Roles – “Approvers”, “Business Practices” and “Contracts”.
18. Close the Organization window by hovering over the tab and clicking X. Click Yes when prompted to save.
The performe r or assignee for the Enter Quote Details – User Task is now set to the “SalesRep” Role.
19. Right-click on the process diagram just below the SalesRep-Lane. Choose the “Add Role” option.
20. Select “Business Practices” from the list of options available. Click OK.
22. Open the View->Component Palette.
23. Click on User Task from the BPM Component Palette. You’ll find it by opening the Activities node.
Important: Note that the click -and-drop action from Component Palette to process canvas works a bit diffe rently than other drag-and-drop actions - you have to release the mouse button afte r the click to select the component in the palette (instead of holding down the mouse button) and then click in the process canvas to drop it.
24. Drop this new User Task after the existing Enter Quote Details – User Task by hovering on the center of the connector between Enter Quote Details and End until the connector turns blue. Then click the mouse button to drop the Task.
25. Name this User Task, “Business Practices Review” and click OK. The connection lines are automatically created.
26. Drag the new Business Practices Review – User Task to the Business Practices lane. The performer or assignee for the Business Practices Review - User Task is
automatically set to Business Practices role.
27. Create two more lanes for Approvers and Contracts.
29. Do a Save All either by choosing File | Save All from the Menu Bar or clicking the icon.
30. Drop 3 User Tasks on to the process diagram, one following the other, and name them –“Approve Deal”, “Approve Terms” and “Finalize Contracts” respectively. Make sure when you drop that the connector line has turned blue.
31. Move the “Approve Deal” to the “Approve rs” Lane.
32. Move the other 2 User Tasks – “Approve Terms” and “Finalize Contracts” to the “Contracts” Lane.
33. Finally add a Service Task right after the “Finalize Contracts – User Task” from the BPM Component Palette and name it “Save Quote”. The modified diagram should look something like this:
34. Do a Save All
Adding conditional split for Business Practices Review Step
35. We now have a high- level outline of the process. We can now start adding the conditional branching to include the scenario where the Business Practices Review step can be completely bypassed.
36. Click & drop an Exclusive (XOR) Gateway from the Gateways Pane and add it to the process right after the Enter Quote Details step (not on top of a connector). Add it to the Business Practices swim lane.
37. In the Properties Editor set the Name to “Is Business Practices Review required?”
38. This Is Business Practices Required? - Gate way will have 2 outgoing branches – the conditional one leads to Business Practices Review and the default branch directly joins with the Approve Deal step.
39. First, select the connector coming from Enter Quote Details (currently connected to Business Practices Review) and drag it to the gateway.
40. Next, right-click on the gateway and select Add Conditional Sequence Flow and click on Business Practices Review.
41. Finally, right-click on the gateway again and select Add Default Sequence Flow and click on Approve Deal.
42. Right-click on the outgoing connections and select Properties. Name the cond itional path to “Yes” and the default path to “No”.
Adding parallel paths for approvals
43. We need to modify the process flow further to promote Approve Deal and Approve Terms steps as parallel and concurrent activities. This can be achieved through a Parallel (AND) Gate way.
44. Click & drop a Parallel Gateway from the Gate way Pane and place to the right of the Approve Deal step in the process (not on a connector).
45. In the Properties Editor set the Name to “Approvals“. Click OK.
46. This creates a pair of Parallel Gate ways to indicate the parallel split and parallel join (merge).
47. Right-click on the Parallel Merge Gateway to bring up the Properties Editor and set the Name to “Approvals Merge“.
48. Rewire the outgoing connections from both the Is Business Practices Review Required? – Gateway and Business Practices Review steps to point to the Approvals Gateway.
49. On the Approve Deal step, select the connector coming from the activity. Right-click and choose the delete option to delete the sequence flow going out of Approve Deal step.
50. Drag the Approve Deal User Task and drop it on the connector between the
Approvals and Approvals Merge Gateways. Move around the gateway first to give you more room.
51. Right-click on the Approvals Gateway and select the “Add sequence flow to converging gate way” option to create a parallel path.
52. Drag the newly created flow connector down a little bit to give you some room.
53. Now drop the Approve Terms step to the newly created parallel path between Approvals and ApprovalsMerge gateways.
54. Right-click the ApprovalsMerge gateway and select Add default sequence flow. Connect it to Finalize Contracts.
55. Do a Save All
56. Now, the modified process diagram looks like the figure below. Take some time to review:
Adding loops for redo of Quote
57. There is one last modification to be done before we complete the outline. The Business Practices Review, Approve Deal and Approve Terms - User Tasks can have 2 possible outcomes – “APPROVE” or “REJECT”. The “APPROVE”
outcome continues the process along the main path, also called the happy path. On the other hand, the “REJECT” outcome redirects the process to the “Enter Quote Details” so that the Sales Representative can refine the quote and resubmit. 58. The Exclusive (XOR) Gate way is required to create a loop.
59. Click & drop an Exclusive Gateway – “Business Practices Outcome” just after the Business Practices Review step (Do not drop on a connector).
60. Drag the outgoing sequence flow from Business Practices Review to Business Practices Outcome gateway.
61. The outgoing business exception path from the newly added Exclusive Gateway should redirect the process flow to the Ente r Quote Details step.
62. Select the Business Practices Outcome – Gateway, right-click and add the conditional path to Enter Quote Details step. Name the conditional path as “Business Practices Reject”.
63. Select the Business Practices Outcome – Gateway, right-click and add the default path to Approvals step. Name the default path to “Business Practices Approved”.
64. Similarly, the process flow goes to Enter Quote Details step if the Approve Terms or Approve Deal outcome is “REJECT”.
65. Drag & drop an Exclusive Gateway – “Approvals Outcome” just after the Approvals Merge step
66. Drag the outgoing sequence flow from ApprovalsMerge Parallel Join Gateway and redirect it to the newly added Approvals Outcome XOR Gate way.
68. Draw a default sequence flow from Approvals Outcome Gate way to Finalize Contracts step. Name this branch to “Approved”.
69. Draw a conditional sequence flow from Approvals Outcome Gate way to Enter Quote Details step. Name this branch to “Deal or Terms Rejected”.
70. The completed process outline looks like the following diagram.
Lab 2: Process Simulation with BPM Studio
Process Simulation Overview
Business process simulation until now has seldom been implemented. Because of tight development schedules, the plan to simulate the current “as- is” and desired “should-be” processes typically falls victim of having too little time. Simulation is a powerful tool and it is worth the time spent doing simulations before going into production. It helps run “what- if” experiments to see what the impact will be of:
Reducing or increasing the number of people assigned to an activity.
A sudden increase of the number of instances flowing through the process.
Changing the approval ratio from 70% approved / 30% disapproved to a worse case 50% approved / 50% disapproved.
This can help avoid the embarrassment and cost of launching a new process with a flaw that only becomes obvious on day 3 of production. It can verify that the desired output meets the metric objectives and easily finds bottlenecks in redesigned
processes and leads to breakthroughs.
Process Simulation Lab
This exercise will demonstrate how a business analyst can analyze and propose changes to business processes using Oracle BPM Studio.
The objectives of this exercise are
Run simulations on business processes and analyze the following results.
- Throughput and process analysis - Activity-based costing
- Resource allocation
Make changes to the process to optimize the flow
The simulation algorithm is based on discrete events that can process events in a serial fashion as they occur in time. You need to create Process Simulation Models and Project Simulation Definitions to run simulation. The Process Simulation Model captures a “What-if scenario” for a particular business process model. You can have multiple Process Simulation Models for a particular business process model. This allows you to create different simulations based on different combinations of resource allocations and activity behavior. The Project Simulation Definition is used to take the dependency and shared resources across processes in to account. It consists of Process Simulation Model of multiple processes.
The simulation does not execute the actual code of each activity within the process. However, by configuring parameters within the Process and Project Simulation Models, you can mimic the behavior of your business process. You need to ask the
right questions to get the right response! In order to perform simulation the process needs to be complete and semantically valid.
You will be simulating the process that was created in Lab #1. If you were not able to complete it or would like to use an already completed process, you can use the project from c:\BPMWorkshop\Solutions\SalesQuoteLab_lab2.zip.
Creating Process Simulation Models
1. If you don’t already have the BPM project from Lab #1 opened, start the BPM Studio 11g and open up the SalesQuoteLab application workspace.“
2. Switch to the BPM Navigator Pane (ViewBPM Project Navigator) 3. Open up the “Processes” node.
4. Double-click on the “RequestQuoteLab” element
This opens the Request Quote Lab main process and you are now looking at the process diagram showing in the standard Business Process Modeling Notation (BPMN).
5. In the BPM Project Navigator go to the Simulations node and expand underneath it. 6. Underneath this node, you can find 2 folders – Simulation Definitions for storing
Project Simulation Definitions and Simulation Models for storing Process Simulation Models.
7. Select the Simulation Models folder, right-click and choose the New Process Simulation Model.
8. Type in “NormalLoad” for the Simulation Model that you will be creating now and click OK. This will open up the NormalLoad simulation model definition.
9. A Process Simulation Model can configure the following settings for a process: • Process settings
• Amount and rate of instances created in the process. This can either be a constant or statistical distribution such as normal, uniform, exponential etc.
• Activity Settings
• Average Execution Time. This can either be a constant or a statistical distribution. For example, number of people associated with a Role if it is a User Task.
• Routing Settings
• Probability percentage of instances routed through the different outgoing transitions
• Cost Settings
• Cost for processing the activity and cost of the activity + the cost of the resource if it is an interactive human centric step
10. To configure the frequency of process instances created, First click on the Flow Nodes tab.
11. Select the Start activity at the bottom, change the Distribution Type to Constant, and change the Period to 5 minutes as shown in the figure below.
12. To set the Activity based parameters, select the Flow Nodes tab and set the
parameters as shown in the table below: (Resources will not be defined in the Process Simulation Model but will be specified while creating the Project Simulation
Definition). Activity Name Duration (Distribution type, Mean, Std Deviation)
Cost Outgoing Flows
Approve Deal
Normal, 20 minutes, 3 seconds
Activity Name
Duration (Distribution type, Mean, Std
Deviation)
Cost Outgoing Flows
Approve Terms Normal, 10 minutes, 3 seconds $50 N/A Business Practices Review Normal, 30 minutes, 3 seconds $100 N/A Enter Quote Details Normal, 20 minutes, 3 seconds $30 N/A Finalize Contracts Normal, 20 minutes,3 seconds $60 N/A Is Business Practices Review Required? - Gateway
N/A - Business Practices
Review - .9 (90%) Approvals - .1 (10%) Business Practices Outcome - Gateway N/A - Approvals- 1 (100%)
Enter Quote Details – 0
The Outgoing Flows tab is used to define the Routing probability.
15. You need to select “Use Organization Resources” in order to use the Roles that you have already defined when you created the “Request Quote” process model. Set this for all Human Task activities.
16. Do a Save All
17. Close the NormalLoad tab. Hover over the tab and click X
Creating the Project Simulation Definition
As you know, BPM projects can consist of many processes. Similarly, each project simulation can consist of one or more processes and their corresponding simulations. In this step, you will create a project simulation model. You are creating a project simulation model because this is what actually determines which processes and process simulation models should be used and how resources should be configured for the simulation.
1. In the BPM Project Navigator/Simulations tab, note that there are two Simulations folders – Simulation Definitions and Simulation Models. As shown below, right click the Simulation Definitions folder and click New Simulation.
2. Enter AsIsSalesQuoteSimulation as the Simulation Name.
3. As mentioned before, each project simulation can consist of one or more process simulations. The “Normal Load” process simulation model is the only item in the list and is the only simulation you can include.
4. Change the Duration to 10 hours. Check the checkbox beside Let in- flight instances finish before the simulation ends. Check the checkbox for Include in simulation.
5. Click the Resources tab
6. In this panel, you configure your simulation for your current number of peop le available to perform the activities in their roles, the organization resources. 7. Click the + button to set the participants for the roles you already have included in
this project. Make sure you set the capacity for each resource as shown in the figure below.
8. Note: To select the predefined roles, double-click the Roles cell and then the magnifying glass to open the roles list
9. Do a Save All
10. Close the AsIsSalesQuoteSimulation tab by hovering over the tab and clicking X
Running the simulation
Click the Simulation tab in the bottom window as shown below. If you do not see this tab, open the simulation view from the menu by clicking View -> Simulations.
11. With the process diagram open in the top window, click the Start button. This starts simulation in an interactive mode where you can follow the progress on your process diagram. When you clicked the Start button, note that the process diagram view opened up and you now can see the simulation run its course.
12. To complete the simulation without waiting, click the Run to end button in the Simulation View.
Analyze the Simulation Results
Now that you’ve run the simulation, it’s time to analyze the results. Start by looking at over all process execution time.
13. First, for your convenience, change the report type to Bar in the drop-down just below the Chart tab in the left side of the simulation view. This will make the chart more readable by showing the activities on the vertical axis and values out the horizontal axis.
14. Now click the Indicators on the right side of the simulation chart tool bar. Select the Time checkbox.
15. You now see one big bar showing the overall average process time for the Order Management process. It takes 3.45 hours for processing the Quote.
-
16. To investigate why the process is taking this long to process orders, drill down in to simulation results for Activities as shown in the figure below.
17. Select the icon to filter out the activities that have a negligible processing time.
18. Now you have drilled into the process and can now see the average times for
processing for each activity. The Approve Deal has an average cycle time of nearly 5 hours which is unacceptable.
19. You see that the Approve Deal is taking much more time than any of the other
activities combined. This is a surprise because it takes only 20 minutes approximately to complete the step. Maybe there is a bottleneck here? To find out, take a look at average waiting time. You can see that the maximum average waiting time is nearly 4.30 hours. Aha! It looks like orders that need approve deals are backed up for most of the processing time with no one working on them.
Lab 3: Process Implementation
In the first exercise, you built a basic process with roles, activities, and transitions. In this lesson, you will further enhance the process by creating data types,
variables, Task Services, and Adapter Services and binding them to the process activities.
Objectives
After completing this lesson, you will know how to:
Implement Process Activities and create Task, Rule and Adapter Services
Define the different kinds of Data Objects (variables)
Define Data Inputs and Data Outputs (arguments)
Map arguments to instance variables The tasks you will complete in this lesson are:
Understanding of Business Catalog
Define Task Services and map to Interactive Tasks
Define Adapter Services and map to Service Task.
Create Business Objects (data types)
Create Data Inputs (input arguments) and Data Outputs (output arguments) for process and process steps
Create Variables (Data Objects)
Create Data Mappings
Naming Conventions
The folder and the application are called SalesQuoteLab
The project and the composite are called QuoteProcessLab
The process is called RequestQuoteLab
The user interface (UI) project names all end with UILab, e.g. EnterQuoteUILab
Launch BPM Studio
2. When prompted for the developer type, select Default Role.
Note: If you receive an error dialog similar to this:
3. Click OK. When the project opens, you need to go to Applications Navigator, right-click your BPM Project(QuoteProcessLab) and select Project Properties from the context menu.
4. Go to Technology Scope , scroll down the list on the left , select SOA and add it to the right pane as shown in the figure below.
Business Catalog
The Business Catalog holds the different types of Services (System, BPEL processes, Task Services, Rule Services) as well as Business Objects (Data). There are different folders for holding different types of BPM artifacts. Some folders have a lock to indicate that the artifacts inside them cannot be deleted.
Complex types are referred to as Business Objects in BPM Studio and
represented by XML Schema. Business Objects are stored under the Business Catalog folder.
There are 2 ways to create a Business Object
Create from scratch
Browse an external schema definition and create Business Objects from it. In this example, you create a Business Object named Quote defined by the QuoteRequest element in the Quote.xsd file. Perform the following steps to create this Business Object.
1. In the BPM Project Navigator, right-click on Business Catalog, select New and then select Business Object.
This brings up the Business Object dialog.
2. Type in “Quote” in the Name field.
3. Click on the Magnifying Glass next to the Destination Module. This brings up the Module List dialog. Click on the New symbol to add a module under Business Catalog with the name “Data”.
4. Click OK
5. Select the Based on External Schema option and click the Magnifying Glass icon. This brings up the Type Chooser dialog. Click on the Import Schema Files icon on the top right corner to import an XSD file into your BPM Project.
6. Select the Copy to Project option in the Import Schema File dialog and select the Magnifying Glass icon
7. This brings up the SOA Resource Browser window. Locate and select the Quote.xsd file in the lab materials C:\BPMWorkspace\MyFiles\xsd folder.
8. Click OK to close the SOA Resource Browser and click OK again on the Localize Files dialog.
9. Expand the Project Schema Files folder in the Type Chooser and select the QuoteRequest element. Click OK and click OK again.
10. The Quote Business Object opens. You can add description and documentation details here as desired. When finished, close the Quote window.
11. This completes the creation of the Quote Business Object.
Data Inputs and Data Outputs
Data Input refers to the information required to start the Activity (Task, Sub-process) or Process. It is the input argument. A collection of Data Inputs is referred to as an Input Set.
Data Output refers to the data that is returned from the Activity or Process. It is the output argument. A collection of Data Outputs is referred to as an Output Set. The Start Event has only Output Set. The End Event has only Input Set. Other activities can have both Input and Output Sets.
The Output Set of the Start Event and the Input Set of the End Event determine the arguments of the Process.
Note: As you will see in later section, the input and output arguments of the process step is the same as the inputs and outputs of the Service (Task, Rules, or System) that it is bound to.
Creating Data Objects
Data Objects represent variables. Data Objects can be one of:
Process Level (process variables) – Visible throughout the process and persisted through the life time of the process instance.
Activity Level (local variables) – Visible within a particular scope of the process. The lifetime of the Data Object is limited to the lifetime of the scope.
Project Level (BPM project variables) – Visible across processes within a particular BPM Project.
A Data Object has a Type. The type can be scalar or native type: String, Integer, Decimal, Boolean, Array, or it can be a complex type.
In this lab, you create 3 String variables for the outcomes of Business Practices Review, Approve Deal and Approve Terms activities.
In addition, you create a Boolean variable used to determine if the Business Practices Review step is required or not.
You also create a complex variable of the QuoteRequest type in Quote.xsd.
1. In the BPM Project Navigator, highlight your RequestQuoteLab process to view the Structure pane in the lower left of the screen. If the Structure pane is not visible, select ViewStructure and be sure you have your process selected in the BPM Project Navigator.
2. Right click on the Process Data Objects folder and select New to launch the Create Data Object window.
3. Enter a value for the Name field and select the appropriate scalar type. Do this for each of the scalar Data Objects listed below,
Process Data Object Name Type
approveDealOutcome String
approveTermsOutcome String
businessPracticesOutcome String
4. Now create a Data Object of type Quote Business Object.
5. Right-click on Process Data Objects in the Structure Pane and select New. This brings up the Create Data Object dialog. Type in “quote” for the Name of the Data Object.
6. To set the quote to the type Quote Business Object, you have to select the “…” option. This brings up the Type Chooser window.
7. Select Component from the list of types and then choose the Quote from the list of Business Objects
9. Click on SaveAll icon on the Menu Bar
Implementing “Enter Quote Details” Interactive Task
Defining the Task Service
In the first exercise, you defined the outline of the process and specified only the Name and Description for the activities. Now, in order to execute the process, you need to implement the process activities. Every Interactive Task has to be bound to a Task Service. You can either browse for existing Task Services or create one on the fly. Multiple Interactive Tasks can share the same Task Service.
In this exercise, you create a new Task Service.
2. In the Properties dialog, click the Implementation tab 3. Click the green + next to Human Task
4. In the Create Human Task dialog Enter the name, “EnterQuoteDetails”
5. Select Initiator for Pattern. This automatically sets the outcome to “SUBMIT”. 6. Type in “Enter Quote” for the title.
7. Click on the green + next to Parameters to launch the Data Object dialog 8. Drag quote from the Data Object Navigator window to the Parameters section. 9. Set the parameter to Editable.
11. This completes the creation of the EnterQuoteDetails Task Service. 12. Do a SaveAll
Generate Form for the Task
1. Expand the Business Catalog > HumanTasks folder to examine the newly created Task Service and the Types folder to see the associated types.
2. Now open the Task Service. Double-click the .task file to open the Task Editor with the Task Service definition.
3. Click on the Create Form menu and select Auto-Generate Task Form
4. Enter the Project Name “EnterQuoteUILab” Click OK.
5. The user interface for the Task Service is generated automatically. 3 dialogs open to give you an opportunity to do some customization. For this exercise, simply click OK to all the dialogs. The GUI designer will take a few moments to complete, once the taskDetails1.jspx form appears click Save All.
6. Close all the Task windows by right-clicking the RequestQuoteLab tab on the left and selecting Close Others from the context menu.
Complete the Task Service configuration of the remaining 4 Interactive Tasks. Three of our remaining Interactive Tasks namely Approve Deal, Approve Terms, and Business Practices Review share common outcomes and payload. So we’ll create one Task Form and one Task which will be used by all three.
7. Right click Business Practices Review activity and select the Properties window and the Implementation tab.
8. Click the “+” symbol to create the Task Service. 9. Enter the Name as “ApproveQuote”.
10. Select the Pattern as Simple.
12. The Approve Quote properties dialog looks like the picture below.
13. Click OK and click OK again. 14. Do a SaveAll
15. We’ll now generate a Task Form similar to what we did above.
17. Select Auto-Generate Task Form.. from the Create Form drop-down menu. Name the project “ApproveQuoteUILab” and click OK.
18. As before, click OK on each of the three dialogs that appear. Once the taskDetails1.jspx form is done initializing do a SaveAll
19. Close all the Task windows by right-clicking the RequestQuoteLab tab on the left and selecting Close Others from the context menu.
We can now set both the Approve Deal and Approve Terms Interactive Tasks to use the Approve Quote human task.
21. From the Implementation tab, select the Magnifying Glass. Select ApproveQuote from the list and OK to return to the ApproveDeal dialog.
22. We’ll override the Title. Type “Approve Deal” in the Title and click OK.
24. Repeat Step 19 above for the Approve Terms Interactive Task. Back in the Approve Terms dialog we’ll override the Title to be “Approve Terms”. Click OK.
25. Do a SaveAll
26. We’ll create a new Task and Task Form for the Finalize Quote activity. As we only want it to have one Outcome of OK.
27. Go to the implementation tab from the Finalize Contracts activity by right-clicking and choosing Properties. Click the green (+) plus sign to create a new Human Task.
28. Set the Name to “FinalizeContracts”, the Pattern to Simple, set the Title to “Finalize Contracts” and select the Magnifying Glass next to Outcomes.
29. De-Select the APPROVE and REJECT outcomes and Select OK(the outcome). Select OK
30. Back in the Human Task dialog. Click the green (+) plus icon next to Parameters, drag in the quote data object, select Editable and click OK.
31. Click OK again to return to the process model. Do a SaveAll.
33. Select Auto-Generate Task Form.. from the Create Form drop-down menu. Name the project “FinalizeContractsUILab” and click OK.
34. As before, click OK on each of the three dialogs that appear. Once the taskDetails1.jspx form is done initializing do a SaveAll
35. Close all the Task windows by right-clicking the RequestQuoteLab tab on the left and selecting Close Others from the context menu.
36. When completed return to the BPM Project Navigator tab.
Task data mapping
When creating Human Tasks directly from our Interactive Tasks the data associations are completed automatically(this was the case for Enter Quote Details, Business Practices
Review, and Finalize Contracts). Our other Interactives (Approve Deal and Approve Terms) were associated with the existing ApproveQuote task, so we’ll have to create the data associations for these manually.
37. Right-click on Approve Deal activity, choose Properties and go to the Implementation tab.
38. Check Use Associations and click the pencil icon .
39. Drag the quote data object from the panel on the right to both the Inputs and Outputs boxes on the left panel. Make sure you drag to the correct boxes as shown
below(quote matches to QuoteRequest on both Input and Output). Click OK when done.
40. Complete steps 1-3 for the Approve Terms activity as well. 41. Do a SaveAll.
Configuration of the Service Task
Now complete the following to add a service to your application which implements the SaveQuote Service Task. First you create the service by adding a Service Reference to the application using the composite editor. Then, you go back to the BPM process and bind the service to the SaveQuote Service Task.
42. Navigate to the composite editor by opening the Application Navigator and then expanding QuoteProcessLab and opening composite.xml by double-clicking. If it is not visible, open the Application Navigator from the View menu.
43. Drag-and-drop the File Adapter from the Component Palette to the right hand External References pane in the composite editor.
Note that with the composite editor, you must drag the File Adapter and drop it on the External References pane. You do not use the click-and-drop method used in the BPM process editor.
44. Walk through steps in the File Adapter wizard and create a service called SaveQuote to write to a file. The following screens show you the steps: choose the write
operation, specify the destination file name and directory – /home/oracle NOTE: This refers to a path on the server. Do not select the Native Format Translation Required option, and for the schema choose the QuoteRequest schema from the Quote.xsd file you used earlier.
Bind Service Activity to Service
45. The File Adapter service that you just created in the composite application gets promoted to the Business Catalog in the BPM Project Navigator automatically. 46. Navigate back to BPM Project Navigator
47. Go to Business Catalog/Services/Externals folder and expa nd it. Verify that the SaveQuote service is present.
48. Open RequestQuoteLab BPMN process.
49. Right click on Save Quote Service Activity step, select Properties and click Implementation tab
50. Choose Service Call from the Implementation drop-down and click the Magnifying Glass.
51. Click SaveQuote in the Type chooser and select OK.
Pass Data to Service
52. Select Use Associations within Data Associations section and select type Simple. Click the pencil icon.
53. Drag-and-drop the quote data object from the right hand panel to the Inputs area
54. Now click OK and click OK again. The Save Quote Service Task is complete. 55. Do a SaveAll.
Data Association configuration for conditional flows
The outcomes of the Business Practices Review, Approve Deal and Approve Terms Interactive tasks have to be evaluated for conditional branching. The task outcome of these tasks is a string value of “APPROVE” or “REJECT”. You set these values when you defined the task. The outcomes ge t mapped to the Data Objects so you can then use the Data Objects in the conditional expressions used for branching.
1. Open the Business Practices Review activity by right-clicking, selecting Properties, opening the Implementation tab, and then clicking the pencil icon next to Use Associations to bring up the Data Associations window.
2. Drag and drop the businessPracticesOutcome data object from the right panel to the box indicated on the Outputs panel.
3. Click OK twice to return to the model.
4. Do the same for the Approve Deal activity, instead mapping outcome to approveDealOutcome:
5. Map the outcome of the Approve Terms step as shown in the figure below:
6. Do a SaveAll
Now that we’ve saved the outcomes from our Interactive Tasks we can use these to provide the conditional expressions we need for our Transitions.
7. Double click on the Business Practices Reject transition line and go to the Properties tab.
8. Click on the Expression Editor icon.
Complete the following steps in the Expression Editor
1)Select the businessPracticesOutcome data object from the center Variables panel. 2)Click on the Insert Into Expression button to move the data object to the top.
3)Type in”==”REJECT””. That’s two equal signs and REJECT surrounded by double quotes.
9. Do the same for the Deal or Terms Rejected transition as shown in the figure below:
10. Add the condition for the Yes path for Is Business Practices Review Required? Gateway.
11. Do a SaveAll
Configuration of Script Tasks
Finally, you need to add a Script Task to set the payload (the input data) for the Enter Quote Details task and to determine whether the Business Practices Review activity is required or not. The script goes right before the Enter Quote Details Interactive Task. Using a script to set the input data makes testing this process easier but when running such a process for real, the user who initiates the task would enter the input data. 1. Click and drop a Script Task from the BPMN Component Palette and place it between the Start and Enter Quote Details steps. Name it “Initialize Quote”.
2. Click the Implementation tab and select Use Associations. 3. Select the XPath option and click the pencil icon to edit.
4. Drag the quote data object from the right panel and drop on the palette in the middle.
Complete the following steps in the Expression Builder: 1)Select the parseXML function on the bottom right. 2)Click the Insert into Expression button
3) Place two single quotes inside the parentheses of the expression, then place your cursor between the quotes.
6. Using a text editor open c:\BPMWorkshop\MyFiles\input\testData.xml copy the entire contents and paste it in between the quotes on the parseXML expression. Click OK
8. Click the Expression Builder icon next to the new box we just created. In the Expression editor type “false()” and click OK to return to the Association page
9. Click OK to close the Associations Editor and OK again to close the Activity editor and return to the process.
11. Go back to Enter Quote Details step and set the input mapping to the quote Data Object as shown in the figure below.
12. This completes the abstract implementation of the process. We will continue the rest of this lab tomorrow.
Day 2 Environment Setup
Your instructor will give you instructions on how to connect to Oracle’s wireless network. You will also be assigned an IP address (each student will have their own).
1. Edit your hosts file:
a. Using notepad or another text editor, open your hosts file located in C:\Windows\System32\drivers\etc
b. Add a line to your hosts file in the format <ipaddress>tab orabpm-server. Example below:
174.129.168.144 orabpm-server
2. Open JDeveloper and choose the Default Role
a. Choose Connections from the Categories, select Application Server Connection from the Items and click OK.
1. Type in BPMServer for the Connection Name, leave the default for the type and click Next
2. Leave the username as weblogic and type in welcome1 as the password, click Next.
3. Enter orabpm-server as the hostname and domain1 as the WebLogic Domain. Click Next
4. Click Test Connection, you should see nine connection test succeed. If successful click Finis h
Lab3 Continued
Mapping swim lane Roles to LDAP Roles
Process Roles have to be mapped to LDAP Roles for the process to run. You use the pre-seeded roles in the LDAP of the Oracle Weblogic Server installed as part of this training The BPM engine (Oracle Weblogic Server) has to be running to map the Process Roles to the LDAP roles. Be sure your server is running before continuing.
1. In BPM Studio, navigate to BPM Process Navigator 2. Right click on Organization and select Open
3. In the Organization editor, select the SalesRep role from the list of Roles 4. Click on the green + within the Members sub-panel
6. Click the Lookup icon to search for users.
7. Select user “jcooper” and click the Select button. Then the OK button.
8. In a similar manner, perform role mapping as shown in the table be low for the remaining Process Roles:
Approvers cdickens
Business Practices jstein
Contracts wfaulk
Process Owner jstein
Deploying the process
1. Go to Applications Navigator.
It will take some time to compile and upload to the server. When complete you should see the following message in the Deployme nt tab.
Using the Oracle BPM Workspace
Oracle BPM's Workspace is a web application that allows you to interact with a process in relation to your assigned role or roles within your company. The Workspace helps you to manage your tasks effectively and efficiently with minimal training. It serves as a portal, or window, into a business process for which you have an assigned role. When you select a pending task, the Workspace allows you to execute the transaction or transactions associated with the task. The Workspace allows you to access your work with an Internet browser from any location. You can use the Workspace interface like an e- mail reader to view incoming tasks for which you are responsible.
Workspace allows you to:
Invoke instance activity tasks
Route completed instances automatically to the user or system responsible for the next step in the process
Delegate required tasks to a specific end user
Perform operations on a batch of instances
Add notes and attachments to an instance of a process
Customize how your activities and instances are organized
View detailed activity documentation, notes, attachments, and audit trail information
Search for instances in processes A Quick Tour of the BPM Workspace
For each process in which you have been assigned a role, the Workspace displays your current tasks. The participants in the process and their roles and groups have already been created. Recall that:
James Cooper (user id “jcooper”) was assigned the Sales Representative (SalesRep) role and will be able to do the Enter Quote Details activity
John Steinbeck (user id “jstein”) was assigned the role ”Business
Practices” and will be able to do the Business Practices Review activity. He also has the role of the Process Owner and will be able to perform process administrative functions.
Charles Dickens (user id “cdickens”) was assigned the role “Approvers” and will be able to do Approve Deal activity.
William Faulkner (user id “wfaulk’) was assigned the role “Contracts” and will be able to perform both Approve Terms and Finalize Terms activities. 1. To access the Workspace, type in
http://orabpm-server:8001/bpm/workspace 2. Log in as “jcooper/welcome1”.
When you first access Workspace after logging on, you are in the Tasks section.
The Inbox option shows the list of task items assigned to you and your Group in the right pane of the Workspace (similar to an email inbox).
On the top left side, below the Inbox, you can see that there are other Views as well and you can query Tasks based on priority, expiration, time window etc.
On the bottom left side, there are pre-seeded reports available to look at different task related performance metrics.
The right-hand section shows the task items for all the process instances in the Inbox. The default view displayed is “Me & Group” with Status set to “Assigned”.
The items appearing in your list are based on the roles assigned to you. Each role is associated with certain activities in a process. For example, if you are a Sales
Representative, your role might be assigned to the Enter Quote Details activity in your company's Sales Quote process. As a result, when you log onto Workspace, instances in the Enter Quote Details activity would appear in the list. On the other hand, a Contracts person logging onto Workspace would not be able to see instances in the Enter Quote Details activity, but would see only those in the Approve Terms and Finalize Terms activities.
As an instance flows through a business process, each end user processes the instance by completing the tasks assigned to him or her. Once a task is completed, the process advances to the next activity in the business process. If it is an Interactive Activity, anyone assigned to the role for that next activity gets the task and can process it.
Alternatively, you can assign the task to a particular user as long as he or she is assigned to the role for that activity.
Description of columns in My Tasks:
Title
When you click the Inbox, each task is listed in the right pane of the workspace. The Title column displays information that explains the task. Think of this field as the subject on an e-mail. In the example above, the name of the customer submitting this order is customer Acme. You enabled this earlier when you set the XPath Expression in the “Enter Quote Details” Task definition:
Number
Each task item has a unique process instance id which is displayed under the Number column. There can be several task items for the same process instance.
State
The State column indicates the status of the task in the process instance. For example, the status of a task can be “Assigned” or “Completed” or “In process”.
Date
The date represents the timestamp at which the Task is created.
Selecting a particular task item opens the UI interfaces associated with it in the section below. Double-clicking it opens it in a new window.
Triggering the Sales Quote Process
Recollect that the Sales Quote process is triggered b y the Sales Representative role with an Initiate task. The BPM process is available to the Sales Rep in Workspace.
1. While logged in as jcooper, go to the Applications section and click on the process you just deployed [QuoteProcessLab] RequestQuoteLab v1.0. This auto-generates a task item for the Ente r Quote Details step and opens the task in a new window – you may have to turn off the pop- up blocker in your browser to see it. Close the task here and go on to the next section.
Executing the Interactive Tasks and completing the Process 2. Click the Refresh icon in the Tasks tab.
3. You see that a new task item is now available in the Inbox of jcooper.
4. You can single- or double-click on this item to launch the user interface associated with the task. The double-click action opens it in another window while single-click opens it in the lower pane of the screen. The user interface is the form that was defined for this task.
Files can be attached to tasks by anyone involved in a process at any activity and later viewed and used by other participants involved in later activities for the instance in the process.
To attach a file to an instance, go to the Attachments section (all the way at the bottom) and select the “+” symbol to bring up a file browser and add documents. The file
attachment now appears as a link for other participants. They can view the attachment by simply clicking on the link.
You can also add a note in the Comments section. Any user can add a note to any task item in their view that has not been processed or completed. Other users who work with the task can also access any notes added previously and then add a note of their own if they choose. The process may also add notes automatically to an instance as it flows through the process. The notes added by the process typically point out problems that might have occurred and how to correct them. The notes added by the process
5. In this lab, you can select the Submit button at the top right-hand corner to complete the task.
The task has now left jcooper’s Inbox.
The Business Practices Review step is always skipped as we have set the “businessPracticesReviewRequired” Boolean data object to be always false.
The process now moves to the Approvers and Contracts roles at the same time for the Approve Deal and Approve Terms process steps respectively.
6. Log out as jcooper and log in as cdickens with welcome1 as the password.
7. Notice the new task in the Inbox for cdickens. Select the task and then select Approve from the Actions menu or click the Approve button on the task to submit the task with the Approve outcome.
8. The Approve Deal task item is now removed from the Inbox of cdickens. 9. Log out again and log in as wfaulk Contracts role.
10. Select the Approve Terms task item and go to Actions and select Approve. 11. The Approve Terms task item is now removed from the Inbox and the Finalize
Contracts task item gets automatically created. Click on the Refresh icon if you don’t see the new task for finalizing the contracts.
12. As the Contracts role is responsible for both Approve Terms and Finalize Contracts, wfaulk can act on the Finalize Contracts task item as well. Click on Actions and select OK.
13. This completes the process instance and a file now exists in the output directory you entered for the SaveQuote service. Go to the directory and view the file.
From an end user perspective, the most important thing to learn about the Workspace is how to execute activities as the process advances.
Instead of having to log in and log out for each role, you could also login once
as jstein, who is the process owne r and approve all the tasks. Recollect, that
you added the jstein user to the Process Owner role and he has privileges for all the tasks in the process.
Monitoring the Process Instance using Workspace
1. Log in to Workspace as jstein with password welcome1.
2. Go to Process Tracking tab. This section displays the process instances that the user jstein is associated with.
3. To search, select the Advanced tab.
4. Change the options to Processes:All, Assigned:Anyone, at any Role, Status: All. Click OK
The top right section is now populated with process instances that match the search criteria.
This populates the process instance details in the bottom window.
The Details segment provides information on the general process status such as whether it is running or completed, the creation time, priority etc.
The Open Activities provides information on the task items belonging to that process instance that is assigned but not yet completed.
5. Click on the symbol next to the Audit trail and it shows the list of activities completed for that process instance as well as the activity that it is currently waiting on in a tabular format.
6. Switch to the Graphical vie w to see the process instance flow in a graphical format.
You can also view any Comme nts or Attachme nts associated with the task instance that the process is waiting on.
Lab 4: BPM Composer
Introduction
This lab will introduce us to support of various different application development lifecycles using both BPM Studio and BPM Composer. As we have already completed labs which went into detail on modeling and implementation we will be creating an incredibly simple HelloWorld process. We will begin the lab assuming a Business Analyst persona. We will use BPM Composer to create a Process Blueprint, an abstract model which defines our flow and activities. This blueprint is stored in our Metadata Services Repository and shared with a Process Developer, the developer will add services to the project and convert it to a Process Template. Again, the template will be shared with our Process Owne r who has privileges to create a new project from the template, complete the implementation and deploy it to the run time. Our user community and the tools we’ll be using are below:
Persona User Name Tool Used
Business Analyst Wshake Composer
Developer Weblogic BPMStudio(JDeveloper)
Process Owner Sfitzger Composer
Note: Normally templates, blueprints,, projects can be shared directly between the Composer and Studio environme nts. However, due to firewall restrictions on Amazon EC2 we’re not able to create those connections. The Appendix to the lab guide shows how to set up the connection and examples of using Studio to communicate directly with MDS.
Creating a Process Blueprint in BPM Composer
In this exercise we will login to BPM Composer as wshake (a Business Analyst who has the privilege to create new processes).
Objectives
After completing this lesson, you will know how to:
Create process blueprint using BPM Composer.
Export the project so it can be opened in BPM Studio
As noted above, this could alternatively be accomplished by a direct connection from BPM Studio to MDS
1. Open your browser (Firefox 3+ or IE7+) and go to http://orabpm-server:8001/BPM/Composer.. Login as wshake/welcome1
3. Select the Create a Blank Project option, name the Project HelloWorld, make sure the Enable Sharing and Begin Editing Now checkboxes are selected, and click
Create.
4. Right-click the Process Node and Select New|Process.
5. In the New Process dialog set the Name to SayHello, leave Synchronous Service as the pattern, and click OK.
6. Drag the Service Task activity between the Start and End gateways. Drop it when the sequence flow line begins to pulse.
Because we selected Synchronous Service as the pattern, we have a Start and End Message gateways. This service enables our process (i.e. It will expose it as a Web Service.
7. Select the label and rename it CallAService.
9. Select Export Project from the Tools drop-down.
10. Save it C:\JDeveloper\mywork\HelloWorld.exp on your desktop (or somewhere else you can find it).
11. Sign out of BPM Composer
Creating a Process Template in BPM Studio
Process templates can be created in BPM Studio to create a catalog of Business Objects, Services, Process Data Object, Rules and Human Tasks which can then be shared with others (typically process owners) who provide a final concrete project which is customized and deployed for a specific use case. In our example will add one simple Service to our initial blueprint which will allow our Process Owner to create a deployable project.
For brevities sake we are going to create a Mediator which will accept an input value, and return an output value. In the real world, mediators are often use to provide transformation and routing capabilities to our composite to talk to an actual Web Service or Adapter service. We’ll just be echoing back a response without a real service behind it.
1. Open BPM Studio/JDeveloper with a Default role if not already open. 2. From the Menu Bar, select File|Import.
4. Open the HelloWorld.exp file you saved in the earlier step and click through to import.